]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix pixel clock programming
authorIlya Bakoulin <Ilya.Bakoulin@amd.com>
Tue, 26 Jul 2022 20:19:38 +0000 (16:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:27:47 +0000 (10:27 +0200)
commit82196811427feafe218c6da1978f32df2f0730d0
treed72b0d7fd1ca3e333bb748d489cc770922c7e60c
parentae42f2543ccf5a4757d04c42455bd10d1aaa7e14
drm/amd/display: Fix pixel clock programming

[ Upstream commit dda5474dea149a1a8d4c354326a814b0ccb3ef97 ]

[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>
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c