drm/amdgpu: limit the number of enabled gfx queues
Subsystems (2)
PATCH 1/1 drm/amdgpu: limit the number of enabled gfx queues
The driver can only support AMDGPU_MAX_GFX_RINGS gfx queues at the moment. Once enabled gfx queues exceed the limit, we will run into problems when setting up gfx rings in gfx_xxx_sw_init().
Signed-off-by Lang Yu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +3 -2
@@ -229,8 +229,9 @@ void amdgpu_gfx_graphics_queue_acquire(struct amdgpu_device *adev) {int i, queue, pipe;bool multipipe_policy =amdgpu_gfx_is_graphics_multipipe_capable (adev); -int max_queues_per_me = adev->gfx.me.num_pipe_per_me * - adev->gfx.me.num_queue_per_pipe; +int max_queues_per_me =min (adev->gfx.me.num_pipe_per_me * + adev->gfx.me.num_queue_per_pipe, + adev->gfx.num_gfx_rings);if (multipipe_policy) {/* policy: amdgpu owns the first queue per pipe at this stage
Signature · 1 line
2.25.1
ping.
Quoted 29 lines · Lang Yu
The driver can only support
AMDGPU_MAX_GFX_RINGSgfx queues at the moment. Once enabled gfx queues exceed the limit, we will run into problems when setting up gfx rings ingfx_xxx_sw_init().Signed-off-by Lang Yu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +3
-2@@ -229,8 +229,9 @@ void amdgpu_gfx_graphics_queue_acquire(struct amdgpu_device *adev) {int i, queue, pipe;bool multipipe_policy =amdgpu_gfx_is_graphics_multipipe_capable (adev); -int max_queues_per_me = adev->gfx.me.num_pipe_per_me * - adev->gfx.me.num_queue_per_pipe; +int max_queues_per_me =min (adev->gfx.me.num_pipe_per_me * + adev->gfx.me.num_queue_per_pipe, + adev->gfx.num_gfx_rings);if (multipipe_policy) {/* policy: amdgpu owns the first queue per pipe at this stage Signature · 1 line
2.25.1