MLK-19961 drm/imx/dcss: Fix 27MHz pixel clock platform freeze
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Wed, 17 Oct 2018 08:20:34 +0000 (11:20 +0300)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commitc4d2285a6b514540d68fc611baac938f8e056165
tree7fd3673f75f6d438fd774db199a6ea4bdd6856f8
parent52954fb2979c9583bdcbc25d6415ce33ba942427
MLK-19961 drm/imx/dcss: Fix 27MHz pixel clock platform freeze

When the VIDEO_PLL2 clock code was moved to the DCSS driver, a
regression was introduced and any mode requiring a 27MHz pixel clock
would instantly freeze the platform.

It turns out, after setting the clocks in bypass mode, PLL_CLKE was
never set. Hence, DCSS was not getting any clock. Without a valid clock,
any attempt to access DTG registers will freeze the system.

This patch:
 * sets PLL_CLKE when bypass is used;
 * simplifies the pll code a little;
 * increases the atomic CRTC enable timeout to 500ms to accommodate the
   delay after which the clock is available when bypass is used;

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Oliver Brown <oliver.brown@nxp.com>
drivers/gpu/drm/imx/dcss/dcss-crtc.c
drivers/gpu/imx/dcss/dcss-pll.c