diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2017-10-13 10:58:58 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-12-19 03:32:00 -0500 |
commit | 7fb15c480eea29a16f6a0568ce3ee5d5f40ef9c6 (patch) | |
tree | 3bea59f3e684bc2e4074fdb51bd5c91063bf211d | |
parent | 7a228a0d7e4e12c3bf1ee442d6c73aae39dc296a (diff) |
drm: omapdrm: Pass drm_device to omap_gem_resume()
The omap_gem_resume() function is internal to the driver. Pass it a
drm_device pointer that the caller already has instead of looking it up
from device data.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_drv.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_drv.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_gem.c | 7 |
3 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index c4bb261dfcd9..94ebd44a8ead 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c | |||
@@ -715,7 +715,7 @@ static int omap_drm_resume(struct device *dev) | |||
715 | 715 | ||
716 | drm_kms_helper_poll_enable(drm_dev); | 716 | drm_kms_helper_poll_enable(drm_dev); |
717 | 717 | ||
718 | return omap_gem_resume(dev); | 718 | return omap_gem_resume(drm_dev); |
719 | } | 719 | } |
720 | #endif | 720 | #endif |
721 | 721 | ||
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h index d404e8c56b61..50785964a2c8 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.h +++ b/drivers/gpu/drm/omapdrm/omap_drv.h | |||
@@ -97,7 +97,7 @@ void omap_gem_describe_objects(struct list_head *list, struct seq_file *m); | |||
97 | #endif | 97 | #endif |
98 | 98 | ||
99 | #ifdef CONFIG_PM | 99 | #ifdef CONFIG_PM |
100 | int omap_gem_resume(struct device *dev); | 100 | int omap_gem_resume(struct drm_device *dev); |
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | int omap_irq_enable_vblank(struct drm_crtc *crtc); | 103 | int omap_irq_enable_vblank(struct drm_crtc *crtc); |
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index 5c5c86ddd6f4..fd81396baaf9 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c | |||
@@ -996,10 +996,9 @@ void *omap_gem_vaddr(struct drm_gem_object *obj) | |||
996 | 996 | ||
997 | #ifdef CONFIG_PM | 997 | #ifdef CONFIG_PM |
998 | /* re-pin objects in DMM in resume path: */ | 998 | /* re-pin objects in DMM in resume path: */ |
999 | int omap_gem_resume(struct device *dev) | 999 | int omap_gem_resume(struct drm_device *dev) |
1000 | { | 1000 | { |
1001 | struct drm_device *drm_dev = dev_get_drvdata(dev); | 1001 | struct omap_drm_private *priv = dev->dev_private; |
1002 | struct omap_drm_private *priv = drm_dev->dev_private; | ||
1003 | struct omap_gem_object *omap_obj; | 1002 | struct omap_gem_object *omap_obj; |
1004 | int ret = 0; | 1003 | int ret = 0; |
1005 | 1004 | ||
@@ -1012,7 +1011,7 @@ int omap_gem_resume(struct device *dev) | |||
1012 | omap_obj->pages, npages, | 1011 | omap_obj->pages, npages, |
1013 | omap_obj->roll, true); | 1012 | omap_obj->roll, true); |
1014 | if (ret) { | 1013 | if (ret) { |
1015 | dev_err(dev, "could not repin: %d\n", ret); | 1014 | dev_err(dev->dev, "could not repin: %d\n", ret); |
1016 | return ret; | 1015 | return ret; |
1017 | } | 1016 | } |
1018 | } | 1017 | } |