[PATCH] drm/amdgpu: disable VCE after resume on Stoney

Christian König ckoenig.leichtzumerken at gmail.com
Wed Oct 17 09:02:35 UTC 2018


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.koenig at 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



More information about the amd-gfx mailing list