drivers/gpu/drm/ast/ast_drv.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/ast/ast_drv.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/ast/ast_drv.h
Extension
.h
Size
14668 bytes
Lines
567
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 ast_plane {
	struct drm_plane base;

	u64 offset;
	unsigned long size;
};

static inline struct ast_plane *to_ast_plane(struct drm_plane *plane)
{
	return container_of(plane, struct ast_plane, base);
}

struct ast_cursor_plane {
	struct ast_plane base;

	u8 argb4444[AST_HWC_SIZE];
};

static inline struct ast_cursor_plane *to_ast_cursor_plane(struct drm_plane *plane)
{
	return container_of(to_ast_plane(plane), struct ast_cursor_plane, base);
}

/*
 * Connector
 */

struct ast_connector {
	struct drm_connector base;

	enum drm_connector_status physical_status;
};

static inline struct ast_connector *
to_ast_connector(struct drm_connector *connector)
{
	return container_of(connector, struct ast_connector, base);
}

/*
 * Device
 */

struct ast_device_quirks {
	/*
	 * CRTC memory request threshold
	 */
	unsigned char crtc_mem_req_threshold_low;
	unsigned char crtc_mem_req_threshold_high;

	/*
	 * Adjust hsync values to load next scanline early. Signalled
	 * by AST2500PreCatchCRT in VBIOS mode flags.
	 */
	bool crtc_hsync_precatch_needed;

	/*
	 * Workaround for modes with HSync Time that is not a multiple
	 * of 8 (e.g., 1920x1080@60Hz, HSync +44 pixels).
	 */
	bool crtc_hsync_add4_needed;
};

struct ast_device {
	struct drm_device base;

	const struct ast_device_quirks *quirks;

	void __iomem *regs;
	void __iomem *ioregs;
	void __iomem *dp501_fw_buf;

	enum ast_config_mode config_mode;
	enum ast_chip chip;

	const struct ast_vbios_dclk_info *dclk_table;

	void __iomem	*vram;
	unsigned long	vram_base;
	unsigned long	vram_size;

	struct mutex modeset_lock; /* Protects access to modeset I/O registers in ioregs */

	enum ast_tx_chip tx_chip;

	struct ast_plane primary_plane;
	struct ast_cursor_plane cursor_plane;
	struct drm_crtc crtc;
	union {
		struct {

Annotation

Implementation Notes