All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: fix dm irq error message in gpu recover
@ 2023-02-08  7:25 Tianci Yin
  2023-02-08 14:26 ` Alex Deucher
  2023-02-08 17:01 ` Hamza Mahfooz
  0 siblings, 2 replies; 6+ messages in thread
From: Tianci Yin @ 2023-02-08  7:25 UTC (permalink / raw)
  To: amd-gfx
  Cc: Yu Wang, Rodrigo Siqueira, Aurabindo Pillai, Harry Wentland, Tianci Yin

From: tiancyin <tianci.yin@amd.com>

[Why]
Variable adev->crtc_irq.num_types was initialized as the value of
adev->mode_info.num_crtc at early_init stage, later at hw_init stage,
the num_crtc changed due to the display pipe harvest on some SKUs,
but the num_types was not updated accordingly, that cause below error
in gpu recover.

  *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3

[How]
Defer the initialization of num_types to eliminate the error logs.

Signed-off-by: tiancyin <tianci.yin@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index b31cfda30ff9..506699c0d316 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4226,6 +4226,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
 	/* Update the actual used number of crtc */
 	adev->mode_info.num_crtc = adev->dm.display_indexes_num;
 
+	amdgpu_dm_set_irq_funcs(adev);
+
 	link_cnt = dm->dc->caps.max_links;
 	if (amdgpu_dm_mode_config_init(dm->adev)) {
 		DRM_ERROR("DM: Failed to initialize mode config\n");
@@ -4714,8 +4716,6 @@ static int dm_early_init(void *handle)
 		break;
 	}
 
-	amdgpu_dm_set_irq_funcs(adev);
-
 	if (adev->mode_info.funcs == NULL)
 		adev->mode_info.funcs = &dm_display_funcs;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/amd/display: fix dm irq error message in gpu recover
  2023-02-08  7:25 [PATCH] drm/amd/display: fix dm irq error message in gpu recover Tianci Yin
@ 2023-02-08 14:26 ` Alex Deucher
  2023-02-08 16:12   ` Harry Wentland
  2023-02-08 17:01 ` Hamza Mahfooz
  1 sibling, 1 reply; 6+ messages in thread
From: Alex Deucher @ 2023-02-08 14:26 UTC (permalink / raw)
  To: Tianci Yin
  Cc: Yu Wang, Harry Wentland, Aurabindo Pillai, Rodrigo Siqueira, amd-gfx

On Wed, Feb 8, 2023 at 2:26 AM Tianci Yin <tianci.yin@amd.com> wrote:
>
> From: tiancyin <tianci.yin@amd.com>
>
> [Why]
> Variable adev->crtc_irq.num_types was initialized as the value of
> adev->mode_info.num_crtc at early_init stage, later at hw_init stage,
> the num_crtc changed due to the display pipe harvest on some SKUs,
> but the num_types was not updated accordingly, that cause below error
> in gpu recover.
>
>   *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>   *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>   *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>   *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>   *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>   *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>   *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>   *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
>   *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
>   *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
>
> [How]
> Defer the initialization of num_types to eliminate the error logs.
>
> Signed-off-by: tiancyin <tianci.yin@amd.com>

Acked-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index b31cfda30ff9..506699c0d316 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4226,6 +4226,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
>         /* Update the actual used number of crtc */
>         adev->mode_info.num_crtc = adev->dm.display_indexes_num;
>
> +       amdgpu_dm_set_irq_funcs(adev);
> +
>         link_cnt = dm->dc->caps.max_links;
>         if (amdgpu_dm_mode_config_init(dm->adev)) {
>                 DRM_ERROR("DM: Failed to initialize mode config\n");
> @@ -4714,8 +4716,6 @@ static int dm_early_init(void *handle)
>                 break;
>         }
>
> -       amdgpu_dm_set_irq_funcs(adev);
> -
>         if (adev->mode_info.funcs == NULL)
>                 adev->mode_info.funcs = &dm_display_funcs;
>
> --
> 2.34.1
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/amd/display: fix dm irq error message in gpu recover
  2023-02-08 14:26 ` Alex Deucher
