diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-08-15 16:04:20 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-08-16 16:21:07 +0300 |
commit | 4161f200ff380b0703c7bfa8df9615cc7fd76ba7 (patch) | |
tree | d989f26dced0fcf3093d417e825ac699f490132f /drivers/gpu | |
parent | f64eafa0c82e4dfca68dad61889a63770ef75e07 (diff) | |
download | linux-4161f200ff380b0703c7bfa8df9615cc7fd76ba7.tar.xz |
drm/omap: remove no-op cleanup code
The driver sets crtc and plane rotation properties back to 0 degrees in
dev_lastclose() using drm_object_property_set_value().
drm_object_property_set_value() doesn't do anything with atomic drivers,
and a recent change added WARN_ON() when atomic driver calls the
function.
So remove the code.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_drv.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index 9a14553265d8..9b3c36b48356 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -464,44 +464,11 @@ static int dev_open(struct drm_device *dev, struct drm_file *file) */ static void dev_lastclose(struct drm_device *dev) { - int i; - - /* we don't support vga_switcheroo.. so just make sure the fbdev - * mode is active - */ struct omap_drm_private *priv = dev->dev_private; int ret; DBG("lastclose: dev=%p", dev); - /* need to restore default rotation state.. not sure - * if there is a cleaner way to restore properties to - * default state? Maybe a flag that properties should - * automatically be restored to default state on - * lastclose? - */ - for (i = 0; i < priv->num_crtcs; i++) { - struct drm_crtc *crtc = priv->crtcs[i]; - - if (!crtc->primary->rotation_property) - continue; - - drm_object_property_set_value(&crtc->base, - crtc->primary->rotation_property, - DRM_MODE_ROTATE_0); - } - - for (i = 0; i < priv->num_planes; i++) { - struct drm_plane *plane = priv->planes[i]; - - if (!plane->rotation_property) - continue; - - drm_object_property_set_value(&plane->base, - plane->rotation_property, - DRM_MODE_ROTATE_0); - } - if (priv->fbdev) { ret = drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev); if (ret) |