if (amdgpu_enable_scheduler) {
ring->scheduler = amd_sched_create(&amdgpu_sched_ops,
ring->idx,
- amdgpu_sched_hw_submission);
+ amdgpu_sched_hw_submission,
+ (void *)ring->adev);
if (!ring->scheduler)
DRM_ERROR("Failed to create scheduler on ring %d.\n",
ring->idx);
* Return the pointer to scheduler for success, otherwise return NULL
*/
struct amd_gpu_scheduler *amd_sched_create(struct amd_sched_backend_ops *ops,
- unsigned ring, unsigned hw_submission)
+ unsigned ring, unsigned hw_submission,
+ void *priv)
{
struct amd_gpu_scheduler *sched;
sched->ops = ops;
sched->ring_id = ring;
sched->hw_submission_limit = hw_submission;
+ sched->priv = priv;
snprintf(sched->name, sizeof(sched->name), "amdgpu[%d]", ring);
amd_sched_rq_init(&sched->sched_rq);
amd_sched_rq_init(&sched->kernel_rq);
wait_queue_head_t wait_queue;
uint32_t hw_submission_limit;
char name[20];
+ void *priv;
};
struct amd_gpu_scheduler *
amd_sched_create(struct amd_sched_backend_ops *ops,
- uint32_t ring, uint32_t hw_submission);
+ uint32_t ring, uint32_t hw_submission, void *priv);
int amd_sched_destroy(struct amd_gpu_scheduler *sched);
int amd_sched_entity_init(struct amd_gpu_scheduler *sched,