Commit 296191c5 authored by James Zhu's avatar James Zhu Committed by Alex Deucher

drm/amdgpu: add uvd enc into run queue

Signed-off-by: default avatarJames Zhu <James.Zhu@amd.com>
Reviewed-and-Tested-by: default avatarLeo Liu <leo.liu@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 06a7e9cb
...@@ -183,6 +183,18 @@ static int uvd_v6_0_sw_init(void *handle) ...@@ -183,6 +183,18 @@ static int uvd_v6_0_sw_init(void *handle)
if (r) if (r)
return r; return r;
if (uvd_v6_0_enc_support(adev)) {
struct amd_sched_rq *rq;
ring = &adev->uvd.ring_enc[0];
rq = &ring->sched.sched_rq[AMD_SCHED_PRIORITY_NORMAL];
r = amd_sched_entity_init(&ring->sched, &adev->uvd.entity_enc,
rq, amdgpu_sched_jobs);
if (r) {
DRM_ERROR("Failed setting up UVD ENC run queue.\n");
return r;
}
}
r = amdgpu_uvd_resume(adev); r = amdgpu_uvd_resume(adev);
if (r) if (r)
return r; return r;
...@@ -216,6 +228,8 @@ static int uvd_v6_0_sw_fini(void *handle) ...@@ -216,6 +228,8 @@ static int uvd_v6_0_sw_fini(void *handle)
return r; return r;
if (uvd_v6_0_enc_support(adev)) { if (uvd_v6_0_enc_support(adev)) {
amd_sched_entity_fini(&adev->uvd.ring_enc[0].sched, &adev->uvd.entity_enc);
for (i = 0; i < adev->uvd.num_enc_rings; ++i) for (i = 0; i < adev->uvd.num_enc_rings; ++i)
amdgpu_ring_fini(&adev->uvd.ring_enc[i]); amdgpu_ring_fini(&adev->uvd.ring_enc[i]);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment