drivers/gpu/drm/tidss/tidss_dispc.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/tidss/tidss_dispc.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/tidss/tidss_dispc.c
Extension
.c
Size
80942 bytes
Lines
3075
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 dss_vp_data {
	u32 *gamma_table;
};

struct dispc_device {
	struct tidss_device *tidss;
	struct device *dev;

	void __iomem *base_common;
	void __iomem *base_vid[TIDSS_MAX_PLANES];
	void __iomem *base_ovr[TIDSS_MAX_PORTS];
	void __iomem *base_vp[TIDSS_MAX_PORTS];

	struct regmap *am65x_oldi_io_ctrl;

	struct clk *vp_clk[TIDSS_MAX_PORTS];

	const struct dispc_features *feat;

	struct clk *fclk;

	bool is_enabled;

	struct dss_vp_data vp_data[TIDSS_MAX_PORTS];

	u32 *fourccs;
	u32 num_fourccs;

	u32 memory_bandwidth_limit;

	struct dispc_errata errata;
};

static void dispc_write(struct dispc_device *dispc, u16 reg, u32 val)
{
	iowrite32(val, dispc->base_common + reg);
}

static u32 dispc_read(struct dispc_device *dispc, u16 reg)
{
	return ioread32(dispc->base_common + reg);
}

static
void dispc_vid_write(struct dispc_device *dispc, u32 hw_plane, u16 reg, u32 val)
{
	void __iomem *base = dispc->base_vid[hw_plane];

	iowrite32(val, base + reg);
}

static u32 dispc_vid_read(struct dispc_device *dispc, u32 hw_plane, u16 reg)
{
	void __iomem *base = dispc->base_vid[hw_plane];

	return ioread32(base + reg);
}

static void dispc_ovr_write(struct dispc_device *dispc, u32 hw_videoport,
			    u16 reg, u32 val)
{
	void __iomem *base = dispc->base_ovr[hw_videoport];

	iowrite32(val, base + reg);
}

static u32 dispc_ovr_read(struct dispc_device *dispc, u32 hw_videoport, u16 reg)
{
	void __iomem *base = dispc->base_ovr[hw_videoport];

	return ioread32(base + reg);
}

static void dispc_vp_write(struct dispc_device *dispc, u32 hw_videoport,
			   u16 reg, u32 val)
{
	void __iomem *base = dispc->base_vp[hw_videoport];

	iowrite32(val, base + reg);
}

static u32 dispc_vp_read(struct dispc_device *dispc, u32 hw_videoport, u16 reg)
{
	void __iomem *base = dispc->base_vp[hw_videoport];

	return ioread32(base + reg);
}

int tidss_configure_oldi(struct tidss_device *tidss, u32 hw_videoport,
			 u32 oldi_cfg)

Annotation

Implementation Notes