2018-02-06 04:39:05 +00:00
|
|
|
From 177f92a14d8177124f37db0fafc11182e2dcdd62 Mon Sep 17 00:00:00 2001
|
2017-09-27 07:31:31 +00:00
|
|
|
From: Yangbo Lu <yangbo.lu@nxp.com>
|
2018-02-06 04:39:05 +00:00
|
|
|
Date: Wed, 17 Jan 2018 15:33:05 +0800
|
|
|
|
Subject: [PATCH 19/30] gpu: support layerscape
|
2017-09-27 07:31:31 +00:00
|
|
|
|
2018-02-06 04:39:05 +00:00
|
|
|
This is an integrated patch for layerscape dcu support.
|
2017-09-27 07:31:31 +00:00
|
|
|
|
|
|
|
Signed-off-by: Alison Wang <b18965@freescale.com>
|
|
|
|
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
|
|
|
---
|
2018-02-06 04:39:05 +00:00
|
|
|
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 15 ++++++++++++++-
|
|
|
|
1 file changed, 14 insertions(+), 1 deletion(-)
|
2017-09-27 07:31:31 +00:00
|
|
|
|
|
|
|
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
|
|
|
|
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
|
2017-10-08 13:34:37 +00:00
|
|
|
@@ -225,7 +225,6 @@ static int fsl_dcu_drm_pm_suspend(struct
|
2017-09-27 07:31:31 +00:00
|
|
|
if (!fsl_dev)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
- disable_irq(fsl_dev->irq);
|
|
|
|
drm_kms_helper_poll_disable(fsl_dev->drm);
|
|
|
|
|
|
|
|
console_lock();
|
2017-10-08 13:34:37 +00:00
|
|
|
@@ -243,6 +242,8 @@ static int fsl_dcu_drm_pm_suspend(struct
|
2017-09-27 07:31:31 +00:00
|
|
|
return PTR_ERR(fsl_dev->state);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ disable_irq(fsl_dev->irq);
|
|
|
|
+
|
|
|
|
clk_disable_unprepare(fsl_dev->clk);
|
|
|
|
|
2017-12-16 20:09:41 +00:00
|
|
|
return 0;
|
|
|
|
@@ -262,6 +263,12 @@ static int fsl_dcu_drm_pm_resume(struct
|
2017-09-27 07:31:31 +00:00
|
|
|
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);
|
2017-12-16 20:09:41 +00:00
|
|
|
@@ -388,6 +395,12 @@ static int fsl_dcu_drm_probe(struct plat
|
2017-09-27 07:31:31 +00:00
|
|
|
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);
|