diff options
author | 2023-05-03 16:15:07 -0700 | |
---|---|---|
committer | 2023-06-09 10:40:52 -0400 | |
commit | 1385d88c6aa774332f1a88562b6f1bf04de6d710 (patch) | |
tree | 9dca6aa0dadf5dad4d0315d099cea2c6396c34b9 /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | |
parent | drm/amd/display: Fix artifacting on eDP panels when engaging freesync video mode (diff) | |
download | linux-1385d88c6aa774332f1a88562b6f1bf04de6d710.tar.gz linux-1385d88c6aa774332f1a88562b6f1bf04de6d710.tar.bz2 linux-1385d88c6aa774332f1a88562b6f1bf04de6d710.zip |
drm:amd:amdgpu: Fix missing buffer object unlock in failure path
smatch warning -
1) drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:3615 gfx_v9_0_kiq_resume()
warn: inconsistent returns 'ring->mqd_obj->tbo.base.resv'.
2) drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:6901 gfx_v10_0_kiq_resume()
warn: inconsistent returns 'ring->mqd_obj->tbo.base.resv'.
Signed-off-by: Sukrut Bellary <sukrut.bellary@linux.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index de8e70b3db75..8bf95a6b0767 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -3614,8 +3614,10 @@ static int gfx_v9_0_kiq_resume(struct amdgpu_device *adev) return r; r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr); - if (unlikely(r != 0)) + if (unlikely(r != 0)) { + amdgpu_bo_unreserve(ring->mqd_obj); return r; + } gfx_v9_0_kiq_init_queue(ring); amdgpu_bo_kunmap(ring->mqd_obj); |