drivers/gpu/drm/msm/disp/msm_disp_snapshot.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/msm/disp/msm_disp_snapshot.h- Extension
.h- Size
- 3924 bytes
- Lines
- 146
- 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
drm/drm_atomic_helper.hdrm/drm_device.h../../../drm_crtc_internal.hdrm/drm_print.hdrm/drm_atomic.hlinux/debugfs.hlinux/list.hlinux/delay.hlinux/spinlock.hlinux/ktime.hlinux/uaccess.hlinux/dma-buf.hlinux/slab.hlinux/list_sort.hlinux/pm.hlinux/pm_runtime.hlinux/kthread.hlinux/devcoredump.hmsm_kms.h
Detected Declarations
struct msm_disp_statestruct msm_disp_state_block
Annotated Snippet
struct msm_disp_state {
struct device *dev;
struct drm_device *drm_dev;
struct list_head blocks;
struct drm_atomic_commit *atomic_state;
struct timespec64 time;
};
/**
* struct msm_disp_state_block - structure to store each hardware block state
* @name: name of the block
* @node: handle to the linked list head
* @size: size of the register space of this hardware block
* @state: array holding the register dump of this hardware block
* @base_addr: starting address of this hardware block's register space
*/
struct msm_disp_state_block {
char name[SZ_128];
struct list_head node;
unsigned int size;
u32 *state;
void __iomem *base_addr;
};
/**
* msm_disp_snapshot_init - initialize display snapshot
* @drm_dev: drm device handle
*
* Returns: 0 or -ERROR
*/
int msm_disp_snapshot_init(struct drm_device *drm_dev);
/**
* msm_disp_snapshot_destroy - destroy the display snapshot
* @drm_dev: drm device handle
*
* Returns: none
*/
void msm_disp_snapshot_destroy(struct drm_device *drm_dev);
/**
* msm_disp_snapshot_state_sync - synchronously snapshot display state
* @kms: the kms object
*
* Returns: state or error
*
* Context:
* Must be called with &kms->dump_mutex held
*/
struct msm_disp_state *msm_disp_snapshot_state_sync(struct msm_kms *kms);
/**
* msm_disp_snapshot_state - trigger to dump the display snapshot
* @drm_dev: handle to drm device
*
* Returns: none
*/
void msm_disp_snapshot_state(struct drm_device *drm_dev);
/**
* msm_disp_state_print - print out the current dpu state
* @disp_state: handle to drm device
* @p: handle to drm printer
*
* Returns: none
*/
void msm_disp_state_print(struct msm_disp_state *disp_state, struct drm_printer *p);
/**
* msm_disp_snapshot_capture_state - utility to capture atomic state and hw registers
* @disp_state: handle to msm_disp_state struct
*
* Returns: none
*/
void msm_disp_snapshot_capture_state(struct msm_disp_state *disp_state);
/**
* msm_disp_state_free - free the memory after the coredump has been read
* @data: handle to struct msm_disp_state
*
* Returns: none
*/
void msm_disp_state_free(void *data);
/**
* msm_disp_snapshot_add_block - add a hardware block with its register dump
* @disp_state: handle to struct msm_disp_state
Annotation
- Immediate include surface: `drm/drm_atomic_helper.h`, `drm/drm_device.h`, `../../../drm_crtc_internal.h`, `drm/drm_print.h`, `drm/drm_atomic.h`, `linux/debugfs.h`, `linux/list.h`, `linux/delay.h`.
- Detected declarations: `struct msm_disp_state`, `struct msm_disp_state_block`.
- 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.