diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2018-05-17 12:33:34 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-18 16:08:20 -0500 |
commit | 6f0fd919471cf2477e86e2be9b53ecae37b0e815 (patch) | |
tree | 90b4e39c6ba1f6e26032c08c53185c21bf4a9e42 /drivers/gpu/drm/amd/amdgpu | |
parent | 652470ac55543fbbdcbce25492a7e370d23a38a0 (diff) | |
download | linux-6f0fd919471cf2477e86e2be9b53ecae37b0e815.tar.bz2 |
drm/amdgpu: count fences from all uvd instances in idle handler
Current multi-UVD hardware uses a single clock and power source
so handle all instances in the idle handler.
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')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index 0772680371a1..be2917c6698e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c @@ -1146,7 +1146,11 @@ 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 = amdgpu_fence_count_emitted(&adev->uvd.inst->ring); + unsigned fences = 0, i; + + for (i = 0; i < adev->uvd.num_uvd_inst; ++i) { + fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring); + } if (fences == 0) { if (adev->pm.dpm_enabled) { |