@ 2023-02-08 16:12   ` Harry Wentland
  0 siblings, 0 replies; 6+ messages in thread
From: Harry Wentland @ 2023-02-08 16:12 UTC (permalink / raw)
  To: Alex Deucher, Tianci Yin
  Cc: Yu Wang, Aurabindo Pillai, Rodrigo Siqueira, amd-gfx



On 2/8/23 09:26, Alex Deucher wrote:
> On Wed, Feb 8, 2023 at 2:26 AM Tianci Yin <tianci.yin@amd.com> wrote:
>>
>> From: tiancyin <tianci.yin@amd.com>
>>
>> [Why]
>> Variable adev->crtc_irq.num_types was initialized as the value of
>> adev->mode_info.num_crtc at early_init stage, later at hw_init stage,
>> the num_crtc changed due to the display pipe harvest on some SKUs,
>> but the num_types was not updated accordingly, that cause below error
>> in gpu recover.
>>
>>    *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>>    *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>>    *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>>    *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
>>    *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
>>    *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
>>
>> [How]
>> Defer the initialization of num_types to eliminate the error logs.
>>
>> Signed-off-by: tiancyin <tianci.yin@amd.com>
> 
> Acked-by: Alex Deucher <alexander.deucher@amd.com>

This seems to be the right thing to do.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> 
>> ---
>>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> index b31cfda30ff9..506699c0d316 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -4226,6 +4226,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
>>          /* Update the actual used number of crtc */
>>          adev->mode_info.num_crtc = adev->dm.display_indexes_num;
>>
>> +       amdgpu_dm_set_irq_funcs(adev);
>> +
>>          link_cnt = dm->dc->caps.max_links;
>>          if (amdgpu_dm_mode_config_init(dm->adev)) {
>>                  DRM_ERROR("DM: Failed to initialize mode config\n");
>> @@ -4714,8 +4716,6 @@ static int dm_early_init(void *handle)
>>                  break;
>>          }
>>
>> -       amdgpu_dm_set_irq_funcs(adev);
>> -
>>          if (adev->mode_info.funcs == NULL)
>>                  adev->mode_info.funcs = &dm_display_funcs;
>>
>> --
>> 2.34.1
>>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/amd/display: fix dm irq error message in gpu recover
  2023-02-08  7:25 [PATCH] drm/amd/display: fix dm irq error message in gpu recover Tianci Yin
  2023-02-08 14:26 ` Alex Deucher
@ 2023-02-08 17:01 ` Hamza Mahfooz
  1 sibling, 0 replies; 6+ messages in thread
From: Hamza Mahfooz @ 2023-02-08 17:01 UTC (permalink / raw)
  To: Tianci Yin, amd-gfx
  Cc: Yu Wang, Harry Wentland, Aurabindo Pillai, Rodrigo Siqueira

On 2/8/23 02:25, Tianci Yin wrote:
> From: tiancyin <tianci.yin@amd.com>
> 
> [Why]
> Variable adev->crtc_irq.num_types was initialized as the value of
> adev->mode_info.num_crtc at early_init stage, later at hw_init stage,
> the num_crtc changed due to the display pipe harvest on some SKUs,
> but the num_types was not updated accordingly, that cause below error
> in gpu recover.
> 
>    *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
> 
> [How]
> Defer the initialization of num_types to eliminate the error logs.
> 
> Signed-off-by: tiancyin <tianci.yin@amd.com>

Reviewed-by: Hamza Mahfooz <hamza.mahfooz@amd.com>

> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index b31cfda30ff9..506699c0d316 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4226,6 +4226,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
>   	/* Update the actual used number of crtc */
>   	adev->mode_info.num_crtc = adev->dm.display_indexes_num;
>   
> +	amdgpu_dm_set_irq_funcs(adev);
> +
>   	link_cnt = dm->dc->caps.max_links;
>   	if (amdgpu_dm_mode_config_init(dm->adev)) {
>   		DRM_ERROR("DM: Failed to initialize mode config\n");
> @@ -4714,8 +4716,6 @@ static int dm_early_init(void *handle)
>   		break;
>   	}
>   
> -	amdgpu_dm_set_irq_funcs(adev);
> -
>   	if (adev->mode_info.funcs == NULL)
>   		adev->mode_info.funcs = &dm_display_funcs;
>   

-- 
Hamza


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/amd/display: fix dm irq error message in gpu recover
  2023-02-24 16:55 Aurabindo Pillai
@ 2023-02-24 17:02 ` Hamza Mahfooz
  0 siblings, 0 replies; 6+ messages in thread
