drivers/gpu/drm/i915/gem/selftests/i915_gem_object.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gem/selftests/i915_gem_object.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/gem/selftests/i915_gem_object.c- Extension
.c- Size
- 2068 bytes
- Lines
- 100
- 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_selftest.hhuge_gem_object.hselftests/igt_flush_test.hselftests/mock_gem_device.h
Detected Declarations
function igt_gem_objectfunction igt_gem_hugefunction i915_gem_object_mock_selftestsfunction i915_gem_object_live_selftests
Annotated Snippet
i915_gem_object_get_page(obj, n % nreal)) {
pr_err("Page lookup mismatch at index %lu [%lu]\n",
n, n % nreal);
err = -EINVAL;
goto out_unpin;
}
}
out_unpin:
i915_gem_object_unpin_pages(obj);
out:
i915_gem_object_put(obj);
return err;
}
int i915_gem_object_mock_selftests(void)
{
static const struct i915_subtest tests[] = {
SUBTEST(igt_gem_object),
};
struct drm_i915_private *i915;
int err;
i915 = mock_gem_device();
if (!i915)
return -ENOMEM;
err = i915_subtests(tests, i915);
mock_destroy_device(i915);
return err;
}
int i915_gem_object_live_selftests(struct drm_i915_private *i915)
{
static const struct i915_subtest tests[] = {
SUBTEST(igt_gem_huge),
};
return i915_live_subtests(tests, i915);
}
Annotation
- Immediate include surface: `i915_selftest.h`, `huge_gem_object.h`, `selftests/igt_flush_test.h`, `selftests/mock_gem_device.h`.
- Detected declarations: `function igt_gem_object`, `function igt_gem_huge`, `function i915_gem_object_mock_selftests`, `function i915_gem_object_live_selftests`.
- 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.