aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-08-15 09:04:20 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-08-16 09:21:07 -0400
commit4161f200ff380b0703c7bfa8df9615cc7fd76ba7 (patch)
treed989f26dced0fcf3093d417e825ac699f490132f
parentf64eafa0c82e4dfca68dad61889a63770ef75e07 (diff)
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>
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.c33
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)
464 */ 464 */
465static void dev_lastclose(struct drm_device *dev) 465static void dev_lastclose(struct drm_device *dev)
466{ 466{
467 int i;
468
469 /* we don't support vga_switcheroo.. so just make sure the fbdev
470 * mode is active
471 */
472 struct omap_drm_private *priv = dev->dev_private; 467 struct omap_drm_private *priv = dev->dev_private;
473 int ret; 468 int ret;
474 469
475 DBG("lastclose: dev=%p", dev); 470 DBG("lastclose: dev=%p", dev);
476 471
477 /* need to restore default rotation state.. not sure
478 * if there is a cleaner way to restore properties to
479 * default state? Maybe a flag that properties should
480 * automatically be restored to default state on
481 * lastclose?
482 */
483 for (i = 0; i < priv->num_crtcs; i++) {
484 struct drm_crtc *crtc = priv->crtcs[i];
485
486 if (!crtc->primary->rotation_property)
487 continue;
488
489 drm_object_property_set_value(&crtc->base,
490 crtc->primary->rotation_property,
491 DRM_MODE_ROTATE_0);
492 }
493
494 for (i = 0; i < priv->num_planes; i++) {
495 struct drm_plane *plane = priv->planes[i];
496
497 if (!plane->rotation_property)
498 continue;
499
500 drm_object_property_set_value(&plane->base,
501 plane->rotation_property,
502 DRM_MODE_ROTATE_0);
503 }
504
505 if (priv->fbdev) { 472 if (priv->fbdev) {
506 ret = drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev); 473 ret = drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
507 if (ret) 474 if (ret)