[coreboot-gerrit] New patch to review for coreboot: rk3399: display: Use edid_set_framebuffer_bits_per_pixel() helper

Julius Werner (jwerner@chromium.org) gerrit at coreboot.org
Tue Oct 18 03:18:21 CEST 2016


Julius Werner (jwerner at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17050

-gerrit

commit 4aa966aa375faa55cb1d0ba65c4d193e13592962
Author: Julius Werner <jwerner at chromium.org>
Date:   Mon Oct 17 18:14:41 2016 -0700

    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 <jwerner at chromium.org>
---
 src/soc/rockchip/rk3399/display.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/soc/rockchip/rk3399/display.c b/src/soc/rockchip/rk3399/display.c
index d69df93..2679860 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);



More information about the coreboot-gerrit mailing list