Skip to content

Commit

Permalink
drm/amd/display: Correctly cancel future watchdog and callback events
Browse files Browse the repository at this point in the history
[Why]
-We need to cancel future callbacks/watchdogs events when a callback/watchdog event happens

[How]
-fix typo in event_callback()
	-cancel callback, not watchdog
-cancel watchdog events in event_watchdog_timer().

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Bhawanpreet Lakha authored and Alex Deucher committed Mar 31, 2020
1 parent c2850c1 commit 2ebbe7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static void event_callback(struct work_struct *work)

mutex_lock(&hdcp_work->mutex);

cancel_delayed_work(&hdcp_work->watchdog_timer_dwork);
cancel_delayed_work(&hdcp_work->callback_dwork);

mod_hdcp_process_event(&hdcp_work->hdcp, MOD_HDCP_EVENT_CALLBACK,
&hdcp_work->output);
Expand Down Expand Up @@ -347,6 +347,8 @@ static void event_watchdog_timer(struct work_struct *work)

mutex_lock(&hdcp_work->mutex);

cancel_delayed_work(&hdcp_work->watchdog_timer_dwork);

mod_hdcp_process_event(&hdcp_work->hdcp,
MOD_HDCP_EVENT_WATCHDOG_TIMEOUT,
&hdcp_work->output);
Expand Down

0 comments on commit 2ebbe7c

Please sign in to comment.