mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
drm/amdgpu: allocate queues horizontally across pipes
Pipes provide better concurrency than queues, therefore we want to make sure that apps use queues from different pipes whenever possible. Optimize for the trivial case where an app will consume rings in order, therefore we don't want adjacent rings to belong to the same pipe. Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Andres Rodriguez <andresx7@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
5e7095625d
commit
e33fec4835
@@ -1803,6 +1803,19 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline bool amdgpu_is_mec_queue_enabled(struct amdgpu_device *adev,
|
||||
int mec, int pipe, int queue)
|
||||
{
|
||||
int bit = 0;
|
||||
|
||||
bit += mec * adev->gfx.mec.num_pipe_per_mec
|
||||
* adev->gfx.mec.num_queue_per_pipe;
|
||||
bit += pipe * adev->gfx.mec.num_queue_per_pipe;
|
||||
bit += queue;
|
||||
|
||||
return test_bit(bit, adev->gfx.mec.queue_bitmap);
|
||||
}
|
||||
|
||||
/*
|
||||
* ASICs macro.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user