summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2016-10-17 18:14:41 -0700
committerJulius Werner <jwerner@chromium.org>2016-10-18 19:52:44 +0200
commite74f5eaa432b6483da56c5e964a6f5fbf29cbaed (patch)
treecec674ad1449b059753eab4e3e9dc962a0954840 /src/soc
parent0bc12abc2b26c0b4098ac76a6d42219b359c7a22 (diff)
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@chromium.org> Reviewed-on: https://review.coreboot.org/17050 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks <dhendrix@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/rockchip/rk3399/display.c7
1 files changed, 2 insertions, 5 deletions
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);