summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/displays
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-09-04 22:53:34 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2019-03-18 10:42:11 +0100
commitb49a2139ba67da43915a483a2a7e8490ba6c2b57 (patch)
treeb73ef84772f0226b70fc1cca50cda3963b0c272a /drivers/gpu/drm/omapdrm/displays
parentdrm/omap: Remove connection checks from internal encoders .enable() (diff)
downloadlinux-b49a2139ba67da43915a483a2a7e8490ba6c2b57.tar.xz
linux-b49a2139ba67da43915a483a2a7e8490ba6c2b57.zip
drm/omap: Remove connection checks from display .enable() and .remove()
The displays (connectors, panels and encoders) return an error from their .enable() handler when the dss device is not connected. They also disconnect the dss device explicitly from their .remove() handler if it is still connected. Those safety checks are not needed: - The .enable() handler is called from code paths that access the dss devices chain from the display device, which is set to NULL when the device isn't connected. - The .remove() handler can only be called when unloading the module as the driver has the suppress_bind_attrs attribute set, and a reference to the module is taken when constructing the dss devices chain, so the module can only be unloaded when the dss device is disconnected. Remove the safety checks. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/displays')
-rw-r--r--drivers/gpu/drm/omapdrm/displays/encoder-opa362.c7
-rw-r--r--drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c7
-rw-r--r--drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c4
3 files changed, 0 insertions, 18 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
index 4fefd80f53bb..0b1032625e42 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
@@ -49,9 +49,6 @@ static int opa362_enable(struct omap_dss_device *dssdev)
dev_dbg(dssdev->dev, "enable\n");
- if (!omapdss_device_is_connected(dssdev))
- return -ENODEV;
-
if (omapdss_device_is_enabled(dssdev))
return 0;
@@ -145,10 +142,6 @@ static int __exit opa362_remove(struct platform_device *pdev)
if (omapdss_device_is_enabled(dssdev))
opa362_disable(dssdev);
- WARN_ON(omapdss_device_is_connected(dssdev));
- if (omapdss_device_is_connected(dssdev))
- omapdss_device_disconnect(NULL, dssdev);
-
return 0;
}
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
index f1a748353279..fcc2dc5188a2 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
@@ -42,9 +42,6 @@ static int tfp410_enable(struct omap_dss_device *dssdev)
struct omap_dss_device *src = dssdev->src;
int r;
- if (!omapdss_device_is_connected(dssdev))
- return -ENODEV;
-
if (omapdss_device_is_enabled(dssdev))
return 0;
@@ -139,10 +136,6 @@ static int __exit tfp410_remove(struct platform_device *pdev)
if (omapdss_device_is_enabled(dssdev))
tfp410_disable(dssdev);
- WARN_ON(omapdss_device_is_connected(dssdev));
- if (omapdss_device_is_connected(dssdev))
- omapdss_device_disconnect(NULL, dssdev);
-
return 0;
}
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
index 94de55fd8884..1a2bc59bf104 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
@@ -229,10 +229,6 @@ static int __exit tpd_remove(struct platform_device *pdev)
if (omapdss_device_is_enabled(dssdev))
tpd_disable(dssdev);
- WARN_ON(omapdss_device_is_connected(dssdev));
- if (omapdss_device_is_connected(dssdev))
- omapdss_device_disconnect(NULL, dssdev);
-
return 0;
}