diff options
author | Tom Rini <trini@konsulko.com> | 2022-03-28 19:36:49 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-03-28 19:36:49 +0300 |
commit | 34d2b7f20369d62c0f091d6572a8c0ea4655cf14 (patch) | |
tree | 0591ee99c118e0e196730b6ec6582986200e6313 /drivers/video/video-uclass.c | |
parent | 7f0826c169ff14d62e92d02f85d33d0030d45c12 (diff) | |
parent | e893e8ea6a5d3af312747d00f93587559193a426 (diff) | |
download | u-boot-34d2b7f20369d62c0f091d6572a8c0ea4655cf14.tar.xz |
Merge tag 'v2022.04-rc5' into next
Prepare v2022.04-rc5
Diffstat (limited to 'drivers/video/video-uclass.c')
-rw-r--r-- | drivers/video/video-uclass.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 5215114b2d..9ae032e9c2 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -33,7 +33,8 @@ * information represents the requires size and alignment of the frame buffer * for the device. The values can be an over-estimate but cannot be too * small. The actual values will be suppled (in the same manner) by the bind() - * method after relocation. + * method after relocation. Additionally driver can allocate frame buffer + * itself by setting plat->base. * * This information is then picked up by video_reserve() which works out how * much memory is needed for all devices. This is allocated between @@ -78,6 +79,10 @@ static ulong alloc_fb(struct udevice *dev, ulong *addrp) if (!plat->size) return 0; + /* Allow drivers to allocate the frame buffer themselves */ + if (plat->base) + return 0; + align = plat->align ? plat->align : 1 << 20; base = *addrp - plat->size; base &= ~(align - 1); |