drivers/gpu/drm/i915/selftests/mock_drm.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/selftests/mock_drm.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/selftests/mock_drm.h- Extension
.h- Size
- 1526 bytes
- Lines
- 46
- 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
drm/drm_file.hi915_drv.h
Detected Declarations
struct drm_filestruct file
Annotated Snippet
#ifndef __MOCK_DRM_H
#define __MOCK_DRM_H
#include <drm/drm_file.h>
#include "i915_drv.h"
struct drm_file;
struct file;
static inline struct file *mock_file(struct drm_i915_private *i915)
{
return mock_drm_getfile(i915->drm.primary, O_RDWR);
}
static inline struct drm_file *to_drm_file(struct file *f)
{
return f->private_data;
}
#endif /* !__MOCK_DRM_H */
Annotation
- Immediate include surface: `drm/drm_file.h`, `i915_drv.h`.
- Detected declarations: `struct drm_file`, `struct file`.
- 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.