summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_drv.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-06-01 19:45:01 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 16:13:29 +0300
commit83910ad3f51fbc0e6546b60aafa90697b5127a8a (patch)
tree34a3d047e651e5ea8923ef40f360430f31d1713f /drivers/gpu/drm/omapdrm/omap_drv.c
parente7df6571024ba791c6521efba5b3875724c47af6 (diff)
downloadlinux-83910ad3f51fbc0e6546b60aafa90697b5127a8a.tar.bz2
drm/omap: Move most omap_dss_driver operations to omap_dss_device_ops
omap_dss_device instances have two ops structures, omap_dss_driver and omap_dss_device_ops. The former is used for devices at the end of the pipeline (a.k.a. display devices), and the latter for intermediate devices. Having two sets of operations isn't convenient as code that iterates over omap_dss_device instances need to take them both into account. There's currently a reasonably small amount of such code, but more will be introduced to move the driver away from recursive operations. To simplify current and future code, move all operations that are not specific to the display device to the omap_dss_device_ops. 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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_drv.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index d0f6929857bb..843222118fa7 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -378,8 +378,8 @@ static void omap_modeset_enable_external_hpd(struct drm_device *ddev)
for (i = 0; i < priv->num_pipes; i++) {
struct omap_dss_device *display = priv->pipes[i].display;
- if (display->driver->enable_hpd)
- display->driver->enable_hpd(display);
+ if (display->ops->enable_hpd)
+ display->ops->enable_hpd(display);
}
}
@@ -394,8 +394,8 @@ static void omap_modeset_disable_external_hpd(struct drm_device *ddev)
for (i = 0; i < priv->num_pipes; i++) {
struct omap_dss_device *display = priv->pipes[i].display;
- if (display->driver->disable_hpd)
- display->driver->disable_hpd(display);
+ if (display->ops->disable_hpd)
+ display->ops->disable_hpd(display);
}
}
@@ -724,7 +724,7 @@ static int omap_drm_suspend_all_displays(struct drm_device *ddev)
struct omap_dss_device *display = priv->pipes[i].display;
if (display->state == OMAP_DSS_DISPLAY_ACTIVE) {
- display->driver->disable(display);
+ display->ops->disable(display);
display->activate_after_resume = true;
} else {
display->activate_after_resume = false;
@@ -743,7 +743,7 @@ static int omap_drm_resume_all_displays(struct drm_device *ddev)
struct omap_dss_device *display = priv->pipes[i].display;
if (display->activate_after_resume) {
- display->driver->enable(display);
+ display->ops->enable(display);
display->activate_after_resume = false;
}
}