drm/amdgpu: fix uvd crash on Polaris12 during driver unloading
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix uvd crash on Polaris12 during driver unloading
There was a change(below) target for such issue:cdccf1ffe1a3 drm/amdgpu: Fix crash on device remove/driver unload But the fix for VI ASICs was missing there. This is a supplement for that.
Signed-off-by Evan Quan <[email protected]>
Change-Id Iedc25e2f572f04772511d56781b01b481e22fd00
--- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +13 -11
@@ -534,6 +534,19 @@ static int uvd_v6_0_hw_fini(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; +cancel_delayed_work_sync (&adev->uvd.idle_work); + +if (RREG32 (mmUVD_STATUS) !=0 ) +uvd_v6_0_stop (adev); + +return 0 ; +} + +static int uvd_v6_0_suspend (void *handle) +{ +int r; +struct amdgpu_device *adev = (struct amdgpu_device *)handle; +/* * Proper cleanups before halting the HW engine: * - cancel the delayed idle work
@@ -558,17 +571,6 @@ static int uvd_v6_0_hw_fini(void *handle) AMD_CG_STATE_GATE); } -if (RREG32 (mmUVD_STATUS) !=0 ) -uvd_v6_0_stop (adev); - -return 0 ; -} - -static int uvd_v6_0_suspend (void *handle) -{ -int r; -struct amdgpu_device *adev = (struct amdgpu_device *)handle; - r =uvd_v6_0_hw_fini (adev);if (r)return r;
Signature · 1 line
2.29.0
Quoted 3 lines · Evan Quan
There was a change(below) target for such issue:
cdccf1ffe1a3drm/amdgpu: Fix crash on device remove/driver unload
proper formatting for a patch reference:cdccf1ffe1a3 ("drm/amdgpu: Fix crash on device remove/driver unload")
Quoted 3 lines
But the fix for VI ASICs was missing there. This is a supplement for that.
Fixes cdccf1ffe1a3 ("drm/amdgpu: Fix crash on device remove/driver unload")
Quoted 1 line
Signed-off-by Evan Quan <[email protected]>
With the above comments addressed,
Acked-by Alex Deucher <[email protected]>
Quoted 50 lines
Change-Id: Iedc25e2f572f04772511d56781b01b481e22fd00
--- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +13
-12@@ -534,6 +534,19 @@ static int uvd_v6_0_hw_fini(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; +cancel_delayed_work_sync (&adev->uvd.idle_work); + +if (RREG32 (mmUVD_STATUS) !=0 ) +uvd_v6_0_stop (adev); + +return 0 ; +} + +static int uvd_v6_0_suspend (void *handle) +{ +int r; +struct amdgpu_device *adev = (struct amdgpu_device *)handle; +/* * Proper cleanups before halting the HW engine: * - cancel the delayed idle work @@ -558,17 +571,6 @@ static int uvd_v6_0_hw_fini(void *handle) AMD_CG_STATE_GATE); } -if (RREG32 (mmUVD_STATUS) !=0 ) -uvd_v6_0_stop (adev); - -return 0 ; -} - -static int uvd_v6_0_suspend (void *handle) -{ -int r; -struct amdgpu_device *adev = (struct amdgpu_device *)handle; - r =uvd_v6_0_hw_fini (adev);if (r)return r; --2.29.0