drm/amdgpu/ring: simplify scheduler setup logic

Set up a GPU scheduler based on the ring flag rather
than the ring type.

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Alex Deucher 2020-04-09 16:04:39 -04:00
parent a783910d5c
commit a4c2468027
1 changed files with 1 additions and 3 deletions

View File

@ -260,9 +260,7 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
ring->priority = DRM_SCHED_PRIORITY_NORMAL;
mutex_init(&ring->priority_mutex);
if (ring->funcs->type >= AMDGPU_RING_TYPE_GFX &&
ring->funcs->type <= AMDGPU_RING_TYPE_VCN_JPEG &&
!ring->no_scheduler) {
if (!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)++] =