[PATCH 2/2] drm/amdgpu: Take vcn encode rings into account in idle work
Christian König
ckoenig.leichtzumerken at gmail.com
Fri May 18 09:58:42 UTC 2018
Am 17.05.2018 um 20:03 schrieb Alex Deucher:
> Take the encode rings into account in the idle work handler.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> index e5d234cf804f..60468385e6b4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> @@ -205,6 +205,11 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct *work)
> struct amdgpu_device *adev =
> container_of(work, struct amdgpu_device, vcn.idle_work.work);
> unsigned fences = amdgpu_fence_count_emitted(&adev->vcn.ring_dec);
> + unsigned i;
> +
> + for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
> + fences += amdgpu_fence_count_emitted(&adev->vcn.ring_enc[i]);
> + }
"{" and "}" should be dropped here if I'm not completely mistaken.
But either way Reviewed-by: Christian König <christian.koenig at amd.com>
for the whole series.
Christian.
>
> if (fences == 0) {
> if (adev->pm.dpm_enabled) {
More information about the amd-gfx
mailing list