This Linux kernel change "drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz" is included in the Linux 4.9.187 release. This change is authored by Jyri Sarha <jsarha [at] ti.com> on Mon May 27 16:47:54 2019 +0300. The commit for this change in Linux stable tree is ebfba80 (patch) which is from upstream commit 8dbfc5b. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream 8dbfc5b.
drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz [ Upstream commit 8dbfc5b65023b67397aca28e8adb25c819f6398c ] The pixel clock unit in the first two registers (0x00 and 0x01) of sii9022 is 10kHz, not 1kHz as in struct drm_display_mode. Division by 10 fixes the issue. Signed-off-by: Jyri Sarha <firstname.lastname@example.org> Reviewed-by: Andrzej Hajda <email@example.com> Reviewed-by: Laurent Pinchart <firstname.lastname@example.org> Signed-off-by: Andrzej Hajda <email@example.com> Link: https://firstname.lastname@example.org Signed-off-by: Sasha Levin <email@example.com>
There are 5 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.
drivers/gpu/drm/bridge/sii902x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index 9126d03..51e2d03 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -250,10 +250,11 @@ static void sii902x_bridge_mode_set(struct drm_bridge *bridge, struct regmap *regmap = sii902x->regmap; u8 buf[HDMI_INFOFRAME_SIZE(AVI)]; struct hdmi_avi_infoframe frame; + u16 pixel_clock_10kHz = adj->clock / 10; int ret; - buf = adj->clock; - buf = adj->clock >> 8; + buf = pixel_clock_10kHz & 0xff; + buf = pixel_clock_10kHz >> 8; buf = adj->vrefresh; buf = 0x00; buf = adj->hdisplay;