[PATCH 1/3] drm/amdgpu/ring: add no_scheduler flag

Christian König ckoenig.leichtzumerken at gmail.com
Fri Apr 10 14:52:16 UTC 2020


Am 10.04.20 um 14:49 schrieb Alex Deucher:
> This allows IPs to flag whether a specific ring requires
> a GPU scheduler or not.  E.g., sometimes instances of an
> IP are asymmetric and have different capabilities.
>
> Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

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

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 +
>   2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> index 5f36bd58202a..4863e91c5533 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> @@ -261,7 +261,8 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
>   	mutex_init(&ring->priority_mutex);
>   
>   	if (ring->funcs->type >= AMDGPU_RING_TYPE_GFX &&
> -	    ring->funcs->type <= AMDGPU_RING_TYPE_VCN_JPEG) {
> +	    ring->funcs->type <= AMDGPU_RING_TYPE_VCN_JPEG &&
> +	    !ring->no_scheduler) {
>   		hw_ip = ring->funcs->type;
>   		num_sched = &adev->gpu_sched[hw_ip][hw_prio].num_scheds;
>   		adev->gpu_sched[hw_ip][hw_prio].sched[(*num_sched)++] =
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> index efd7627b3f69..f61664ee4940 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> @@ -238,6 +238,7 @@ struct amdgpu_ring {
>   	unsigned		vm_inv_eng;
>   	struct dma_fence	*vmid_wait;
>   	bool			has_compute_vm_bug;
> +	bool			no_scheduler;
>   
>   	atomic_t		num_jobs[DRM_SCHED_PRIORITY_MAX];
>   	struct mutex		priority_mutex;



More information about the amd-gfx mailing list