[PATCH] drm/amdgpu/vce: take all rings into account for idle checks

Christian König deathsimple at vodafone.de
Tue Sep 27 07:10:37 UTC 2016


Am 26.09.2016 um 21:21 schrieb Alex Deucher:
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> index 121bd6e..3b03558 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
> @@ -305,9 +305,12 @@ static void amdgpu_vce_idle_work_handler(struct work_struct *work)
>   {
>   	struct amdgpu_device *adev =
>   		container_of(work, struct amdgpu_device, vce.idle_work.work);
> +	unsigned i, count = 0;
>   
> -	if ((amdgpu_fence_count_emitted(&adev->vce.ring[0]) == 0) &&
> -	    (amdgpu_fence_count_emitted(&adev->vce.ring[1]) == 0)) {
> +	for (i = 0; i < adev->vce.num_rings; i++)
> +		count += amdgpu_fence_count_emitted(&adev->vce.ring[i]);
> +
> +	if (count == 0) {
>   		if (adev->pm.dpm_enabled) {
>   			amdgpu_dpm_enable_vce(adev, false);
>   		} else {




More information about the amd-gfx mailing list