diff options
author | Laurent Pinchart | 2018-09-04 22:53:34 +0200 |
---|---|---|
committer | Tomi Valkeinen | 2019-03-18 10:42:11 +0100 |
commit | f8a8eabb273b6810d0eb7546896e5da7974189a5 (patch) | |
tree | 4164c2690e005b7bd911c77f21961163fe5cbe7d /drivers/gpu/drm/omapdrm/dss/hdmi4.c | |
parent | drm/omap: Move common display enable/disable code to encoder (diff) | |
download | kernel-qcow2-linux-f8a8eabb273b6810d0eb7546896e5da7974189a5.tar.gz kernel-qcow2-linux-f8a8eabb273b6810d0eb7546896e5da7974189a5.tar.xz kernel-qcow2-linux-f8a8eabb273b6810d0eb7546896e5da7974189a5.zip |
drm/omap: Remove connection checks from internal encoders .enable()
The internal encoders return an error from their .enable() handler when
their are not connected to a dss manager. As the flag used is set and
cleared in the connect and disconnect handlers, this effectively checks
whether the omap_dss_device is connected.
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, making it impossible to access the device in
that case.
The safety check is thus not needed, remove it.
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/dss/hdmi4.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/hdmi4.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index aabdda394c9c..b6b44f07c74e 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c @@ -322,12 +322,6 @@ static int hdmi_display_enable(struct omap_dss_device *dssdev) mutex_lock(&hdmi->lock); - if (!dssdev->dispc_channel_connected) { - DSSERR("failed to enable display: no output/manager\n"); - r = -ENODEV; - goto err0; - } - r = hdmi_power_on_full(hdmi); if (r) { DSSERR("failed to power on device\n"); @@ -417,21 +411,12 @@ void hdmi4_core_disable(struct hdmi_core_data *core) static int hdmi_connect(struct omap_dss_device *src, struct omap_dss_device *dst) { - int r; - - r = omapdss_device_connect(dst->dss, dst, dst->next); - if (r) - return r; - - dst->dispc_channel_connected = true; - return 0; + return omapdss_device_connect(dst->dss, dst, dst->next); } static void hdmi_disconnect(struct omap_dss_device *src, struct omap_dss_device *dst) { - dst->dispc_channel_connected = false; - omapdss_device_disconnect(dst, dst->next); } |