summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tilcdc
diff options
context:
space:
mode:
authorSouptick Joarder <jrdr.linux@gmail.com>2018-08-08 18:16:41 +0200
committerJyri Sarha <jsarha@ti.com>2018-10-01 14:52:29 +0200
commit4fdce78ab90173191fa9f472b47b9cbdacbc3edd (patch)
tree647292be0139e786d2d46a1f0cb99dcf01de9c51 /drivers/gpu/drm/tilcdc
parentLinux 4.19-rc6 (diff)
downloadlinux-4fdce78ab90173191fa9f472b47b9cbdacbc3edd.tar.xz
linux-4fdce78ab90173191fa9f472b47b9cbdacbc3edd.zip
drm/tilcdc: Convert drm_atomic_helper_suspend/resume()
convert drm_atomic_helper_suspend/resume() to use drm_mode_config_helper_suspend/resume(). saved_state in tilcdc_drm_private will not be used anymore, so it can be removed. Signed-off-by: Ajit Negi <ajitn.linux@gmail.com> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Tested-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Jyri Sarha <jsarha@ti.com>
Diffstat (limited to 'drivers/gpu/drm/tilcdc')
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_drv.c14
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_drv.h3
2 files changed, 4 insertions, 13 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 0fb300d41a09..33e533268488 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -554,29 +554,23 @@ static struct drm_driver tilcdc_driver = {
static int tilcdc_pm_suspend(struct device *dev)
{
struct drm_device *ddev = dev_get_drvdata(dev);
- struct tilcdc_drm_private *priv = ddev->dev_private;
+ int ret = 0;
- priv->saved_state = drm_atomic_helper_suspend(ddev);
+ ret = drm_mode_config_helper_suspend(ddev);
/* Select sleep pin state */
pinctrl_pm_select_sleep_state(dev);
- return 0;
+ return ret;
}
static int tilcdc_pm_resume(struct device *dev)
{
struct drm_device *ddev = dev_get_drvdata(dev);
- struct tilcdc_drm_private *priv = ddev->dev_private;
- int ret = 0;
/* Select default pin state */
pinctrl_pm_select_default_state(dev);
-
- if (priv->saved_state)
- ret = drm_atomic_helper_resume(ddev, priv->saved_state);
-
- return ret;
+ return drm_mode_config_helper_resume(ddev);
}
#endif
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index ead512216669..62cea5ff5558 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -70,9 +70,6 @@ struct tilcdc_drm_private {
const uint32_t *pixelformats;
uint32_t num_pixelformats;
- /* The context for pm susped/resume cycle is stored here */
- struct drm_atomic_state *saved_state;
-
#ifdef CONFIG_CPU_FREQ
struct notifier_block freq_transition;
#endif