Commit 9aeb774c authored by Tom St Denis's avatar Tom St Denis Committed by Alex Deucher

drm/amd/amdgpu: add mutex in check_soft for VCE v3

Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f3f0ea95
...@@ -569,6 +569,7 @@ static int vce_v3_0_check_soft_reset(void *handle) ...@@ -569,6 +569,7 @@ static int vce_v3_0_check_soft_reset(void *handle)
* *
* VCE team suggest use bit 3--bit 6 for busy status check * VCE team suggest use bit 3--bit 6 for busy status check
*/ */
mutex_lock(&adev->grbm_idx_mutex);
WREG32_FIELD(GRBM_GFX_INDEX, INSTANCE_INDEX, 0); WREG32_FIELD(GRBM_GFX_INDEX, INSTANCE_INDEX, 0);
if (RREG32(mmVCE_STATUS) & AMDGPU_VCE_STATUS_BUSY_MASK) { if (RREG32(mmVCE_STATUS) & AMDGPU_VCE_STATUS_BUSY_MASK) {
srbm_soft_reset = REG_SET_FIELD(srbm_soft_reset, SRBM_SOFT_RESET, SOFT_RESET_VCE0, 1); srbm_soft_reset = REG_SET_FIELD(srbm_soft_reset, SRBM_SOFT_RESET, SOFT_RESET_VCE0, 1);
...@@ -588,6 +589,7 @@ static int vce_v3_0_check_soft_reset(void *handle) ...@@ -588,6 +589,7 @@ static int vce_v3_0_check_soft_reset(void *handle)
adev->ip_block_status[AMD_IP_BLOCK_TYPE_VCE].hang = false; adev->ip_block_status[AMD_IP_BLOCK_TYPE_VCE].hang = false;
adev->vce.srbm_soft_reset = 0; adev->vce.srbm_soft_reset = 0;
} }
mutex_unlock(&adev->grbm_idx_mutex);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment