Skip to contentSkip to conversation

drm/amd/amdgpu: Update update_config() logic

PATCH In review Leo (Hanghong) Ma 3 participants 5 messages May 11, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Change-Id I8235998b8fac3d58d24edf86bb5d7cc030f1e375
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +5 -5
index 78e1c11d4ae5..dcf84a61de37 100644
@@ -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)
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Leo (Hanghong) Ma

[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.

Change-Id: I8235998b8fac3d58d24edf86bb5d7cc030f1e375

Please drop the Change-Id before merging.

Quoted 1 line

Harry

Quoted 20 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +0 -5
index 78e1c11d4ae5..dcf84a61de37 100644
@@ -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);

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c static void update_config(void *handle, struct cp_psp_stream_config *config) · line 412

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +5 -0
 		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)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author Reviewed-by Harry Wentland
#2 lore raw

[AMD Official Use Only - Internal Distribution Only]

Thanks Harry.
I will drop the Change-Id before merging.

-Leo

-----Original Message-----
From: Wentland, Harry <[email protected]>
Sent: Monday, May 11, 2020 3:46 PM
To: Ma, Hanghong <[email protected]>; Lakha, Bhawanpreet <[email protected]>; [email protected]
Cc: Wentland, Harry <[email protected]>
Subject: Re: [PATCH] drm/amd/amdgpu: Update update_config() logic

Quoted 9 lines · Leo (Hanghong) Ma

[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.

Change-Id: I8235998b8fac3d58d24edf86bb5d7cc030f1e375

Please drop the Change-Id before merging.

Quoted 1 line

Harry

Quoted 22 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10 
+++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +0 -5
index 78e1c11d4ae5..dcf84a61de37 100644
@@ -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);

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c static void update_config(void *handle, struct cp_psp_stream_config *config) · line 412

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +5 -0
 		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)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Reviewed-by Harry Wentland
#3 lore raw

[AMD Official Use Only - Internal Distribution Only]

________________________________
From: Ma, Hanghong <[email protected]>
Sent: May 11, 2020 3:48 PM
To: Wentland, Harry <[email protected]>
Cc: Lakha, Bhawanpreet <[email protected]>; [email protected] <[email protected]>
Subject: RE: [PATCH] drm/amd/amdgpu: Update update_config() logic

[AMD Official Use Only - Internal Distribution Only]

Thanks Harry.
I will drop the Change-Id before merging.

-Leo

-----Original Message-----
From: Wentland, Harry <[email protected]>
Sent: Monday, May 11, 2020 3:46 PM
To: Ma, Hanghong <[email protected]>; Lakha, Bhawanpreet <[email protected]>; [email protected]
Cc: Wentland, Harry <[email protected]>
Subject: Re: [PATCH] drm/amd/amdgpu: Update update_config() logic

Quoted 9 lines · Leo (Hanghong) Ma

[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.

Change-Id: I8235998b8fac3d58d24edf86bb5d7cc030f1e375

Please drop the Change-Id before merging.

Quoted 1 line

Harry

Quoted 22 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10
+++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +0 -5
index 78e1c11d4ae5..dcf84a61de37 100644
@@ -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);

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c static void update_config(void *handle, struct cp_psp_stream_config *config) · line 412

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +5 -0
               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)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author Reviewed-by Bhawanpreet Lakha Reviewed-by Harry Wentland
#4 lore raw

[AMD Official Use Only - Internal Distribution Only]

[AMD Official Use Only - Internal Distribution Only]

Merged.
Thanks for review.

-Leo
From: Lakha, Bhawanpreet <[email protected]>
Sent: Monday, May 11, 2020 3:51 PM
To: Ma, Hanghong <[email protected]>; Wentland, Harry <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amd/amdgpu: Update update_config() logic

[AMD Official Use Only - Internal Distribution Only]

________________________________
From: Ma, Hanghong <[email protected]<mailto:[email protected]>>
Sent: May 11, 2020 3:48 PM
To: Wentland, Harry <[email protected]<mailto:[email protected]>>
Cc: Lakha, Bhawanpreet <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Subject: RE: [PATCH] drm/amd/amdgpu: Update update_config() logic

[AMD Official Use Only - Internal Distribution Only]

Thanks Harry.
I will drop the Change-Id before merging.

-Leo

-----Original Message-----
From: Wentland, Harry <[email protected]<mailto:[email protected]>>
Sent: Monday, May 11, 2020 3:46 PM
To: Ma, Hanghong <[email protected]<mailto:[email protected]>>; Lakha, Bhawanpreet <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]>
Cc: Wentland, Harry <[email protected]<mailto:[email protected]>>
Subject: Re: [PATCH] drm/amd/amdgpu: Update update_config() logic

Quoted 9 lines · Leo (Hanghong) Ma

[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.

Change-Id: I8235998b8fac3d58d24edf86bb5d7cc030f1e375

Please drop the Change-Id before merging.

Quoted 1 line

Harry

Quoted 22 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10
+++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +0 -5
index 78e1c11d4ae5..dcf84a61de37 100644
@@ -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);

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c static void update_config(void *handle, struct cp_psp_stream_config *config) · line 412

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +5 -0
               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)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx