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.

drm/xe: Add missing kernel docs in xe_exec_queue.c

Add kernel doc to all exported functions that do not have
a kernel doc in xe_exec_queue.c.

v2: mention multi-lrc in comment (Matt Brost)

Assisted-by: Claude 4.5 Sonnet
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260303223040.140504-2-niranjana.vishwanathapura@intel.com
Link: https://patch.msgid.link/20260303223040.140504-2-niranjana.vishwanathapura@intel.com

+112
+112
drivers/gpu/drm/xe/xe_exec_queue.c
··· 399 399 return err; 400 400 } 401 401 402 + /** 403 + * xe_exec_queue_create() - Create an exec queue 404 + * @xe: Xe device 405 + * @vm: VM for the exec queue 406 + * @logical_mask: Logical mask of HW engines 407 + * @width: Width of the exec queue (number of LRCs) 408 + * @hwe: Hardware engine 409 + * @flags: Exec queue creation flags 410 + * @extensions: Extensions for exec queue creation 411 + * 412 + * Create an exec queue (allocate and initialize) with the specified parameters 413 + * 414 + * Return: Pointer to the created exec queue on success, ERR_PTR on failure 415 + */ 402 416 struct xe_exec_queue *xe_exec_queue_create(struct xe_device *xe, struct xe_vm *vm, 403 417 u32 logical_mask, u16 width, 404 418 struct xe_hw_engine *hwe, u32 flags, ··· 456 442 } 457 443 ALLOW_ERROR_INJECTION(xe_exec_queue_create, ERRNO); 458 444 445 + /** 446 + * xe_exec_queue_create_class() - Create an exec queue for a specific engine class 447 + * @xe: Xe device 448 + * @gt: GT for the exec queue 449 + * @vm: VM for the exec queue 450 + * @class: Engine class 451 + * @flags: Exec queue creation flags 452 + * @extensions: Extensions for exec queue creation 453 + * 454 + * Create an exec queue for the specified engine class. 455 + * 456 + * Return: Pointer to the created exec queue on success, ERR_PTR on failure 457 + */ 459 458 struct xe_exec_queue *xe_exec_queue_create_class(struct xe_device *xe, struct xe_gt *gt, 460 459 struct xe_vm *vm, 461 460 enum xe_engine_class class, ··· 560 533 } 561 534 ALLOW_ERROR_INJECTION(xe_exec_queue_create_bind, ERRNO); 562 535 536 + /** 537 + * xe_exec_queue_destroy() - Destroy an exec queue 538 + * @ref: Reference count of the exec queue 539 + * 540 + * Called when the last reference to the exec queue is dropped. 541 + * Cleans up all resources associated with the exec queue. 542 + * This function should not be called directly; use xe_exec_queue_put() instead. 543 + */ 563 544 void xe_exec_queue_destroy(struct kref *ref) 564 545 { 565 546 struct xe_exec_queue *q = container_of(ref, struct xe_exec_queue, refcount); ··· 600 565 q->ops->destroy(q); 601 566 } 602 567 568 + /** 569 + * xe_exec_queue_fini() - Finalize an exec queue 570 + * @q: The exec queue 571 + * 572 + * Finalizes the exec queue by updating run ticks, releasing LRC references, 573 + * and freeing the queue structure. This is called after the queue has been 574 + * destroyed and all references have been dropped. 575 + */ 603 576 void xe_exec_queue_fini(struct xe_exec_queue *q) 604 577 { 605 578 /* ··· 622 579 __xe_exec_queue_free(q); 623 580 } 624 581 582 + /** 583 + * xe_exec_queue_assign_name() - Assign a name to an exec queue 584 + * @q: The exec queue 585 + * @instance: Instance number for the engine 586 + * 587 + * Assigns a human-readable name to the exec queue based on its engine class 588 + * and instance number (e.g., "rcs0", "vcs1", "bcs2"). 589 + */ 625 590 void xe_exec_queue_assign_name(struct xe_exec_queue *q, u32 instance) 626 591 { 627 592 switch (q->class) { ··· 656 605 } 657 606 } 658 607 608 + /** 609 + * xe_exec_queue_lookup() - Look up an exec queue by ID 610 + * @xef: Xe file private data 611 + * @id: Exec queue ID 612 + * 613 + * Looks up an exec queue by its ID and increments its reference count. 614 + * 615 + * Return: Pointer to the exec queue if found, NULL otherwise 616 + */ 659 617 struct xe_exec_queue *xe_exec_queue_lookup(struct xe_file *xef, u32 id) 660 618 { 661 619 struct xe_exec_queue *q; ··· 678 618 return q; 679 619 } 680 620 621 + /** 622 + * xe_exec_queue_device_get_max_priority() - Get maximum priority for an exec queues 623 + * @xe: Xe device 624 + * 625 + * Returns the maximum priority level that can be assigned to an exec queues. 626 + * 627 + * Return: Maximum priority level (HIGH if CAP_SYS_NICE, NORMAL otherwise) 628 + */ 681 629 enum xe_exec_queue_priority 682 630 xe_exec_queue_device_get_max_priority(struct xe_device *xe) 683 631 { ··· 992 924 exec_queue_set_multi_queue_priority, 993 925 }; 994 926 927 + /** 928 + * xe_exec_queue_set_property_ioctl() - Set a property on an exec queue 929 + * @dev: DRM device 930 + * @data: IOCTL data 931 + * @file: DRM file 932 + * 933 + * Allows setting properties on an existing exec queue. Currently only 934 + * supports setting multi-queue priority. 935 + * 936 + * Return: 0 on success, negative error code on failure 937 + */ 995 938 int xe_exec_queue_set_property_ioctl(struct drm_device *dev, void *data, 996 939 struct drm_file *file) 997 940 { ··· 1227 1148 return false; 1228 1149 } 1229 1150 1151 + /** 1152 + * xe_exec_queue_create_ioctl() - Create an exec queue via IOCTL 1153 + * @dev: DRM device 1154 + * @data: IOCTL data 1155 + * @file: DRM file 1156 + * 1157 + * Creates a new exec queue based on user-provided parameters. Supports 1158 + * creating VM bind queues, regular exec queues, multi-lrc exec queues 1159 + * and multi-queue groups. 1160 + * 1161 + * Return: 0 on success with exec_queue_id filled in, negative error code on failure 1162 + */ 1230 1163 int xe_exec_queue_create_ioctl(struct drm_device *dev, void *data, 1231 1164 struct drm_file *file) 1232 1165 { ··· 1415 1324 return err; 1416 1325 } 1417 1326 1327 + /** 1328 + * xe_exec_queue_get_property_ioctl() - Get a property from an exec queue 1329 + * @dev: DRM device 1330 + * @data: IOCTL data 1331 + * @file: DRM file 1332 + * 1333 + * Retrieves property values from an existing exec queue. Currently supports 1334 + * getting the ban/reset status. 1335 + * 1336 + * Return: 0 on success with value filled in, negative error code on failure 1337 + */ 1418 1338 int xe_exec_queue_get_property_ioctl(struct drm_device *dev, void *data, 1419 1339 struct drm_file *file) 1420 1340 { ··· 1563 1461 xe_vm_remove_compute_exec_queue(q->vm, q); 1564 1462 } 1565 1463 1464 + /** 1465 + * xe_exec_queue_destroy_ioctl() - Destroy an exec queue via IOCTL 1466 + * @dev: DRM device 1467 + * @data: IOCTL data 1468 + * @file: DRM file 1469 + * 1470 + * Destroys an existing exec queue and releases its reference. 1471 + * 1472 + * Return: 0 on success, negative error code on failure 1473 + */ 1566 1474 int xe_exec_queue_destroy_ioctl(struct drm_device *dev, void *data, 1567 1475 struct drm_file *file) 1568 1476 {