Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "drm/xe/multi_queue: Support active group after primary is destroyed"

This reverts commit 3131a43ecb346ae3b5287ee195779fc38c6fcd11.

There is no must have requirement for this feature from Compute UMD.

Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260106191051.2866538-5-niranjana.vishwanathapura@intel.com

+3 -69
+1 -6
drivers/gpu/drm/xe/xe_device.c
··· 180 180 xa_for_each(&xef->exec_queue.xa, idx, q) { 181 181 if (q->vm && q->hwe->hw_engine_group) 182 182 xe_hw_engine_group_del_exec_queue(q->hwe->hw_engine_group, q); 183 - 184 - if (xe_exec_queue_is_multi_queue_primary(q)) 185 - xe_exec_queue_group_kill_put(q->multi_queue.group); 186 - else 187 - xe_exec_queue_kill(q); 188 - 183 + xe_exec_queue_kill(q); 189 184 xe_exec_queue_put(q); 190 185 } 191 186 xa_for_each(&xef->vm.xa, idx, vm)
+2 -53
drivers/gpu/drm/xe/xe_exec_queue.c
··· 467 467 } 468 468 ALLOW_ERROR_INJECTION(xe_exec_queue_create_bind, ERRNO); 469 469 470 - static void xe_exec_queue_group_kill(struct kref *ref) 471 - { 472 - struct xe_exec_queue_group *group = container_of(ref, struct xe_exec_queue_group, 473 - kill_refcount); 474 - xe_exec_queue_kill(group->primary); 475 - } 476 - 477 - static inline void xe_exec_queue_group_kill_get(struct xe_exec_queue_group *group) 478 - { 479 - kref_get(&group->kill_refcount); 480 - } 481 - 482 - void xe_exec_queue_group_kill_put(struct xe_exec_queue_group *group) 483 - { 484 - if (!group) 485 - return; 486 - 487 - kref_put(&group->kill_refcount, xe_exec_queue_group_kill); 488 - } 489 - 490 470 void xe_exec_queue_destroy(struct kref *ref) 491 471 { 492 472 struct xe_exec_queue *q = container_of(ref, struct xe_exec_queue, refcount); ··· 696 716 group->primary = q; 697 717 group->cgp_bo = bo; 698 718 INIT_LIST_HEAD(&group->list); 699 - kref_init(&group->kill_refcount); 700 719 xa_init_flags(&group->xa, XA_FLAGS_ALLOC1); 701 720 mutex_init(&group->list_lock); 702 721 q->multi_queue.group = group; ··· 771 792 772 793 q->multi_queue.pos = pos; 773 794 774 - if (group->primary->multi_queue.keep_active) { 775 - xe_exec_queue_group_kill_get(group); 776 - q->multi_queue.keep_active = true; 777 - } 778 - 779 795 return 0; 780 796 } 781 797 ··· 784 810 lrc = xa_erase(&group->xa, q->multi_queue.pos); 785 811 xe_assert(xe, lrc); 786 812 xe_lrc_put(lrc); 787 - 788 - if (q->multi_queue.keep_active) { 789 - xe_exec_queue_group_kill_put(group); 790 - q->multi_queue.keep_active = false; 791 - } 792 813 } 793 814 794 815 static int exec_queue_set_multi_group(struct xe_device *xe, struct xe_exec_queue *q, ··· 805 836 return -EINVAL; 806 837 807 838 if (value & DRM_XE_MULTI_GROUP_CREATE) { 808 - if (XE_IOCTL_DBG(xe, value & ~(DRM_XE_MULTI_GROUP_CREATE | 809 - DRM_XE_MULTI_GROUP_KEEP_ACTIVE))) 810 - return -EINVAL; 811 - 812 - /* 813 - * KEEP_ACTIVE is not supported in preempt fence mode as in that mode, 814 - * VM_DESTROY ioctl expects all exec queues of that VM are already killed. 815 - */ 816 - if (XE_IOCTL_DBG(xe, (value & DRM_XE_MULTI_GROUP_KEEP_ACTIVE) && 817 - xe_vm_in_preempt_fence_mode(q->vm))) 839 + if (XE_IOCTL_DBG(xe, value & ~DRM_XE_MULTI_GROUP_CREATE)) 818 840 return -EINVAL; 819 841 820 842 q->multi_queue.valid = true; 821 843 q->multi_queue.is_primary = true; 822 844 q->multi_queue.pos = 0; 823 - if (value & DRM_XE_MULTI_GROUP_KEEP_ACTIVE) 824 - q->multi_queue.keep_active = true; 825 - 826 845 return 0; 827 846 } 828 847 ··· 1376 1419 1377 1420 q->ops->kill(q); 1378 1421 xe_vm_remove_compute_exec_queue(q->vm, q); 1379 - 1380 - if (!xe_exec_queue_is_multi_queue_primary(q) && q->multi_queue.keep_active) { 1381 - xe_exec_queue_group_kill_put(q->multi_queue.group); 1382 - q->multi_queue.keep_active = false; 1383 - } 1384 1422 } 1385 1423 1386 1424 int xe_exec_queue_destroy_ioctl(struct drm_device *dev, void *data, ··· 1402 1450 if (q->vm && q->hwe->hw_engine_group) 1403 1451 xe_hw_engine_group_del_exec_queue(q->hwe->hw_engine_group, q); 1404 1452 1405 - if (xe_exec_queue_is_multi_queue_primary(q)) 1406 - xe_exec_queue_group_kill_put(q->multi_queue.group); 1407 - else 1408 - xe_exec_queue_kill(q); 1453 + xe_exec_queue_kill(q); 1409 1454 1410 1455 trace_xe_exec_queue_close(q); 1411 1456 xe_exec_queue_put(q);
-2
drivers/gpu/drm/xe/xe_exec_queue.h
··· 113 113 return xe_exec_queue_is_multi_queue(q) ? q->multi_queue.group->primary : q; 114 114 } 115 115 116 - void xe_exec_queue_group_kill_put(struct xe_exec_queue_group *group); 117 - 118 116 bool xe_exec_queue_is_lr(struct xe_exec_queue *q); 119 117 120 118 bool xe_exec_queue_is_idle(struct xe_exec_queue *q);
-4
drivers/gpu/drm/xe/xe_exec_queue_types.h
··· 62 62 struct list_head list; 63 63 /** @list_lock: Secondary queue list lock */ 64 64 struct mutex list_lock; 65 - /** @kill_refcount: ref count to kill primary queue */ 66 - struct kref kill_refcount; 67 65 /** @sync_pending: CGP_SYNC_DONE g2h response pending */ 68 66 bool sync_pending; 69 67 /** @banned: Group banned */ ··· 161 163 u8 valid:1; 162 164 /** @multi_queue.is_primary: Is primary queue (Q0) of the group */ 163 165 u8 is_primary:1; 164 - /** @multi_queue.keep_active: Keep the group active after primary is destroyed */ 165 - u8 keep_active:1; 166 166 } multi_queue; 167 167 168 168 /** @sched_props: scheduling properties */
-4
include/uapi/drm/xe_drm.h
··· 1280 1280 * then a new multi-queue group is created with this queue as the primary queue 1281 1281 * (Q0). Otherwise, the queue gets added to the multi-queue group whose primary 1282 1282 * queue's exec_queue_id is specified in the lower 32 bits of the 'value' field. 1283 - * If the extension's 'value' field has %DRM_XE_MULTI_GROUP_KEEP_ACTIVE flag 1284 - * set, then the multi-queue group is kept active after the primary queue is 1285 - * destroyed. 1286 1283 * All the other non-relevant bits of extension's 'value' field while adding the 1287 1284 * primary or the secondary queues of the group must be set to 0. 1288 1285 * - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY - Set the queue ··· 1328 1331 #define DRM_XE_EXEC_QUEUE_SET_HANG_REPLAY_STATE 3 1329 1332 #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_GROUP 4 1330 1333 #define DRM_XE_MULTI_GROUP_CREATE (1ull << 63) 1331 - #define DRM_XE_MULTI_GROUP_KEEP_ACTIVE (1ull << 62) 1332 1334 #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY 5 1333 1335 /** @extensions: Pointer to the first extension struct, if any */ 1334 1336 __u64 extensions;