[PATCH 2/3] drm/amdgpu: Initialize timestamp for some legacy SOCs

Christian König christian.koenig at amd.com
Wed Apr 24 11:36:29 UTC 2024


Am 24.04.24 um 12:03 schrieb Ma Jun:
> Initialize the interrupt timestamp for some legacy SOCs
> to fix the coverity issue "Uninitialized scalar variable"
>
> Signed-off-by: Ma Jun <Jun.Ma2 at amd.com>
> Suggested-by: Christian König <christian.koenig at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> index 7e6d09730e6d..665c63f55278 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> @@ -445,6 +445,14 @@ void amdgpu_irq_dispatch(struct amdgpu_device *adev,
>   
>   	entry.ih = ih;
>   	entry.iv_entry = (const uint32_t *)&ih->ring[ring_index];
> +
> +	/*
> +	 * timestamp is not supported on some legacy SOCs (cik, cz, iceland,
> +	 * si and tonga), so initialize timestamp and timestamp_src to 0
> +	 */
> +	entry.timestamp = 0;
> +	entry.timestamp_src = 0;
> +
>   	amdgpu_ih_decode_iv(adev, &entry);
>   
>   	trace_amdgpu_iv(ih - &adev->irq.ih, &entry);



More information about the amd-gfx mailing list