drivers/gpu/drm/vc4/tests/vc4_mock.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/vc4/tests/vc4_mock.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/vc4/tests/vc4_mock.h- Extension
.h- Size
- 1631 bytes
- Lines
- 62
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
../vc4_drv.h
Detected Declarations
struct vc4_dummy_crtcstruct vc4_dummy_output
Annotated Snippet
struct vc4_dummy_crtc {
struct vc4_crtc crtc;
};
struct vc4_dummy_crtc *vc4_mock_pv(struct kunit *test,
struct drm_device *drm,
struct drm_plane *plane,
const struct vc4_crtc_data *data);
struct vc4_dummy_output {
struct vc4_encoder encoder;
struct drm_connector connector;
};
#define encoder_to_vc4_dummy_output(_enc) \
container_of_const(_enc, struct vc4_dummy_output, encoder.base)
struct vc4_dummy_output *vc4_dummy_output(struct kunit *test,
struct drm_device *drm,
struct drm_crtc *crtc,
enum vc4_encoder_type vc4_encoder_type,
unsigned int kms_encoder_type,
unsigned int connector_type);
struct vc4_dev *vc4_mock_device(struct kunit *test);
struct vc4_dev *vc5_mock_device(struct kunit *test);
int vc4_mock_atomic_add_output(struct kunit *test,
struct drm_atomic_commit *state,
enum vc4_encoder_type type);
int vc4_mock_atomic_del_output(struct kunit *test,
struct drm_atomic_commit *state,
enum vc4_encoder_type type);
#endif // VC4_MOCK_H_
Annotation
- Immediate include surface: `../vc4_drv.h`.
- Detected declarations: `struct vc4_dummy_crtc`, `struct vc4_dummy_output`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.