summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/bridge/lontium-lt8912b.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2023-08-04 13:48:12 +0300
committerRobert Foss <rfoss@kernel.org>2023-09-05 17:43:36 +0300
commit6985c5efc4057bc79137807295d84ada3123d051 (patch)
tree6fc8e301a3ed1099f3adc7c8f1268397c2eb15dd /drivers/gpu/drm/bridge/lontium-lt8912b.c
parent44283993144a03af9df31934d6c32bbd42d1a347 (diff)
downloadlinux-6985c5efc4057bc79137807295d84ada3123d051.tar.xz
drm/bridge: lt8912b: Manually disable HPD only if it was enabled
lt8912b only calls drm_bridge_hpd_enable() if it creates a connector and the next bridge has DRM_BRIDGE_OP_HPD set. However, when calling drm_bridge_hpd_disable() it misses checking if a connector was created, calling drm_bridge_hpd_disable() even if HPD was never enabled. I don't see any issues caused by this wrong call, though. Add the check to avoid wrongly calling drm_bridge_hpd_disable(). Fixes: 3b0a01a6a522 ("drm/bridge: lt8912b: Add hot plug detection") Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Robert Foss <rfoss@kernel.org> Signed-off-by: Robert Foss <rfoss@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230804-lt8912b-v1-3-c542692c6a2f@ideasonboard.com
Diffstat (limited to 'drivers/gpu/drm/bridge/lontium-lt8912b.c')
-rw-r--r--drivers/gpu/drm/bridge/lontium-lt8912b.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c
index 2d752e083433..9ee639e75a1c 100644
--- a/drivers/gpu/drm/bridge/lontium-lt8912b.c
+++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c
@@ -587,7 +587,7 @@ static void lt8912_bridge_detach(struct drm_bridge *bridge)
lt8912_hard_power_off(lt);
- if (lt->hdmi_port->ops & DRM_BRIDGE_OP_HPD)
+ if (lt->connector.dev && lt->hdmi_port->ops & DRM_BRIDGE_OP_HPD)
drm_bridge_hpd_disable(lt->hdmi_port);
}