VCE on Stoney seems to have problems after the first suspend/resume
cycle. Disable it before we destabilize the whole driver.

Signed-off-by: Christian König <christian.koe...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c 
b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
index 6dbd39730070..cf2bda5bb2ee 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
@@ -517,13 +517,23 @@ static int vce_v3_0_suspend(void *handle)
 
 static int vce_v3_0_resume(void *handle)
 {
-       int r;
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+       int i, r;
 
        r = amdgpu_vce_resume(adev);
        if (r)
                return r;
 
+       /* TODO: VCE has problems resuming on Stoney. Disable the whole block
+        * instead of risking to destabilize the driver
+        */
+       if (adev->asic_type == CHIP_STONEY) {
+               for (i = 0; i < AMDGPU_MAX_VCE_RINGS; ++i)
+                       adev->vce.ring[i].ready = false;
+
+               return 0;
+       }
+
        return vce_v3_0_hw_init(adev);
 }
 
-- 
2.14.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to