diff options
author | Bin Meng <bmeng@tinylab.org> | 2023-07-23 12:40:32 +0800 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2023-08-01 13:35:39 +0200 |
commit | e1a0cafcfb85a681c7ac77c71fed0c392a75fe06 (patch) | |
tree | 93805698995b8d3a3fe27191616a2c0f26e8376e /drivers | |
parent | f91f0e74df814d5c96382d1d8ce29d63c8f0b343 (diff) | |
download | u-boot-e1a0cafcfb85a681c7ac77c71fed0c392a75fe06.tar.gz u-boot-e1a0cafcfb85a681c7ac77c71fed0c392a75fe06.tar.bz2 u-boot-e1a0cafcfb85a681c7ac77c71fed0c392a75fe06.zip |
video: bochs: Set the frame buffer size per configuration
At present the uclass stored frame buffer size is set to a hard
coded value, but we can calculate the correct value based on what
is configured.
Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/bochs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/bochs.c b/drivers/video/bochs.c index 5923ff81c6..022ea38d4c 100644 --- a/drivers/video/bochs.c +++ b/drivers/video/bochs.c @@ -101,8 +101,8 @@ static int bochs_video_bind(struct udevice *dev) { struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev); - /* Set the maximum supported resolution */ - uc_plat->size = 2560 * 1600 * 4; + /* Set the frame buffer size per configuration */ + uc_plat->size = xsize * ysize * 32 / 8; log_debug("%s: Frame buffer size %x\n", __func__, uc_plat->size); return 0; |