aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_drv.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-03-29 07:51:04 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 09:13:28 -0400
commita4e9ecf4bb19f13bbd346fae646e7d9ce33db3b8 (patch)
tree02fd0692dfe26157e7d8ef051582c98ff2268702 /drivers/gpu/drm/omapdrm/omap_drv.c
parent6f7ae8c29242df34386ba9cbbc77ba21f69ac18e (diff)
drm/omap: Remove unnecessary display output sanity checks
The omapdrm driver checks at suspend and resume time whether the displays it operates on have their driver operations set. This check is unneeded, as all display drivers set the driver operations field at probe time and never touch it afterwards. This is furthermore proven by the dereferencing of the driver field without checking it first in several locations. The omapdss driver performs a similar check at shutdown time. This is unneeded as well, as the for_each_dss_display() macro it uses to iterate over displays locates the displays by checking the driver field internally. As those checks are unnecessary, remove them. 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.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index f2a69cfb6ebf..d0f6929857bb 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -723,9 +723,6 @@ static int omap_drm_suspend_all_displays(struct drm_device *ddev)
723 for (i = 0; i < priv->num_pipes; i++) { 723 for (i = 0; i < priv->num_pipes; i++) {
724 struct omap_dss_device *display = priv->pipes[i].display; 724 struct omap_dss_device *display = priv->pipes[i].display;
725 725
726 if (!display->driver)
727 continue;
728
729 if (display->state == OMAP_DSS_DISPLAY_ACTIVE) { 726 if (display->state == OMAP_DSS_DISPLAY_ACTIVE) {
730 display->driver->disable(display); 727 display->driver->disable(display);
731 display->activate_after_resume = true; 728 display->activate_after_resume = true;
@@ -745,9 +742,6 @@ static int omap_drm_resume_all_displays(struct drm_device *ddev)
745 for (i = 0; i < priv->num_pipes; i++) { 742 for (i = 0; i < priv->num_pipes; i++) {
746 struct omap_dss_device *display = priv->pipes[i].display; 743 struct omap_dss_device *display = priv->pipes[i].display;
747 744
748 if (!display->driver)
749 continue;
750
751 if (display->activate_after_resume) { 745 if (display->activate_after_resume) {
752 display->driver->enable(display); 746 display->driver->enable(display);
753 display->activate_after_resume = false; 747 display->activate_after_resume = false;