Skip to content

Commit f730e7a

Browse files
Abhinav Kumarlumag
authored andcommitted
drm: remove drm_bridge_hpd_disable() from drm_bridge_connector_destroy()
drm_bridge_hpd_enable()/drm_bridge_hpd_disable() callbacks call into the respective driver's hpd_enable()/hpd_disable() ops. These ops control the HPD enable/disable logic which in some cases like MSM can be a dedicate hardware block to control the HPD. During probe_defer cases, a connector can be initialized and then later destroyed till the probe is retried. During connector destroy in these cases, the hpd_disable() callback gets called without a corresponding hpd_enable() leading to an unbalanced state potentially causing even a crash. This can be avoided by the respective drivers maintaining their own state logic to ensure that a hpd_disable() without a corresponding hpd_enable() just returns without doing anything. However, to have a generic fix it would be better to avoid the hpd_disable() callback from the connector destroy path and let the hpd_enable() / hpd_disable() balance be maintained by the corresponding drm_bridge_connector_enable_hpd() / drm_bridge_connector_disable_hpd() APIs which should get called by drm_kms_helper_disable_hpd(). changes in v2: - minor change in commit text (Dmitry) Signed-off-by: Abhinav Kumar <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a5b2dcb commit f730e7a

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

drivers/gpu/drm/drm_bridge_connector.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,6 @@ static void drm_bridge_connector_destroy(struct drm_connector *connector)
198198
struct drm_bridge_connector *bridge_connector =
199199
to_drm_bridge_connector(connector);
200200

201-
if (bridge_connector->bridge_hpd) {
202-
struct drm_bridge *hpd = bridge_connector->bridge_hpd;
203-
204-
drm_bridge_hpd_disable(hpd);
205-
}
206-
207201
drm_connector_unregister(connector);
208202
drm_connector_cleanup(connector);
209203

0 commit comments

Comments
 (0)