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.

Dependency Surface

Detected Declarations

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

Implementation Notes