drm/amdgpu/ring: add no_scheduler flag
Subsystems (2)
PATCH 1/3 drm/amdgpu/ring: add no_scheduler flag
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.
--- 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +2 -1
@@ -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)++] =
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1 -0
@@ -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;
Signature · 6 lines
2.25.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/3 drm/amdgpu/kiq: add no_scheduler flag to KIQ
We don't want a GPU scheduler for this ring.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +1 -0
@@ -318,6 +318,7 @@ int amdgpu_gfx_kiq_init_ring(struct amdgpu_device *adev,return r; ring->eop_gpu_addr = kiq->eop_gpu_addr; + ring->no_scheduler = true;sprintf (ring->name,"kiq_%d.%d.%d" , ring->me, ring->pipe, ring->queue); r = amdgpu_ring_init(adev, ring, 1024, irq, AMDGPU_CP_KIQ_IRQ_DRIVER0,
Signature · 6 lines
2.25.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/3 drm/amdgpu/ring: simplify scheduler setup logic
In reply to Alex DeucherSet up a GPU scheduler based on the ring flag rather than the ring type.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +1 -3
@@ -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)++] =
Signature · 6 lines
2.25.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 10.04.20 um 14:49 schrieb Alex Deucher:
Quoted 6 lines
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 <[email protected]>Signed-off-by Alex Deucher <[email protected]>
Quoted 24 lines
--- 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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +2
-1@@ -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)++] =drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h struct amdgpu_ring { · line 244
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1
-0@@ -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;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx