Skip to content

Commit 3528cae

Browse files
Leo (Hanghong) Maalexdeucher
authored andcommitted
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: Harry Wentland <[email protected]> Reviewed-by: Bhawanpreet Lakha <[email protected]> Signed-off-by: Leo (Hanghong) Ma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 2c60129 commit 3528cae

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -398,15 +398,15 @@ static void update_config(void *handle, struct cp_psp_stream_config *config)
398398
struct mod_hdcp_display *display = &hdcp_work[link_index].display;
399399
struct mod_hdcp_link *link = &hdcp_work[link_index].link;
400400

401-
memset(display, 0, sizeof(*display));
402-
memset(link, 0, sizeof(*link));
403-
404-
display->index = aconnector->base.index;
405-
406401
if (config->dpms_off) {
407402
hdcp_remove_display(hdcp_work, link_index, aconnector);
408403
return;
409404
}
405+
406+
memset(display, 0, sizeof(*display));
407+
memset(link, 0, sizeof(*link));
408+
409+
display->index = aconnector->base.index;
410410
display->state = MOD_HDCP_DISPLAY_ACTIVE;
411411

412412
if (aconnector->dc_sink != NULL)

0 commit comments

Comments
 (0)