@@ -262,7 +262,7 @@ impl<T: JobImpl> Entity<T> {
262
262
///
263
263
/// The entity must outlive the pending job until it transitions into the submitted state,
264
264
/// after which the scheduler owns it.
265
- pub fn new_job ( & self , inner : T ) -> Result < PendingJob < ' _ , T > > {
265
+ pub fn new_job ( & self , credits : u32 , inner : T ) -> Result < PendingJob < ' _ , T > > {
266
266
let mut job: Box < MaybeUninit < Job < T > > > = Box :: try_new_zeroed ( ) ?;
267
267
268
268
// SAFETY: We hold a reference to the entity (which is a valid pointer),
@@ -271,6 +271,7 @@ impl<T: JobImpl> Entity<T> {
271
271
bindings:: drm_sched_job_init (
272
272
addr_of_mut ! ( ( * job. as_mut_ptr( ) ) . job) ,
273
273
& self . 0 . as_ref ( ) . get_ref ( ) . entity as * const _ as * mut _ ,
274
+ credits,
274
275
core:: ptr:: null_mut ( ) ,
275
276
)
276
277
} ) ?;
@@ -310,12 +311,14 @@ impl<T: JobImpl> Scheduler<T> {
310
311
run_job : Some ( run_job_cb :: < T > ) ,
311
312
timedout_job : Some ( timedout_job_cb :: < T > ) ,
312
313
free_job : Some ( free_job_cb :: < T > ) ,
314
+ update_job_credits : None ,
313
315
} ;
314
316
/// Creates a new DRM Scheduler object
315
317
// TODO: Shared timeout workqueues & scores
316
318
pub fn new (
317
319
device : & impl device:: RawDevice ,
318
- hw_submission : u32 ,
320
+ num_rqs : u32 ,
321
+ credit_limit : u32 ,
319
322
hang_limit : u32 ,
320
323
timeout_ms : usize ,
321
324
name : & ' static CStr ,
@@ -327,7 +330,9 @@ impl<T: JobImpl> Scheduler<T> {
327
330
bindings:: drm_sched_init (
328
331
addr_of_mut ! ( ( * sched. as_mut_ptr( ) ) . sched) ,
329
332
& Self :: OPS ,
330
- hw_submission,
333
+ core:: ptr:: null_mut ( ) ,
334
+ num_rqs,
335
+ credit_limit,
331
336
hang_limit,
332
337
bindings:: msecs_to_jiffies ( timeout_ms. try_into ( ) ?) . try_into ( ) ?,
333
338
core:: ptr:: null_mut ( ) ,
0 commit comments