]> git.baikalelectronics.ru Git - kernel.git/commit
drm: bridge/dw_hdmi: adjust pixel clock values in N calculation
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 22 Jul 2015 09:39:27 +0000 (10:39 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 9 Oct 2015 16:17:34 +0000 (17:17 +0100)
commitac4b9ea831d4e1d1150ff4943a3b01534b51492e
tree51ac75c6c6e826cb3ee03de4a203bfe2a7c6f131
parent896f727d83757fc0fe9022cf07c8e5f2f6bcf073
drm: bridge/dw_hdmi: adjust pixel clock values in N calculation

Adjust the pixel clock values in the N calculation to match the more
accurate clock values we're given by the DRM subsystem, which are the
kHz pixel rate, with any fractional kHz rounded down in the case of
the non-240, non-480 line modes, or rounded up for the others.  So,

 25.20 / 1.001 =>  25175
 27.00 * 1.001 =>  27027
 74.25 / 1.001 =>  74176
148.50 / 1.001 => 148352

DRM derives these rates from the EDID CEA mode identifiers, which are
looked up in the tables in drivers/gpu/drm/drm_edid.c.  The values on
the right are the clock values found in these tables, and are
currently expected to be passed to the HDMI driver unchanged.

Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/gpu/drm/bridge/dw_hdmi.c