Skip to content

Commit ff763ac

Browse files
Ivan Lipskigregkh
authored andcommitted
drm/amd/display: Clear HDMI HPD pending work only if it is enabled
commit 17b2c52 upstream. [Why&How] On amdgpu_dm_connector_destroy(), the driver attempts to cancel pending HDMI HPD work without checking if the HDMI HPD is enabled. Added a check that it is enabled before clearing it. Fixes: 6a681cd ("drm/amd/display: Add an hdmi_hpd_debounce_delay_ms module") Signed-off-by: Ivan Lipski <ivan.lipski@amd.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5566ebc commit ff763ac

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7548,10 +7548,12 @@ static void amdgpu_dm_connector_destroy(struct drm_connector *connector)
75487548
drm_dp_mst_topology_mgr_destroy(&aconnector->mst_mgr);
75497549

75507550
/* Cancel and flush any pending HDMI HPD debounce work */
7551-
cancel_delayed_work_sync(&aconnector->hdmi_hpd_debounce_work);
7552-
if (aconnector->hdmi_prev_sink) {
7553-
dc_sink_release(aconnector->hdmi_prev_sink);
7554-
aconnector->hdmi_prev_sink = NULL;
7551+
if (aconnector->hdmi_hpd_debounce_delay_ms) {
7552+
cancel_delayed_work_sync(&aconnector->hdmi_hpd_debounce_work);
7553+
if (aconnector->hdmi_prev_sink) {
7554+
dc_sink_release(aconnector->hdmi_prev_sink);
7555+
aconnector->hdmi_prev_sink = NULL;
7556+
}
75557557
}
75567558

75577559
if (aconnector->bl_idx != -1) {

0 commit comments

Comments
 (0)