[PATCH] drm/amdgpu: drop compute ring timeout setting for non-sriov only (v2)

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

 



Am 27.03.2018 um 10:15 schrieb Evan Quan:
> Sriov still wants these error messags on timeout. So, for sriov
> use case, the timeout setting on compute rings is kept.
>
> -v2: clean the code
>
> Change-Id: Id0af6959a8023c8d683ff680de7c583f84cfeab3
> Signed-off-by: Evan Quan <evan.quan at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> index 455a81e..0000569 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> @@ -411,6 +411,7 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
>   				  unsigned num_hw_submission)
>   {
>   	int r;
> +	long timeout;

Minor nit pick, common coding style would be:

long timeout;
int r;

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

>   
>   	/* Check that num_hw_submission is a power of two */
>   	if ((num_hw_submission & (num_hw_submission - 1)) != 0)
> @@ -433,11 +434,16 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
>   
>   	/* No need to setup the GPU scheduler for KIQ ring */
>   	if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
> +		/* for non-sriov case, no timeout enforce on compute ring */
> +		if ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE)
> +				&& !amdgpu_sriov_vf(ring->adev))
> +			timeout = MAX_SCHEDULE_TIMEOUT;
> +		else
> +			timeout = msecs_to_jiffies(amdgpu_lockup_timeout);
> +
>   		r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,
>   				   num_hw_submission, amdgpu_job_hang_limit,
> -				   (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) ?
> -				   MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(amdgpu_lockup_timeout),
> -				   ring->name);
> +				   timeout, ring->name);
>   		if (r) {
>   			DRM_ERROR("Failed to create scheduler on ring %s.\n",
>   				  ring->name);



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

  Powered by Linux