• Jyri Sarha's avatar
    drm/tilcdc: Clean up LCDC functional clock rate setting code · 642e5167
    Jyri Sarha authored
    Clean up LCDC functional clock rate setting code.
    
    The LCDC functional clock is set by two functions: mode_set_nofb() and
    cpufreq_transition().
    
    When tilcdc_crtc_mode_set_nofb() is called in atomic commit phase the
    drm atomic helpers have taken all the necessary drm locks and turned
    off the crtc, while tilcdc_commit() is keeping LCDC powered on. For
    mode_set_nofb() just a simple clock setting function without any
    locking or power management code is enough. The new tilcdc_crtc_set_clk()
    is implemented for that purpose.
    
    cpufreq_transition() on the other hand is called from outside DRM and
    it needs to take the necessary locks and turn off the CRTC while
    keeping the LCDC powered. The reimplemented tilcdc_crtc_update_clk()
    is for that purpose and it uses the new tilcdc_crtc_set_clk() to
    actually set the clock.
    Signed-off-by: default avatarJyri Sarha <jsarha@ti.com>
    Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
    642e5167
tilcdc_drv.h 5.24 KB