I would rather avoid calling the function in the first place. Christian. Am 26.02.2018 um 06:18 schrieb Monk Liu: > Change-Id: I370966acd0f1925a99dfde888678e6e0fd093b15 > Signed-off-by: Monk Liu <Monk.Liu at amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c > index 337db57..5fb4357 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c > @@ -1117,11 +1117,13 @@ static void amdgpu_uvd_idle_work_handler(struct work_struct *work) > { > struct amdgpu_device *adev = > container_of(work, struct amdgpu_device, uvd.idle_work.work); > - unsigned fences = amdgpu_fence_count_emitted(&adev->uvd.ring); > + unsigned fences; > > if (amdgpu_sriov_vf(adev)) > BUG(); > > + fences = amdgpu_fence_count_emitted(&adev->uvd.ring); > + > if (fences == 0) { > if (adev->pm.dpm_enabled) { > amdgpu_dpm_enable_uvd(adev, false);