drivers/gpu/drm/i915/gt/uc/selftest_guc_hangcheck.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gt/uc/selftest_guc_hangcheck.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/i915/gt/uc/selftest_guc_hangcheck.c
Extension
.c
Size
3601 bytes
Lines
163
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 (IS_ERR(rq)) {
			ret = PTR_ERR(rq);
			goto err;
		}

		ret = intel_selftest_wait_for_rq(rq);
		i915_request_put(rq);
		if (ret) {
			gt_err(gt, "No-op failed to complete: %pe\n", ERR_PTR(ret));
			goto err;
		}
	}

err:
	intel_runtime_pm_put(gt->uncore->rpm, wakeref);
	kernel_context_close(ctx);

	return ret;
}

int intel_guc_hang_check(struct drm_i915_private *i915)
{
	static const struct i915_subtest tests[] = {
		SUBTEST(intel_hang_guc),
	};
	struct intel_gt *gt = to_gt(i915);

	if (intel_gt_is_wedged(gt))
		return 0;

	if (!intel_uc_uses_guc_submission(&gt->uc))
		return 0;

	return intel_gt_live_subtests(tests, gt);
}

Annotation

Implementation Notes