Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: detect timeout error when deactivating hqd

Handle HQD deactivation timeouts instead of ignoring them.

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Andres Rodriguez and committed by
Alex Deucher
bf13ed6b 34130fb1

+17 -3
+17 -3
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
··· 4984 4984 4985 4985 static int gfx_v8_0_kiq_init_queue(struct amdgpu_ring *ring) 4986 4986 { 4987 + int r = 0; 4987 4988 struct amdgpu_device *adev = ring->adev; 4988 4989 struct vi_mqd *mqd = ring->mqd_ptr; 4989 4990 int mqd_idx = AMDGPU_MAX_COMPUTE_RINGS; ··· 5001 5000 amdgpu_ring_clear_ring(ring); 5002 5001 mutex_lock(&adev->srbm_mutex); 5003 5002 vi_srbm_select(adev, ring->me, ring->pipe, ring->queue, 0); 5004 - gfx_v8_0_deactivate_hqd(adev, 1); 5003 + r = gfx_v8_0_deactivate_hqd(adev, 1); 5004 + if (r) { 5005 + dev_err(adev->dev, "failed to deactivate ring %s\n", ring->name); 5006 + goto out_unlock; 5007 + } 5005 5008 gfx_v8_0_mqd_commit(ring); 5006 5009 vi_srbm_select(adev, 0, 0, 0, 0); 5007 5010 mutex_unlock(&adev->srbm_mutex); ··· 5013 5008 mutex_lock(&adev->srbm_mutex); 5014 5009 vi_srbm_select(adev, ring->me, ring->pipe, ring->queue, 0); 5015 5010 gfx_v8_0_mqd_init(ring); 5016 - gfx_v8_0_deactivate_hqd(adev, 1); 5011 + r = gfx_v8_0_deactivate_hqd(adev, 1); 5012 + if (r) { 5013 + dev_err(adev->dev, "failed to deactivate ring %s\n", ring->name); 5014 + goto out_unlock; 5015 + } 5017 5016 gfx_v8_0_mqd_commit(ring); 5018 5017 vi_srbm_select(adev, 0, 0, 0, 0); 5019 5018 mutex_unlock(&adev->srbm_mutex); ··· 5026 5017 memcpy(adev->gfx.mec.mqd_backup[mqd_idx], mqd, sizeof(*mqd)); 5027 5018 } 5028 5019 5029 - return 0; 5020 + return r; 5021 + 5022 + out_unlock: 5023 + vi_srbm_select(adev, 0, 0, 0, 0); 5024 + mutex_unlock(&adev->srbm_mutex); 5025 + return r; 5030 5026 } 5031 5027 5032 5028 static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring)