]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ingenic: Reset pixclock rate when parent clock rate changes
authorPaul Cercueil <paul@crapouillou.net>
Sat, 26 Sep 2020 17:04:55 +0000 (19:04 +0200)
committerPaul Cercueil <paul@crapouillou.net>
Sat, 26 Sep 2020 19:53:27 +0000 (21:53 +0200)
commit1c428a652510e1d5c8c14944bd2379bdbbd66800
tree2b5354b62e5e04df0b396f6f2281d1b45b0a4404
parent0e4d76a0fc8f7d8c8880a43d91c1dd399d24682e
drm/ingenic: Reset pixclock rate when parent clock rate changes

Old Ingenic SoCs can overclock very well, up to +50% of their nominal
clock rate, whithout requiring overvolting or anything like that, just
by changing the rate of the main PLL. Unfortunately, all clocks on the
system are derived from that PLL, and when the PLL rate is updated, so
is our pixel clock.

To counter that issue, we make sure that the panel is in VBLANK before
the rate change happens, and we will then re-set the pixel clock rate
afterwards, once the PLL has been changed, to be as close as possible to
the pixel rate requested by the encoder.

v2: Add comment about mutex usage

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200926170501.1109197-2-paul@crapouillou.net
drivers/gpu/drm/ingenic/ingenic-drm-drv.c