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>
This commit is contained in:
parent
652470ac55
commit
6f0fd91947
1 changed files with 5 additions and 1 deletions
|
@ -1146,7 +1146,11 @@ static void amdgpu_uvd_idle_work_handler(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct amdgpu_device *adev =
|
struct amdgpu_device *adev =
|
||||||
container_of(work, struct amdgpu_device, uvd.inst->idle_work.work);
|
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 (fences == 0) {
|
||||||
if (adev->pm.dpm_enabled) {
|
if (adev->pm.dpm_enabled) {
|
||||||
|
|
Loading…
Reference in a new issue