Skip to content

Commit

Permalink
drm/amd/amdgpu: Update update_config() logic
Browse files Browse the repository at this point in the history
[Why]
For MST case: when update_config is called to disable a stream,
this clears the settings for all the streams on that link.
We should only clear the settings for the stream that was disabled.

[How]
Clear the settings after the call to remove display is called.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Leo (Hanghong) Ma authored and Alex Deucher committed May 12, 2020
1 parent 975f543 commit 650e723
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,15 @@ static void update_config(void *handle, struct cp_psp_stream_config *config)
struct mod_hdcp_display *display = &hdcp_work[link_index].display;
struct mod_hdcp_link *link = &hdcp_work[link_index].link;

memset(display, 0, sizeof(*display));
memset(link, 0, sizeof(*link));

display->index = aconnector->base.index;

if (config->dpms_off) {
hdcp_remove_display(hdcp_work, link_index, aconnector);
return;
}

memset(display, 0, sizeof(*display));
memset(link, 0, sizeof(*link));

display->index = aconnector->base.index;
display->state = MOD_HDCP_DISPLAY_ACTIVE;

if (aconnector->dc_sink != NULL)
Expand Down

0 comments on commit 650e723

Please sign in to comment.