lkml.org 
[lkml]   [2022]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 05/26] drm: tegra: Use the dev_pm_ops provided by modeset helper
Date
Use the drm_mode_config_pm_ops structure exported by
drm_modeset_helper.c, which provides the exact same PM callbacks.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
---
drivers/gpu/drm/tegra/drm.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index 6748ec1e0005..c9b6b3acb8c7 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -1325,25 +1325,6 @@ static int host1x_drm_remove(struct host1x_device *dev)
return 0;
}

-#ifdef CONFIG_PM_SLEEP
-static int host1x_drm_suspend(struct device *dev)
-{
- struct drm_device *drm = dev_get_drvdata(dev);
-
- return drm_mode_config_helper_suspend(drm);
-}
-
-static int host1x_drm_resume(struct device *dev)
-{
- struct drm_device *drm = dev_get_drvdata(dev);
-
- return drm_mode_config_helper_resume(drm);
-}
-#endif
-
-static SIMPLE_DEV_PM_OPS(host1x_drm_pm_ops, host1x_drm_suspend,
- host1x_drm_resume);
-
static const struct of_device_id host1x_drm_subdevs[] = {
{ .compatible = "nvidia,tegra20-dc", },
{ .compatible = "nvidia,tegra20-hdmi", },
@@ -1388,7 +1369,7 @@ static const struct of_device_id host1x_drm_subdevs[] = {
static struct host1x_driver host1x_drm_driver = {
.driver = {
.name = "drm",
- .pm = &host1x_drm_pm_ops,
+ .pm = pm_sleep_ptr(&drm_mode_config_pm_ops),
},
.probe = host1x_drm_probe,
.remove = host1x_drm_remove,
--
2.35.1
\
 
 \ /
  Last update: 2022-11-07 18:52    [W:0.250 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site