drm/amdgpu: add amdgpu.sched_hw_submission option
This option can be used to specify the max number of submissions in the active HW queue. The default value is 2 now. Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
This commit is contained in:

committato da
Alex Deucher

parent
1333f723fb
commit
4afcb30383
@@ -468,7 +468,8 @@ struct amd_gpu_scheduler *amd_sched_create(void *device,
|
||||
struct amd_sched_backend_ops *ops,
|
||||
unsigned ring,
|
||||
unsigned granularity,
|
||||
unsigned preemption)
|
||||
unsigned preemption,
|
||||
unsigned hw_submission)
|
||||
{
|
||||
struct amd_gpu_scheduler *sched;
|
||||
char name[20] = "gpu_sched[0]";
|
||||
@@ -495,7 +496,7 @@ struct amd_gpu_scheduler *amd_sched_create(void *device,
|
||||
|
||||
init_waitqueue_head(&sched->wait_queue);
|
||||
if(kfifo_alloc(&sched->active_hw_rq,
|
||||
AMD_MAX_ACTIVE_HW_SUBMISSION * sizeof(void *),
|
||||
hw_submission * sizeof(void *),
|
||||
GFP_KERNEL)) {
|
||||
kfree(sched);
|
||||
return NULL;
|
||||
|
@@ -26,8 +26,6 @@
|
||||
|
||||
#include <linux/kfifo.h>
|
||||
|
||||
#define AMD_MAX_ACTIVE_HW_SUBMISSION 2
|
||||
|
||||
#define AMD_KERNEL_CONTEXT_ID 0
|
||||
#define AMD_KERNEL_PROCESS_ID 0
|
||||
|
||||
@@ -127,7 +125,8 @@ struct amd_gpu_scheduler *amd_sched_create(void *device,
|
||||
struct amd_sched_backend_ops *ops,
|
||||
uint32_t ring,
|
||||
uint32_t granularity,
|
||||
uint32_t preemption);
|
||||
uint32_t preemption,
|
||||
uint32_t hw_submission);
|
||||
|
||||
int amd_sched_destroy(struct amd_gpu_scheduler *sched);
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user