extern int amdgpu_vm_size;
extern int amdgpu_vm_block_size;
extern int amdgpu_enable_scheduler;
+extern int amdgpu_sched_jobs;
#define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000
#define AMDGPU_MAX_USEC_TIMEOUT 100000 /* 100 ms */
rq = &adev->rings[i]->scheduler->kernel_rq;
r = amd_context_entity_init(adev->rings[i]->scheduler,
&ctx->rings[i].c_entity,
- NULL, rq, *id);
+ NULL, rq, *id,
+ amdgpu_sched_jobs);
if (r)
break;
}
int amdgpu_vm_block_size = -1;
int amdgpu_exp_hw_support = 0;
int amdgpu_enable_scheduler = 0;
+int amdgpu_sched_jobs = 16;
MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes");
module_param_named(vramlimit, amdgpu_vram_limit, int, 0600);
MODULE_PARM_DESC(enable_scheduler, "enable SW GPU scheduler (1 = enable, 0 = disable ((default))");
module_param_named(enable_scheduler, amdgpu_enable_scheduler, int, 0444);
+MODULE_PARM_DESC(sched_jobs, "the max number of jobs supported in the sw queue (default 16)");
+module_param_named(sched_jobs, amdgpu_sched_jobs, int, 0444);
+
static struct pci_device_id pciidlist[] = {
#ifdef CONFIG_DRM_AMDGPU_CIK
/* Kaveri */
* @parent The parent entity of this amd_context_entity
* @rq The run queue this entity belongs
* @context_id The context id for this entity
+ * @jobs The max number of jobs in the job queue
*
* return 0 if succeed. negative error code on failure
*/
struct amd_context_entity *entity,
struct amd_sched_entity *parent,
struct amd_run_queue *rq,
- uint32_t context_id)
+ uint32_t context_id,
+ uint32_t jobs)
{
uint64_t seq_ring = 0;
init_waitqueue_head(&entity->wait_queue);
init_waitqueue_head(&entity->wait_emit);
if(kfifo_alloc(&entity->job_queue,
- AMD_MAX_JOB_ENTRY_PER_CONTEXT * sizeof(void *),
+ jobs * sizeof(void *),
GFP_KERNEL))
return -EINVAL;
#include <linux/kfifo.h>
#define AMD_MAX_ACTIVE_HW_SUBMISSION 2
-#define AMD_MAX_JOB_ENTRY_PER_CONTEXT 16
#define AMD_KERNEL_CONTEXT_ID 0
#define AMD_KERNEL_PROCESS_ID 0
struct amd_context_entity *entity,
struct amd_sched_entity *parent,
struct amd_run_queue *rq,
- uint32_t context_id);
+ uint32_t context_id,
+ uint32_t jobs);
#endif