[PATCH] drm/amd/display: fix dm irq error message in gpu recover
Hamza Mahfooz
hamza.mahfooz at amd.com
Fri Feb 24 17:02:18 UTC 2023
On 2/24/23 11:55, Aurabindo Pillai wrote:
> From: tiancyin <tianci.yin at 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 at amd.com>
Reviewed-by: Hamza Mahfooz <hamza.mahfooz at 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
More information about the amd-gfx
mailing list