Skip to contentSkip to conversation

drm/fsl-dcu: avoid disabling pixel clock twice on suspend

PATCH New Stefan Agner 1 participant 2 messages Nov 14, 2017

Subsystems (3)
lore
Share & tools
lore

Stefan Agner

author maintainer
#0 lore raw

PATCH v2 1/2 drm/fsl-dcu: avoid disabling pixel clock twice on suspend

With commit 0a70c998d0c5 ("drm/fsl-dcu: enable pixel clock when enabling CRTC") the pixel clock is controlled by the CRTC code. Disabling the pixel clock in suspend leads to a warning due to the second clk_disable_unprepare call:

  WARNING: CPU: 0 PID: 359 at drivers/clk/clk.c:594 clk_core_disable+0x8c/0x90

Remove clk_disable_unprepare call for pixel clock to avoid unbalanced clock disable on suspend.

Fixes 0a70c998d0c5 ("drm/fsl-dcu: enable pixel clock when enabling CRTC")
---
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +0 -1
index 58e9e0601a61..90ad509c7c45 100644
@@ -210,7 +210,6 @@ static int fsl_dcu_drm_pm_suspend(struct device *dev)
 		return PTR_ERR(fsl_dev->state);
 	}
 
-	clk_disable_unprepare(fsl_dev->pix_clk);
 	clk_disable_unprepare(fsl_dev->clk);
 
 	return 0;
Signature · 6 lines
2.15.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#1 lore raw

PATCH v2 2/2 drm/fsl-dcu: enable IRQ before drm_atomic_helper_resume()

The resume helpers wait for a vblank to occurre hence IRQ need to be enabled. This avoids a warning as follows during resume:

  WARNING: CPU: 0 PID: 314 at drivers/gpu/drm/drm_atomic_helper.c:1249 drm_atomic_helper_wait_for_vblanks.part.1+0x284/0x288
  [CRTC:28:crtc-0] vblank wait timed out

---
Rebased onto drm-misc-next-fixes

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +1 -1
index 90ad509c7c45..faf17b83b910 100644
@@ -232,6 +232,7 @@ static int fsl_dcu_drm_pm_resume(struct device *dev)
 	if (fsl_dev->tcon)
 		fsl_tcon_bypass_enable(fsl_dev->tcon);
 	fsl_dcu_drm_init_planes(fsl_dev->drm);
+	enable_irq(fsl_dev->irq);
 	drm_atomic_helper_resume(fsl_dev->drm, fsl_dev->state);
 
 	console_lock();
@@ -239,7 +240,6 @@ static int fsl_dcu_drm_pm_resume(struct device *dev)
 	console_unlock();
 
 	drm_kms_helper_poll_enable(fsl_dev->drm);
-	enable_irq(fsl_dev->irq);
 
 	return 0;
 }
Signature · 6 lines
2.15.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel