All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: disable VCE after resume on Stoney
@ 2018-10-17  9:02 Christian König
  0 siblings, 0 replies; only message in thread
From: Christian König @ 2018-10-17  9:02 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, rex.zhu-5C7GfCeVMHo

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@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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-17  9:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17  9:02 [PATCH] drm/amdgpu: disable VCE after resume on Stoney Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.