@@ -60,7 +60,6 @@ static struct xe_exec_queue *__xe_exec_queue_create(struct xe_device *xe,
6060 q -> fence_irq = & gt -> fence_irq [hwe -> class ];
6161 q -> ring_ops = gt -> ring_ops [hwe -> class ];
6262 q -> ops = gt -> exec_queue_ops ;
63- INIT_LIST_HEAD (& q -> persistent .link );
6463 INIT_LIST_HEAD (& q -> compute .link );
6564 INIT_LIST_HEAD (& q -> multi_gt_link );
6665
@@ -326,23 +325,6 @@ static int exec_queue_set_preemption_timeout(struct xe_device *xe,
326325 return q -> ops -> set_preempt_timeout (q , value );
327326}
328327
329- static int exec_queue_set_persistence (struct xe_device * xe , struct xe_exec_queue * q ,
330- u64 value , bool create )
331- {
332- if (XE_IOCTL_DBG (xe , !create ))
333- return - EINVAL ;
334-
335- if (XE_IOCTL_DBG (xe , xe_vm_in_preempt_fence_mode (q -> vm )))
336- return - EINVAL ;
337-
338- if (value )
339- q -> flags |= EXEC_QUEUE_FLAG_PERSISTENT ;
340- else
341- q -> flags &= ~EXEC_QUEUE_FLAG_PERSISTENT ;
342-
343- return 0 ;
344- }
345-
346328static int exec_queue_set_job_timeout (struct xe_device * xe , struct xe_exec_queue * q ,
347329 u64 value , bool create )
348330{
@@ -414,7 +396,6 @@ static const xe_exec_queue_set_property_fn exec_queue_set_property_funcs[] = {
414396 [DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY ] = exec_queue_set_priority ,
415397 [DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE ] = exec_queue_set_timeslice ,
416398 [DRM_XE_EXEC_QUEUE_SET_PROPERTY_PREEMPTION_TIMEOUT ] = exec_queue_set_preemption_timeout ,
417- [DRM_XE_EXEC_QUEUE_SET_PROPERTY_PERSISTENCE ] = exec_queue_set_persistence ,
418399 [DRM_XE_EXEC_QUEUE_SET_PROPERTY_JOB_TIMEOUT ] = exec_queue_set_job_timeout ,
419400 [DRM_XE_EXEC_QUEUE_SET_PROPERTY_ACC_TRIGGER ] = exec_queue_set_acc_trigger ,
420401 [DRM_XE_EXEC_QUEUE_SET_PROPERTY_ACC_NOTIFY ] = exec_queue_set_acc_notify ,
@@ -441,6 +422,9 @@ static int exec_queue_user_ext_set_property(struct xe_device *xe,
441422 return - EINVAL ;
442423
443424 idx = array_index_nospec (ext .property , ARRAY_SIZE (exec_queue_set_property_funcs ));
425+ if (!exec_queue_set_property_funcs [idx ])
426+ return - EINVAL ;
427+
444428 return exec_queue_set_property_funcs [idx ](xe , q , ext .value , create );
445429}
446430
@@ -704,9 +688,7 @@ int xe_exec_queue_create_ioctl(struct drm_device *dev, void *data,
704688 }
705689
706690 q = xe_exec_queue_create (xe , vm , logical_mask ,
707- args -> width , hwe ,
708- xe_vm_in_lr_mode (vm ) ? 0 :
709- EXEC_QUEUE_FLAG_PERSISTENT );
691+ args -> width , hwe , 0 );
710692 up_read (& vm -> lock );
711693 xe_vm_put (vm );
712694 if (IS_ERR (q ))
@@ -728,8 +710,6 @@ int xe_exec_queue_create_ioctl(struct drm_device *dev, void *data,
728710 goto kill_exec_queue ;
729711 }
730712
731- q -> persistent .xef = xef ;
732-
733713 mutex_lock (& xef -> exec_queue .lock );
734714 err = xa_alloc (& xef -> exec_queue .xa , & id , q , xa_limit_32b , GFP_KERNEL );
735715 mutex_unlock (& xef -> exec_queue .lock );
@@ -872,10 +852,7 @@ int xe_exec_queue_destroy_ioctl(struct drm_device *dev, void *data,
872852 if (XE_IOCTL_DBG (xe , !q ))
873853 return - ENOENT ;
874854
875- if (!(q -> flags & EXEC_QUEUE_FLAG_PERSISTENT ))
876- xe_exec_queue_kill (q );
877- else
878- xe_device_add_persistent_exec_queues (xe , q );
855+ xe_exec_queue_kill (q );
879856
880857 trace_xe_exec_queue_close (q );
881858 xe_exec_queue_put (q );
0 commit comments