[PATCH 02/10] drm/amdgpu: abstract amdgpu_vm_is_gpu_reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 30.06.2016 um 09:08 schrieb Chunming Zhou:
> Change-Id: I6266ccaaa0bbd7c1079023dc5a4309e55b749a07
> Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>

Looks good to me, but do we still need this?

Looks like you dropped the follow up patch of emitting the pipeline sync.

Christian.

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 1e6a897..cced2f6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -167,6 +167,13 @@ void amdgpu_vm_move_pt_bos_in_lru(struct amdgpu_device *adev,
>   	spin_unlock(&glob->lru_lock);
>   }
>   
> +static bool amdgpu_vm_is_gpu_reset(struct amdgpu_device *adev,
> +			      struct amdgpu_vm_id *id)
> +{
> +	return id->current_gpu_reset_count !=
> +		atomic_read(&adev->gpu_reset_counter) ? true : false;
> +}
> +
>   /**
>    * amdgpu_vm_grab_id - allocate the next free VMID
>    *
> @@ -250,7 +257,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
>   		/* Check all the prerequisites to using this VMID */
>   		if (!id)
>   			continue;
> -		if (id->current_gpu_reset_count != atomic_read(&adev->gpu_reset_counter))
> +		if (amdgpu_vm_is_gpu_reset(adev, id))
>   			continue;
>   
>   		if (atomic64_read(&id->owner) != vm->client_id)



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux