[PATCH 09/17] drm/amdgpu: add jpeg enc sw and hw finish

boyuan.zhang at amd.com boyuan.zhang at amd.com
Thu Jul 4 16:04:21 UTC 2019


From: Boyuan Zhang <boyuan.zhang at amd.com>

Add software and hardware fini for jpeg encode ring.

Signed-off-by: Boyuan Zhang <boyuan.zhang at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 ++
 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c   | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index f3b432ef62ef..f9af465a00e0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -157,6 +157,8 @@ int amdgpu_vcn_sw_fini(struct amdgpu_device *adev)
 
 	amdgpu_ring_fini(&adev->vcn.ring_jpeg);
 
+	amdgpu_ring_fini(&adev->vcn.ring_jpeg_enc);
+
 	release_firmware(adev->vcn.fw);
 
 	return 0;
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
index 8e25f83333f1..3caa1b98b15a 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
@@ -333,6 +333,9 @@ static int vcn_v2_0_hw_fini(void *handle)
 	ring = &adev->vcn.ring_jpeg;
 	ring->sched.ready = false;
 
+	ring = &adev->vcn.ring_jpeg_enc;
+	ring->sched.ready = false;
+
 	return 0;
 }
 
-- 
2.17.1



More information about the amd-gfx mailing list