summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-05-17 12:45:52 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-05-18 16:08:20 -0500
commit4bd2c5dd763866b827dd7e95b9ea71c47fa06126 (patch)
tree81f56b91cebd5481aeacb00bfdc11d4715a98a9a /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
parent6f0fd919471cf2477e86e2be9b53ecae37b0e815 (diff)
downloadop-kernel-dev-4bd2c5dd763866b827dd7e95b9ea71c47fa06126.zip
op-kernel-dev-4bd2c5dd763866b827dd7e95b9ea71c47fa06126.tar.gz
drm/amdgpu: Take uvd encode rings into account in idle work (v2)
Take the encode rings into account in the idle work handler. v2: fix typo: s/num_uvd_inst/num_enc_rings/ Reviewed-by: James Zhu <James.Zhu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index be2917c..bcf68f8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -1146,10 +1146,13 @@ static void amdgpu_uvd_idle_work_handler(struct work_struct *work)
{
struct amdgpu_device *adev =
container_of(work, struct amdgpu_device, uvd.inst->idle_work.work);
- unsigned fences = 0, i;
+ unsigned fences = 0, i, j;
for (i = 0; i < adev->uvd.num_uvd_inst; ++i) {
fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring);
+ for (j = 0; j < adev->uvd.num_enc_rings; ++j) {
+ fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring_enc[j]);
+ }
}
if (fences == 0) {
OpenPOWER on IntegriCloud