Skip to content

Commit

Permalink
video: bochs: Set the frame buffer size per configuration
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Tested-by: Simon Glass <[email protected]>  # qemu-x86_64
  • Loading branch information
lbmeng authored and vdsao committed Aug 1, 2023
1 parent f91f0e7 commit e1a0caf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/bochs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e1a0caf

Please sign in to comment.