drm/bridge: lt8912b: Manually disable HPD only if it was enabled
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Fri, 4 Aug 2023 10:48:12 +0000 (13:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:59:09 +0000 (11:59 +0100)
commit5e5f9a11d47a60cffb0361aa52498cc6d99c7cd8
treee5e1f7791e469c3b0983ae4b621d1da9f584dd68
parentb65e3249f3ca96e3c736af889461d80d675feab6
drm/bridge: lt8912b: Manually disable HPD only if it was enabled

[ Upstream commit 6985c5efc4057bc79137807295d84ada3123d051 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/lontium-lt8912b.c