Commit a4c24680 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/ring: simplify scheduler setup logic

Set up a GPU scheduler based on the ring flag rather
than the ring type.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a783910d
...@@ -260,9 +260,7 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring, ...@@ -260,9 +260,7 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
ring->priority = DRM_SCHED_PRIORITY_NORMAL; ring->priority = DRM_SCHED_PRIORITY_NORMAL;
mutex_init(&ring->priority_mutex); mutex_init(&ring->priority_mutex);
if (ring->funcs->type >= AMDGPU_RING_TYPE_GFX && if (!ring->no_scheduler) {
ring->funcs->type <= AMDGPU_RING_TYPE_VCN_JPEG &&
!ring->no_scheduler) {
hw_ip = ring->funcs->type; hw_ip = ring->funcs->type;
num_sched = &adev->gpu_sched[hw_ip][hw_prio].num_scheds; num_sched = &adev->gpu_sched[hw_ip][hw_prio].num_scheds;
adev->gpu_sched[hw_ip][hw_prio].sched[(*num_sched)++] = adev->gpu_sched[hw_ip][hw_prio].sched[(*num_sched)++] =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment