mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 22:47:56 +00:00
74 lines
1.9 KiB
Diff
74 lines
1.9 KiB
Diff
|
From 4278a546526094dd57bfa3cf7ae2bf34092246db Mon Sep 17 00:00:00 2001
|
||
|
From: Yangbo Lu <yangbo.lu@nxp.com>
|
||
|
Date: Mon, 25 Sep 2017 12:10:01 +0800
|
||
|
Subject: [PATCH] gpu: support layerscape
|
||
|
|
||
|
This is a integrated patch for layerscape dcu support.
|
||
|
|
||
|
Signed-off-by: Alison Wang <b18965@freescale.com>
|
||
|
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||
|
---
|
||
|
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 18 ++++++++++++++++--
|
||
|
1 file changed, 16 insertions(+), 2 deletions(-)
|
||
|
|
||
|
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 cc2fde2a..54f60ba1 100644
|
||
|
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
|
||
|
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
|
||
|
@@ -225,7 +225,6 @@ static int fsl_dcu_drm_pm_suspend(struct device *dev)
|
||
|
if (!fsl_dev)
|
||
|
return 0;
|
||
|
|
||
|
- disable_irq(fsl_dev->irq);
|
||
|
drm_kms_helper_poll_disable(fsl_dev->drm);
|
||
|
|
||
|
console_lock();
|
||
|
@@ -243,6 +242,8 @@ static int fsl_dcu_drm_pm_suspend(struct device *dev)
|
||
|
return PTR_ERR(fsl_dev->state);
|
||
|
}
|
||
|
|
||
|
+ disable_irq(fsl_dev->irq);
|
||
|
+
|
||
|
clk_disable_unprepare(fsl_dev->pix_clk);
|
||
|
clk_disable_unprepare(fsl_dev->clk);
|
||
|
|
||
|
@@ -263,6 +264,14 @@ 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;
|
||
|
+ }
|
||
|
+
|
||
|
+ enable_irq(fsl_dev->irq);
|
||
|
+
|
||
|
if (fsl_dev->tcon)
|
||
|
fsl_tcon_bypass_enable(fsl_dev->tcon);
|
||
|
fsl_dcu_drm_init_planes(fsl_dev->drm);
|
||
|
@@ -273,7 +282,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;
|
||
|
}
|
||
|
@@ -389,6 +397,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
|
||
|
|