Skip to content

Commit 2e55bcf

Browse files
Ma Junalexdeucher
authored andcommitted
drm/amdgpu: Initialize timestamp for some legacy SOCs
Initialize the interrupt timestamp for some legacy SOCs to fix the coverity issue "Uninitialized scalar variable" Signed-off-by: Ma Jun <[email protected]> Suggested-by: Christian König <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 48fa907 commit 2e55bcf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,14 @@ void amdgpu_irq_dispatch(struct amdgpu_device *adev,
445445

446446
entry.ih = ih;
447447
entry.iv_entry = (const uint32_t *)&ih->ring[ring_index];
448+
449+
/*
450+
* timestamp is not supported on some legacy SOCs (cik, cz, iceland,
451+
* si and tonga), so initialize timestamp and timestamp_src to 0
452+
*/
453+
entry.timestamp = 0;
454+
entry.timestamp_src = 0;
455+
448456
amdgpu_ih_decode_iv(adev, &entry);
449457

450458
trace_amdgpu_iv(ih - &adev->irq.ih, &entry);

0 commit comments

Comments
 (0)