From: Hamza Mahfooz @ 2023-02-24 17:02 UTC (permalink / raw)
  To: Aurabindo Pillai, amd-gfx; +Cc: rodrigo.siqueira, tianci.yin, harry.wentland

On 2/24/23 11:55, Aurabindo Pillai wrote:
> From: tiancyin <tianci.yin@amd.com>
> 
> [Why]
> Variable adev->crtc_irq.num_types was initialized as the value of
> adev->mode_info.num_crtc at early_init stage, later at hw_init stage,
> the num_crtc changed due to the display pipe harvest on some SKUs,
> but the num_types was not updated accordingly, that cause below error
> in gpu recover.
> 
>    *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
>    *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
> 
> [How]
> Defer the initialization of num_types to eliminate the error logs.
> 
> Signed-off-by: tiancyin <tianci.yin@amd.com>

Reviewed-by: Hamza Mahfooz <hamza.mahfooz@amd.com>

> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 79cbf71c2eb3..038302dc1a40 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4270,6 +4270,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
>   	/* Update the actual used number of crtc */
>   	adev->mode_info.num_crtc = adev->dm.display_indexes_num;
>   
> +	amdgpu_dm_set_irq_funcs(adev);
> +
>   	link_cnt = dm->dc->caps.max_links;
>   	if (amdgpu_dm_mode_config_init(dm->adev)) {
>   		DRM_ERROR("DM: Failed to initialize mode config\n");
> @@ -4758,8 +4760,6 @@ static int dm_early_init(void *handle)
>   		break;
>   	}
>   
> -	amdgpu_dm_set_irq_funcs(adev);
> -
>   	if (adev->mode_info.funcs == NULL)
>   		adev->mode_info.funcs = &dm_display_funcs;
>   

-- 
Hamza


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] drm/amd/display: fix dm irq error message in gpu recover
@ 2023-02-24 16:55 Aurabindo Pillai
  2023-02-24 17:02 ` Hamza Mahfooz
  0 siblings, 1 reply; 6+ messages in thread
From: Aurabindo Pillai @ 2023-02-24 16:55 UTC (permalink / raw)
  To: amd-gfx; +Cc: harry.wentland, tianci.yin, rodrigo.siqueira, aurabindo.pillai

From: tiancyin <tianci.yin@amd.com>

[Why]
Variable adev->crtc_irq.num_types was initialized as the value of
adev->mode_info.num_crtc at early_init stage, later at hw_init stage,
the num_crtc changed due to the display pipe harvest on some SKUs,
but the num_types was not updated accordingly, that cause below error
in gpu recover.

  *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3
  *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3

[How]
Defer the initialization of num_types to eliminate the error logs.

Signed-off-by: tiancyin <tianci.yin@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 79cbf71c2eb3..038302dc1a40 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4270,6 +4270,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
 	/* Update the actual used number of crtc */
 	adev->mode_info.num_crtc = adev->dm.display_indexes_num;
 
+	amdgpu_dm_set_irq_funcs(adev);
+
 	link_cnt = dm->dc->caps.max_links;
 	if (amdgpu_dm_mode_config_init(dm->adev)) {
 		DRM_ERROR("DM: Failed to initialize mode config\n");
@@ -4758,8 +4760,6 @@ static int dm_early_init(void *handle)
 		break;
 	}
 
-	amdgpu_dm_set_irq_funcs(adev);
-
 	if (adev->mode_info.funcs == NULL)
 		adev->mode_info.funcs = &dm_display_funcs;
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-24 17:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08  7:25 [PATCH] drm/amd/display: fix dm irq error message in gpu recover Tianci Yin
2023-02-08 14:26 ` Alex Deucher
2023-02-08 16:12   ` Harry Wentland
2023-02-08 17:01 ` Hamza Mahfooz
2023-02-24 16:55 Aurabindo Pillai
2023-02-24 17:02 ` Hamza Mahfooz

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.