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>
This commit is contained in:
Julius Werner 2016-10-17 18:14:41 -07:00
parent 0bc12abc2b
commit e74f5eaa43
1 changed files with 2 additions and 5 deletions

View File

@ -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);