Skip to content

Commit

Permalink
drm/stm: ltdc: remove call of pm-runtime functions
Browse files Browse the repository at this point in the history
It is not necessary to suspend or stop the ltdc clocks
to modify the pixel clock.

Signed-off-by: Yannick Fertre <[email protected]>
Acked-by: Philippe Cornu <[email protected]>
Signed-off-by: Benjamin Gaignard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
YFESTM authored and benjamingaignard committed Jul 8, 2020
1 parent 08fbd8a commit a790aba
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions drivers/gpu/drm/stm/ltdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,15 +503,7 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
struct drm_display_mode *adjusted_mode)
{
struct ltdc_device *ldev = crtc_to_ltdc(crtc);
struct drm_device *ddev = crtc->dev;
int rate = mode->clock * 1000;
bool runtime_active;
int ret;

runtime_active = pm_runtime_active(ddev->dev);

if (runtime_active)
pm_runtime_put_sync(ddev->dev);

if (clk_set_rate(ldev->pixel_clk, rate) < 0) {
DRM_ERROR("Cannot set rate (%dHz) for pixel clk\n", rate);
Expand All @@ -520,14 +512,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,

adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;

if (runtime_active) {
ret = pm_runtime_get_sync(ddev->dev);
if (ret) {
DRM_ERROR("Failed to fixup mode, cannot get sync\n");
return false;
}
}

DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
mode->clock, adjusted_mode->clock);

Expand Down

0 comments on commit a790aba

Please sign in to comment.