drivers/gpu/drm/loongson/lsdc_gfxpll.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/loongson/lsdc_gfxpll.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/loongson/lsdc_gfxpll.h
Extension
.h
Size
1164 bytes
Lines
53
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 loongson_gfxpll_parms {
	unsigned int ref_clock;
	unsigned int div_ref;
	unsigned int loopc;
	unsigned int div_out_dc;
	unsigned int div_out_gmc;
	unsigned int div_out_gpu;
};

struct loongson_gfxpll_funcs {
	int (*init)(struct loongson_gfxpll * const this);

	int (*update)(struct loongson_gfxpll * const this,
		      struct loongson_gfxpll_parms const *pin);

	void (*get_rates)(struct loongson_gfxpll * const this,
			  unsigned int *dc, unsigned int *gmc, unsigned int *gpu);

	void (*print)(struct loongson_gfxpll * const this,
		      struct drm_printer *printer, bool verbose);
};

struct loongson_gfxpll {
	struct drm_device *ddev;
	void __iomem *mmio;

	/* PLL register offset */
	u32 reg_base;
	/* PLL register size in bytes */
	u32 reg_size;

	const struct loongson_gfxpll_funcs *funcs;

	struct loongson_gfxpll_parms parms;
};

int loongson_gfxpll_create(struct drm_device *ddev,
			   struct loongson_gfxpll **ppout);

#endif

Annotation

Implementation Notes