drivers/gpu/drm/tilcdc/tilcdc_drv.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/tilcdc/tilcdc_drv.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/tilcdc/tilcdc_drv.h
Extension
.h
Size
2532 bytes
Lines
109
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 tilcdc_drm_private {
	void __iomem *mmio;

	struct clk *clk;         /* functional clock */
	int rev;                 /* IP revision */

	unsigned int irq;

	struct drm_device ddev;

	/* don't attempt resolutions w/ higher W * H * Hz: */
	uint32_t max_bandwidth;
	/*
	 * Pixel Clock will be restricted to some value as
	 * defined in the device datasheet measured in KHz
	 */
	uint32_t max_pixelclock;
	/*
	 * Max allowable width is limited on a per device basis
	 * measured in pixels
	 */
	uint32_t max_width;

	u32 fifo_th;

	/* Supported pixel formats */
	const uint32_t *pixelformats;
	uint32_t num_pixelformats;

#ifdef CONFIG_CPU_FREQ
	struct notifier_block freq_transition;
#endif

	struct workqueue_struct *wq;

	struct drm_crtc *crtc;

	struct tilcdc_encoder *encoder;
	struct drm_connector *connector;

	bool irq_enabled;
};

#define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__)

#define ddev_to_tilcdc_priv(x) container_of(x, struct tilcdc_drm_private, ddev)

int tilcdc_crtc_create(struct drm_device *dev);
irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc);
void tilcdc_crtc_update_clk(struct drm_crtc *crtc);
void tilcdc_crtc_shutdown(struct drm_crtc *crtc);
int tilcdc_crtc_update_fb(struct drm_crtc *crtc,
		struct drm_framebuffer *fb,
		struct drm_pending_vblank_event *event);

struct tilcdc_plane {
	struct drm_plane base;
};

struct tilcdc_encoder {
	struct drm_encoder base;
};

struct tilcdc_plane *tilcdc_plane_init(struct drm_device *dev);

#endif /* __TILCDC_DRV_H__ */

Annotation

Implementation Notes