From e74f5eaa432b6483da56c5e964a6f5fbf29cbaed Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Mon, 17 Oct 2016 18:14:41 -0700 Subject: rk3399: display: Use edid_set_framebuffer_bits_per_pixel() helper This refactoring was already carried into RK3288 with commit 6911219 (edid: Add helper function to calculate bits-per-pixel dependent values) but it seems that the code for RK3399 was copy&pasted from it too early to pick this up. Fix that so that future Rockchip SoCs can copy&paste the right thing. Change-Id: I5050c58d18db38fffabc7666e67a622d4a828590 Signed-off-by: Julius Werner Reviewed-on: https://review.coreboot.org/17050 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi --- src/soc/rockchip/rk3399/display.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/soc/rockchip/rk3399/display.c b/src/soc/rockchip/rk3399/display.c index d69df93f74..267986090f 100644 --- a/src/soc/rockchip/rk3399/display.c +++ b/src/soc/rockchip/rk3399/display.c @@ -95,11 +95,8 @@ void rk_display_init(device_t dev, uintptr_t lcdbase, return; } - edid.framebuffer_bits_per_pixel = conf->framebuffer_bits_per_pixel; - edid.bytes_per_line = - edid.mode.ha * conf->framebuffer_bits_per_pixel / 8; - edid.x_resolution = edid.mode.ha; - edid.y_resolution = edid.mode.va; + edid_set_framebuffer_bits_per_pixel(&edid, + conf->framebuffer_bits_per_pixel, 0); rkvop_mode_set(conf->vop_id, &edid, detected_mode); rkvop_enable(conf->vop_id, lcdbase, &edid); -- cgit v1.2.3