edid: Make framebuffer row alignment configurable

Hardware / Coreboot - Julius Werner [chromium.org] - 7 April 2016 13:46 UTC

Our EDID code had always been aligning the framebuffer's bytes_per_line (and x_resolution dependent on that) to 64. It turns out that this is a controller-dependent parameter that seems to only really be necessary for Intel chipsets, and commit 6911219cc (edid: Add helper function to calculate bits-per-pixel dependent values) probably actually broke this for some other controllers by applying the alignment too widely.

This patch makes it explicitly configurable and depends the default on ARCH_X86 (which seems to be the simplest and least intrusive way to make it fit most cases for now... boards where this doesn't apply can still override it manually by calling edid_set_framebuffer_bits_per_pixel() again).

Change-Id: I1c565a72826fc5ddfbb1ae4a5db5e9063b761455

2b6db97 edid: Make framebuffer row alignment configurable
src/drivers/emulation/qemu/bochs.c | 2 +-
src/drivers/emulation/qemu/cirrus.c | 2 +-
src/include/edid.h | 3 ++-
src/lib/edid.c | 17 ++++++++++++-----
src/soc/nvidia/tegra124/display.c | 2 +-
src/soc/nvidia/tegra132/dc.c | 2 +-
src/soc/nvidia/tegra210/dc.c | 2 +-
src/soc/rockchip/rk3288/display.c | 2 +-
8 files changed, 20 insertions(+), 12 deletions(-)

Upstream: review.coreboot.org


  • Share