drivers/gpu/drm/i915/selftests/igt_live_test.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/selftests/igt_live_test.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/selftests/igt_live_test.c- Extension
.c- Size
- 1801 bytes
- Lines
- 84
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
i915_drv.hgt/intel_gt.hgt/intel_gt_print.h../i915_selftest.higt_flush_test.higt_live_test.h
Detected Declarations
function igt_live_test_beginfunction for_each_gtfunction igt_live_test_endfunction for_each_gt
Annotated Snippet
if (err) {
gt_err(gt, "%s(%s): GT failed to idle before, with err=%d!",
func, name, err);
return err;
}
for_each_engine(engine, gt, id)
t->reset_engine[i][id] =
i915_reset_engine_count(&i915->gpu_error,
engine);
}
t->reset_global = i915_reset_count(&i915->gpu_error);
return 0;
}
int igt_live_test_end(struct igt_live_test *t)
{
struct drm_i915_private *i915 = t->i915;
struct intel_engine_cs *engine;
enum intel_engine_id id;
struct intel_gt *gt;
unsigned int i;
if (igt_flush_test(i915))
return -EIO;
if (t->reset_global != i915_reset_count(&i915->gpu_error)) {
pr_err("%s(%s): GPU was reset %d times!\n",
t->func, t->name,
i915_reset_count(&i915->gpu_error) - t->reset_global);
return -EIO;
}
for_each_gt(gt, i915, i) {
for_each_engine(engine, gt, id) {
if (t->reset_engine[i][id] ==
i915_reset_engine_count(&i915->gpu_error, engine))
continue;
gt_err(gt, "%s(%s): engine '%s' was reset %d times!\n",
t->func, t->name, engine->name,
i915_reset_engine_count(&i915->gpu_error, engine) -
t->reset_engine[i][id]);
return -EIO;
}
}
return 0;
}
Annotation
- Immediate include surface: `i915_drv.h`, `gt/intel_gt.h`, `gt/intel_gt_print.h`, `../i915_selftest.h`, `igt_flush_test.h`, `igt_live_test.h`.
- Detected declarations: `function igt_live_test_begin`, `function for_each_gt`, `function igt_live_test_end`, `function for_each_gt`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.