[PATCH 2/2] drm/amdgpu: restore uvd fence seq in uvd resume

Jim Qu Jim.Qu at amd.com
Fri Dec 15 07:32:55 UTC 2017


otherwise, uvd block will be never powered up in ring begin_use()
callback. uvd ring test will be fail in resume in rumtime pm.

Change-Id: Ic623e789cc682ea07af228898f9aaf22511bbe20
Signed-off-by: Jim Qu <Jim.Qu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index 89d59fd..e444847 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -346,6 +346,8 @@ int amdgpu_uvd_resume(struct amdgpu_device *adev)
 			ptr += le32_to_cpu(hdr->ucode_size_bytes);
 		}
 		memset_io(ptr, 0, size);
+		/* to restore uvd fence seq */
+		amdgpu_fence_driver_force_completion(&adev->uvd.ring);
 	}
 
 	return 0;
-- 
1.9.1



More information about the amd-gfx mailing list