UPSTREAM: 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.

BUG=None
BRANCH=None
TEST=None

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>

Change-Id: I5050c58d18db38fffabc7666e67a622d4a828590
Reviewed-on: https://chromium-review.googlesource.com/400464
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Julius Werner 2016-10-17 18:14:41 -07:00 committed by chrome-bot
parent 7b28e9e8ff
commit 916b90b58f

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