From b713d93525ec2a5e5ff65b81334b4475841b633c Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 6 Dec 2014 17:35:25 +0100 Subject: [PATCH] edid: fill reserved bits fields in cb_framebuffer If it's a 4 byte format (as per documentation), there are some reserved bits, so let's mark them as such... Change-Id: I50f12cfff2c9bb9d082a5f3c3ac54c0d514d862b Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/7674 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Paul Menzel --- src/lib/edid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/edid.c b/src/lib/edid.c index c8e3203341..2028c707a9 100644 --- a/src/lib/edid.c +++ b/src/lib/edid.c @@ -1446,10 +1446,14 @@ void set_vbe_mode_info_valid(struct edid *edid, uintptr_t fb_addr) * I'm not sure with grahpics you ever can. */ edid_fb.bits_per_pixel = edid->framebuffer_bits_per_pixel; + edid_fb.reserved_mask_pos = 0; + edid_fb.reserved_mask_size = 0; switch(edid->framebuffer_bits_per_pixel){ case 32: case 24: /* packed into 4-byte words */ + edid_fb.reserved_mask_pos = 24; + edid_fb.reserved_mask_size = 8; edid_fb.red_mask_pos = 16; edid_fb.red_mask_size = 8; edid_fb.green_mask_pos = 8; @@ -1472,8 +1476,6 @@ void set_vbe_mode_info_valid(struct edid *edid, uintptr_t fb_addr) return; } - edid_fb.reserved_mask_pos = 0; - edid_fb.reserved_mask_size = 0; vbe_valid = 1; }