Commit 650e723c authored by Leo (Hanghong) Ma's avatar Leo (Hanghong) Ma Committed by Alex Deucher

drm/amd/amdgpu: Update update_config() logic

[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: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: default avatarLeo (Hanghong) Ma <hanghong.ma@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 975f543e
...@@ -398,15 +398,15 @@ static void update_config(void *handle, struct cp_psp_stream_config *config) ...@@ -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_display *display = &hdcp_work[link_index].display;
struct mod_hdcp_link *link = &hdcp_work[link_index].link; 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) { if (config->dpms_off) {
hdcp_remove_display(hdcp_work, link_index, aconnector); hdcp_remove_display(hdcp_work, link_index, aconnector);
return; return;
} }
memset(display, 0, sizeof(*display));
memset(link, 0, sizeof(*link));
display->index = aconnector->base.index;
display->state = MOD_HDCP_DISPLAY_ACTIVE; display->state = MOD_HDCP_DISPLAY_ACTIVE;
if (aconnector->dc_sink != NULL) if (aconnector->dc_sink != NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment