You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
drm/amd/display: Fix pixel clock programming
[ Upstream commit 04fb918bf4 ]
[Why]
Some pixel clock values could cause HDMI TMDS SSCPs to be misaligned
between different HDMI lanes when using YCbCr420 10-bit pixel format.
BIOS functions for transmitter/encoder control take pixel clock in kHz
increments, whereas the function for setting the pixel clock is in 100Hz
increments. Setting pixel clock to a value that is not on a kHz boundary
will cause the issue.
[How]
Round pixel clock down to nearest kHz in 10/12-bpc cases.
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Brian Chang <Brian.Chang@amd.com>
Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
60d522f317
commit
f08a3712ba
@@ -546,9 +546,11 @@ static void dce112_get_pix_clk_dividers_helper (
|
||||
switch (pix_clk_params->color_depth) {
|
||||
case COLOR_DEPTH_101010:
|
||||
actual_pixel_clock_100hz = (actual_pixel_clock_100hz * 5) >> 2;
|
||||
actual_pixel_clock_100hz -= actual_pixel_clock_100hz % 10;
|
||||
break;
|
||||
case COLOR_DEPTH_121212:
|
||||
actual_pixel_clock_100hz = (actual_pixel_clock_100hz * 6) >> 2;
|
||||
actual_pixel_clock_100hz -= actual_pixel_clock_100hz % 10;
|
||||
break;
|
||||
case COLOR_DEPTH_161616:
|
||||
actual_pixel_clock_100hz = actual_pixel_clock_100hz * 2;
|
||||
|
||||
Reference in New Issue
Block a user