[PATCH 1/2] drm/fsl-dcu: Fix DCU pixel clock issue in suspend/resume functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As there is not corresponding clk_prepare_enable() for
fsl_dev->pix_clk in previous contexts, clk_disable_unprepare() for
fsl_dcu->pix_clk in suspend function will fail.

This patch will add clk_prepare_enable() for fsl_dev->pix_clk in
previous contexts and resume function to fix the issue.

This patch is verified on LS1021ATWR board.

Signed-off-by: Alison Wang <alison.wang@xxxxxxx>
---
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
index 58e9e0601a61..875b0fdc4274 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
@@ -230,6 +230,12 @@ static int fsl_dcu_drm_pm_resume(struct device *dev)
 		return ret;
 	}
 
+	ret = clk_prepare_enable(fsl_dev->pix_clk);
+	if (ret < 0) {
+		dev_err(dev, "failed to enable dcu pix clk\n");
+		return ret;
+	}
+
 	if (fsl_dev->tcon)
 		fsl_tcon_bypass_enable(fsl_dev->tcon);
 	fsl_dcu_drm_init_planes(fsl_dev->drm);
@@ -351,6 +357,12 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
 		goto disable_clk;
 	}
 
+	ret = clk_prepare_enable(fsl_dev->pix_clk);
+	if (ret < 0) {
+		dev_err(dev, "failed to enable dcu pix clk\n");
+		return ret;
+	}
+
 	fsl_dev->tcon = fsl_tcon_init(dev);
 
 	drm = drm_dev_alloc(driver, dev);
-- 
2.14.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux