* [PATCH] drm/amd/amdgpu: Update update_config() logic
@ 2020-05-11 19:28 Leo (Hanghong) Ma
2020-05-11 19:46 ` Harry Wentland
0 siblings, 1 reply; 5+ messages in thread
From: Leo (Hanghong) Ma @ 2020-05-11 19:28 UTC (permalink / raw)
To: bhawanpreet.lakha, amd-gfx; +Cc: Leo (Hanghong) Ma, harry.wentland
[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
Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
index 78e1c11d4ae5..dcf84a61de37 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
@@ -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)
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: Update update_config() logic
2020-05-11 19:28 [PATCH] drm/amd/amdgpu: Update update_config() logic Leo (Hanghong) Ma
@ 2020-05-11 19:46 ` Harry Wentland
2020-05-11 19:48 ` Ma, Hanghong
0 siblings, 1 reply; 5+ messages in thread
From: Harry Wentland @ 2020-05-11 19:46 UTC (permalink / raw)
To: Leo (Hanghong) Ma, bhawanpreet.lakha, amd-gfx; +Cc: harry.wentland
On 2020-05-11 3:28 p.m., Leo (Hanghong) Ma wrote:
> [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.
> Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> index 78e1c11d4ae5..dcf84a61de37 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> @@ -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)
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] drm/amd/amdgpu: Update update_config() logic
2020-05-11 19:46 ` Harry Wentland
@ 2020-05-11 19:48 ` Ma, Hanghong
2020-05-11 19:51 ` Lakha, Bhawanpreet
0 siblings, 1 reply; 5+ messages in thread
From: Ma, Hanghong @ 2020-05-11 19:48 UTC (permalink / raw)
To: Wentland, Harry; +Cc: Lakha, Bhawanpreet, amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Thanks Harry.
I will drop the Change-Id before merging.
-Leo
-----Original Message-----
From: Wentland, Harry <Harry.Wentland@amd.com>
Sent: Monday, May 11, 2020 3:46 PM
To: Ma, Hanghong <Hanghong.Ma@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; amd-gfx@lists.freedesktop.org
Cc: Wentland, Harry <Harry.Wentland@amd.com>
Subject: Re: [PATCH] drm/amd/amdgpu: Update update_config() logic
On 2020-05-11 3:28 p.m., Leo (Hanghong) Ma wrote:
> [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.
> Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10
> +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> index 78e1c11d4ae5..dcf84a61de37 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> @@ -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)
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amd/amdgpu: Update update_config() logic
2020-05-11 19:48 ` Ma, Hanghong
@ 2020-05-11 19:51 ` Lakha, Bhawanpreet
2020-05-11 20:20 ` Ma, Hanghong
0 siblings, 1 reply; 5+ messages in thread
From: Lakha, Bhawanpreet @ 2020-05-11 19:51 UTC (permalink / raw)
To: Ma, Hanghong, Wentland, Harry; +Cc: amd-gfx
[-- Attachment #1.1: Type: text/plain, Size: 2724 bytes --]
[AMD Official Use Only - Internal Distribution Only]
Reviewed-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
________________________________
From: Ma, Hanghong <Hanghong.Ma@amd.com>
Sent: May 11, 2020 3:48 PM
To: Wentland, Harry <Harry.Wentland@amd.com>
Cc: Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
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 <Harry.Wentland@amd.com>
Sent: Monday, May 11, 2020 3:46 PM
To: Ma, Hanghong <Hanghong.Ma@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; amd-gfx@lists.freedesktop.org
Cc: Wentland, Harry <Harry.Wentland@amd.com>
Subject: Re: [PATCH] drm/amd/amdgpu: Update update_config() logic
On 2020-05-11 3:28 p.m., Leo (Hanghong) Ma wrote:
> [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.
> Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10
> +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> index 78e1c11d4ae5..dcf84a61de37 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> @@ -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)
>
[-- Attachment #1.2: Type: text/html, Size: 4603 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] drm/amd/amdgpu: Update update_config() logic
2020-05-11 19:51 ` Lakha, Bhawanpreet
@ 2020-05-11 20:20 ` Ma, Hanghong
0 siblings, 0 replies; 5+ messages in thread
From: Ma, Hanghong @ 2020-05-11 20:20 UTC (permalink / raw)
To: Lakha, Bhawanpreet, Wentland, Harry; +Cc: amd-gfx
[-- Attachment #1.1: Type: text/plain, Size: 3577 bytes --]
[AMD Official Use Only - Internal Distribution Only]
[AMD Official Use Only - Internal Distribution Only]
Merged.
Thanks for review.
-Leo
From: Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>
Sent: Monday, May 11, 2020 3:51 PM
To: Ma, Hanghong <Hanghong.Ma@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/amdgpu: Update update_config() logic
[AMD Official Use Only - Internal Distribution Only]
Reviewed-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com<mailto:Bhawanpreet.Lakha@amd.com>>
________________________________
From: Ma, Hanghong <Hanghong.Ma@amd.com<mailto:Hanghong.Ma@amd.com>>
Sent: May 11, 2020 3:48 PM
To: Wentland, Harry <Harry.Wentland@amd.com<mailto:Harry.Wentland@amd.com>>
Cc: Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com<mailto:Bhawanpreet.Lakha@amd.com>>; amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org> <amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>>
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 <Harry.Wentland@amd.com<mailto:Harry.Wentland@amd.com>>
Sent: Monday, May 11, 2020 3:46 PM
To: Ma, Hanghong <Hanghong.Ma@amd.com<mailto:Hanghong.Ma@amd.com>>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com<mailto:Bhawanpreet.Lakha@amd.com>>; amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>
Cc: Wentland, Harry <Harry.Wentland@amd.com<mailto:Harry.Wentland@amd.com>>
Subject: Re: [PATCH] drm/amd/amdgpu: Update update_config() logic
On 2020-05-11 3:28 p.m., Leo (Hanghong) Ma wrote:
> [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.
> Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com<mailto:hanghong.ma@amd.com>>
Reviewed-by: Harry Wentland <harry.wentland@amd.com<mailto:harry.wentland@amd.com>>
Harry
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10
> +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> index 78e1c11d4ae5..dcf84a61de37 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> @@ -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)
>
[-- Attachment #1.2: Type: text/html, Size: 8297 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-11 20:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 19:28 [PATCH] drm/amd/amdgpu: Update update_config() logic Leo (Hanghong) Ma
2020-05-11 19:46 ` Harry Wentland
2020-05-11 19:48 ` Ma, Hanghong
2020-05-11 19:51 ` Lakha, Bhawanpreet
2020-05-11 20:20 ` Ma, Hanghong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.