lib/edid_fill_fb: Relax bits_per_pixel constraint
The Picasso VBIOS is not setting the reserved_mask_size correctly. This change relaxes the constraint to allow bpp_mask <= bits_per_pixel. This is how the code previously used to work before CB:39002. BUG=b:177094598, b:177422379 TEST=boot zork and see depthcharge working Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I2e67532fa949fbd673269d8d7f1c0d8af6124ac9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49404 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
parent
d4b58259c4
commit
8b043c058c
|
@ -48,10 +48,17 @@ fb_add_framebuffer_info_ex(const struct lb_framebuffer *fb)
|
||||||
|
|
||||||
bpp_mask = fb->blue_mask_size + fb->green_mask_size + fb->red_mask_size +
|
bpp_mask = fb->blue_mask_size + fb->green_mask_size + fb->red_mask_size +
|
||||||
fb->reserved_mask_size;
|
fb->reserved_mask_size;
|
||||||
if (fb->bits_per_pixel != bpp_mask) {
|
if (bpp_mask > fb->bits_per_pixel) {
|
||||||
printk(BIOS_ERR, "%s: BPP=%d and channel bit mask=%d doesn't match."
|
printk(BIOS_ERR,
|
||||||
" This is a driver bug.\n", __func__, fb->bits_per_pixel, bpp_mask);
|
"%s: channel bit mask=%d is greater than BPP=%d ."
|
||||||
|
" This is a driver bug. Framebuffer is invalid.\n",
|
||||||
|
__func__, bpp_mask, fb->bits_per_pixel);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
} else if (bpp_mask != fb->bits_per_pixel) {
|
||||||
|
printk(BIOS_WARNING,
|
||||||
|
"%s: channel bit mask=%d and BPP=%d don't match."
|
||||||
|
" This is a driver bug.\n",
|
||||||
|
__func__, bpp_mask, fb->bits_per_pixel);
|
||||||
}
|
}
|
||||||
|
|
||||||
info = fb_new_framebuffer_info();
|
info = fb_new_framebuffer_info();
|
||||||
|
|
Loading…
Reference in New Issue