drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14

Submitted by Wu, Hersen on Nov. 2, 2019, 1:37 a.m.

Details

Message ID BL0PR12MB23395743667E0F1089F432F4FD7D0@BL0PR12MB2339.namprd12.prod.outlook.com
State New
Headers show
Series "drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14" ( rev: 4 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Wu, Hersen Nov. 2, 2019, 1:37 a.m.
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>



-----Original Message-----
From: Liu, Zhan <Zhan.Liu@amd.com> 
Sent: Friday, November 1, 2019 9:35 PM
To: Wu, Hersen <hersenxs.wu@amd.com>; amd-gfx@lists.freedesktop.org; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Li, Roman <Roman.Li@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>
Cc: Yeh, Eagle <Eagle.Yeh@amd.com>; Lazare, Jordan <Jordan.Lazare@amd.com>
Subject: RE: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14

Thank you Hersen. Please check the updated patch:

From: Liu, Zhan <Zhan.Liu@amd.com>
Sent: Friday, November 1, 2019 9:18 PM
To: amd-gfx@lists.freedesktop.org; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Li, Roman <Roman.Li@amd.com>; Liu, Zhan <Zhan.Liu@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Wu, Hersen <hersenxs.wu@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>
Cc: Yeh, Eagle <Eagle.Yeh@amd.com>; Lazare, Jordan <Jordan.Lazare@amd.com>
Subject: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14

From: Zhan liu <zhan.liu@amd.com>
Date: Fri, 1 Nov 2019 21:10:17 -0400
Subject: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14

[Why]
Navi10 has 6 PHY, but Navi14 only has 5 PHY, that is because there is no ENGINE_ID_DIGD in Navi14. Without this patch, many HDMI related issues (e.g. HDMI S3 resume failure, HDMI pink screen on boot) will be observed.

[How]
If eng_id is larger than ENGINE_ID_DIGD, then add eng_id by 1.

Signed-off-by: Zhan liu <zhan.liu@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 +++
 1 file changed, 5 insertions(+)

--
2.21.0

> -----Original Message-----
> From: Wu, Hersen <hersenxs.wu@amd.com>
> Sent: 2019/November/01, Friday 9:23 PM
> To: Liu, Zhan <Zhan.Liu@amd.com>; amd-gfx@lists.freedesktop.org; 
> Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Lakha, Bhawanpreet 
> <Bhawanpreet.Lakha@amd.com>; Li, Roman <Roman.Li@amd.com>; Siqueira, 
> Rodrigo <Rodrigo.Siqueira@amd.com>; Wentland, Harry 
> <Harry.Wentland@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>
> Cc: Yeh, Eagle <Eagle.Yeh@amd.com>; Lazare, Jordan 
> <Jordan.Lazare@amd.com>
> Subject: RE: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition 
> check for Navi14
> 
> Hi Zhan,
> 
> The function is shared by NV10,12,14.
> 
> Please add ASIC ID check  for the DIG D skip.
> 
> Thanks!
> Hersen
> 
> 
> -----Original Message-----
> From: Liu, Zhan <Zhan.Liu@amd.com>
> Sent: Friday, November 1, 2019 9:18 PM
> To: amd-gfx@lists.freedesktop.org; Kazlauskas, Nicholas 
> <Nicholas.Kazlauskas@amd.com>; Lakha, Bhawanpreet 
> <Bhawanpreet.Lakha@amd.com>; Li, Roman <Roman.Li@amd.com>; Liu, Zhan 
> <Zhan.Liu@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; 
> Wentland, Harry <Harry.Wentland@amd.com>; Wu, Hersen 
> <hersenxs.wu@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>
> Cc: Yeh, Eagle <Eagle.Yeh@amd.com>; Lazare, Jordan 
> <Jordan.Lazare@amd.com>
> Subject: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check 
> for Navi14
> 
> From: Zhan liu <zhan.liu@amd.com>
> Date: Fri, 1 Nov 2019 21:10:17 -0400
> Subject: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check 
> for Navi14
> 
> [Why]
> Navi10 has 6 PHY, but Navi14 only has 5 PHY, that is because there is 
> no ENGINE_ID_DIGD in Navi14. Without this patch, many HDMI related 
> issues (e.g. HDMI S3 resume failure, HDMI pink screen on boot) will be observed.
> 
> [How]
> If eng_id is larger than ENGINE_ID_DIGD, then add eng_id by 1.
> 
> Signed-off-by: Zhan liu <zhan.liu@amd.com>
> ---
>  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> index 924c2e303588..cf886483e380 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> @@ -1152,6 +1152,9 @@ struct stream_encoder 
> *dcn20_stream_encoder_create(
>         if (!enc1)
>                 return NULL;
> 
> +       if (eng_id >= ENGINE_ID_DIGD)
> +               eng_id++;
> +
>         dcn20_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id,
>                                         &stream_enc_regs[eng_id],
>                                         &se_shift, &se_mask);
> --
> 2.21.0
> 
> _______________________________________________
> 
> amd-gfx mailing list
> 
> amd-gfx@lists.freedesktop.org
> 
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
index 924c2e303588..cf886483e380 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
@@ -1152,6 +1152,11 @@  struct stream_encoder *dcn20_stream_encoder_create(
        if (!enc1)
                return NULL;

+	if (ASIC_REV_IS_NAVI14_M(ctx->asic_id.hw_internal_rev)) {
+		if (eng_id >= ENGINE_ID_DIGD)
+			eng_id++;
+	}
+
        dcn20_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id,
                                        &stream_enc_regs[eng_id],
                                        &se_shift, &se_mask);

Comments

On 2019-11-01 9:37 p.m., Wu, Hersen wrote:
> 

> Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>

> 

> 

> 

> -----Original Message-----

> From: Liu, Zhan <Zhan.Liu@amd.com> 

> Sent: Friday, November 1, 2019 9:35 PM

> To: Wu, Hersen <hersenxs.wu@amd.com>; amd-gfx@lists.freedesktop.org; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Li, Roman <Roman.Li@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>

> Cc: Yeh, Eagle <Eagle.Yeh@amd.com>; Lazare, Jordan <Jordan.Lazare@amd.com>

> Subject: RE: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14

> 

> Thank you Hersen. Please check the updated patch:

> 

> From: Liu, Zhan <Zhan.Liu@amd.com>

> Sent: Friday, November 1, 2019 9:18 PM

> To: amd-gfx@lists.freedesktop.org; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Li, Roman <Roman.Li@amd.com>; Liu, Zhan <Zhan.Liu@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Wu, Hersen <hersenxs.wu@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>

> Cc: Yeh, Eagle <Eagle.Yeh@amd.com>; Lazare, Jordan <Jordan.Lazare@amd.com>

> Subject: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14

> 

> From: Zhan liu <zhan.liu@amd.com>

> Date: Fri, 1 Nov 2019 21:10:17 -0400

> Subject: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14

> 

> [Why]

> Navi10 has 6 PHY, but Navi14 only has 5 PHY, that is because there is no ENGINE_ID_DIGD in Navi14. Without this patch, many HDMI related issues (e.g. HDMI S3 resume failure, HDMI pink screen on boot) will be observed.


Are we sure it's always DIGD that's missing on Navi14? It just seems odd
that it's not the last one or that it's not harvested (i.e. potentially
being any one that's missing).

Harry

> 

> [How]

> If eng_id is larger than ENGINE_ID_DIGD, then add eng_id by 1.

> 

> Signed-off-by: Zhan liu <zhan.liu@amd.com>

> ---

>  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 +++

>  1 file changed, 5 insertions(+)

> 

> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

> index 924c2e303588..cf886483e380 100644

> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

> @@ -1152,6 +1152,11 @@ struct stream_encoder *dcn20_stream_encoder_create(

>         if (!enc1)

>                 return NULL;

> 

> +	if (ASIC_REV_IS_NAVI14_M(ctx->asic_id.hw_internal_rev)) {

> +		if (eng_id >= ENGINE_ID_DIGD)

> +			eng_id++;

> +	}

> +

>         dcn20_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id,

>                                         &stream_enc_regs[eng_id],

>                                         &se_shift, &se_mask);

> --

> 2.21.0

> 

>> -----Original Message-----

>> From: Wu, Hersen <hersenxs.wu@amd.com>

>> Sent: 2019/November/01, Friday 9:23 PM

>> To: Liu, Zhan <Zhan.Liu@amd.com>; amd-gfx@lists.freedesktop.org; 

>> Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Lakha, Bhawanpreet 

>> <Bhawanpreet.Lakha@amd.com>; Li, Roman <Roman.Li@amd.com>; Siqueira, 

>> Rodrigo <Rodrigo.Siqueira@amd.com>; Wentland, Harry 

>> <Harry.Wentland@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>

>> Cc: Yeh, Eagle <Eagle.Yeh@amd.com>; Lazare, Jordan 

>> <Jordan.Lazare@amd.com>

>> Subject: RE: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition 

>> check for Navi14

>>

>> Hi Zhan,

>>

>> The function is shared by NV10,12,14.

>>

>> Please add ASIC ID check  for the DIG D skip.

>>

>> Thanks!

>> Hersen

>>

>>

>> -----Original Message-----

>> From: Liu, Zhan <Zhan.Liu@amd.com>

>> Sent: Friday, November 1, 2019 9:18 PM

>> To: amd-gfx@lists.freedesktop.org; Kazlauskas, Nicholas 

>> <Nicholas.Kazlauskas@amd.com>; Lakha, Bhawanpreet 

>> <Bhawanpreet.Lakha@amd.com>; Li, Roman <Roman.Li@amd.com>; Liu, Zhan 

>> <Zhan.Liu@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; 

>> Wentland, Harry <Harry.Wentland@amd.com>; Wu, Hersen 

>> <hersenxs.wu@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>

>> Cc: Yeh, Eagle <Eagle.Yeh@amd.com>; Lazare, Jordan 

>> <Jordan.Lazare@amd.com>

>> Subject: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check 

>> for Navi14

>>

>> From: Zhan liu <zhan.liu@amd.com>

>> Date: Fri, 1 Nov 2019 21:10:17 -0400

>> Subject: [PATCH] drm/amd/display: Add ENGINE_ID_DIGD condition check 

>> for Navi14

>>

>> [Why]

>> Navi10 has 6 PHY, but Navi14 only has 5 PHY, that is because there is 

>> no ENGINE_ID_DIGD in Navi14. Without this patch, many HDMI related 

>> issues (e.g. HDMI S3 resume failure, HDMI pink screen on boot) will be observed.

>>

>> [How]

>> If eng_id is larger than ENGINE_ID_DIGD, then add eng_id by 1.

>>

>> Signed-off-by: Zhan liu <zhan.liu@amd.com>

>> ---

>>  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 +++

>>  1 file changed, 3 insertions(+)

>>

>> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

>> b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

>> index 924c2e303588..cf886483e380 100644

>> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

>> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

>> @@ -1152,6 +1152,9 @@ struct stream_encoder 

>> *dcn20_stream_encoder_create(

>>         if (!enc1)

>>                 return NULL;

>>

>> +       if (eng_id >= ENGINE_ID_DIGD)

>> +               eng_id++;

>> +

>>         dcn20_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id,

>>                                         &stream_enc_regs[eng_id],

>>                                         &se_shift, &se_mask);

>> --

>> 2.21.0

>>

>> _______________________________________________

>>

>> amd-gfx mailing list

>>

>> amd-gfx@lists.freedesktop.org

>>

>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx