[PATCH 2/5] drm/amdgpu:add hang_limit for sched

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

 



> Don't set it directly, make it a parameter of amd_sched_init().
Okay


the indent is somehow always looks incorrect in email, but it already aligned actually 

-----Original Message-----
From: Christian König [mailto:ckoenig.leichtzumerken@xxxxxxxxx] 
Sent: 2017å¹´10æ??20æ?¥ 17:03
To: Liu, Monk <Monk.Liu at amd.com>; amd-gfx at lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm/amdgpu:add hang_limit for sched

Am 20.10.2017 um 05:33 schrieb Monk Liu:
> since gpu_scheduler source domain cannot access amdgpu variable so 
> need create the hang_limit membewr for sched, and it can refer it for 
> the upcoming GPU RESET patches
>
> Change-Id: I977ae2717e55a8b87c59e58a288bffc3b458b653
> Signed-off-by: Monk Liu <Monk.Liu at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     | 2 ++
>   drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 1 +
>   2 files changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> index 2167dac..f6a55cf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> @@ -453,6 +453,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
>   				  ring->name);
>   			return r;
>   		}
> +
> +		ring->sched.hang_limit = amdgpu_job_hang_limit;

Don't set it directly, make it a parameter of amd_sched_init().

>   	}
>   
>   	return 0;
> diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h 
> b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> index 52c8e54..1dac7bc 100644
> --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> @@ -142,6 +142,7 @@ struct amd_gpu_scheduler {
>   	struct task_struct		*thread;
>   	struct list_head	ring_mirror_list;
>   	spinlock_t			job_list_lock;
> +	int hang_limit;

Please indent the new field the same way as the other one in the structure.

Christian.

>   };
>   
>   int amd_sched_init(struct amd_gpu_scheduler *sched,




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

  Powered by Linux