drivers/gpu/drm/xe/xe_wait_user_fence.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_wait_user_fence.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/xe/xe_wait_user_fence.c
Extension
.c
Size
4286 bytes
Lines
183
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (signal_pending(current)) {
			err = -ERESTARTSYS;
			break;
		}

		if (q) {
			if (q->ops->reset_status(q)) {
				drm_info(&xe->drm, "exec queue reset detected\n");
				err = -EIO;
				break;
			}
		}

		if (!timeout) {
			LNL_FLUSH_WORKQUEUE(xe->ordered_wq);
			err = do_compare(addr, args->value, args->mask,
					 args->op);
			if (err <= 0) {
				drm_dbg(&xe->drm, "LNL_FLUSH_WORKQUEUE resolved ufence timeout\n");
				break;
			}
			err = -ETIME;
			break;
		}

		timeout = wait_woken(&w_wait, TASK_INTERRUPTIBLE, timeout);
	}
	remove_wait_queue(&xe->ufence_wq, &w_wait);

	if (!(args->flags & DRM_XE_UFENCE_WAIT_FLAG_ABSTIME)) {
		args->timeout -= ktime_to_ns(ktime_sub(ktime_get(), start));
		if (args->timeout < 0)
			args->timeout = 0;
	}

	if (q)
		xe_exec_queue_put(q);

	return err;
}

Annotation

Implementation Notes