drivers/gpu/drm/panel/panel-arm-versatile.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-arm-versatile.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/panel/panel-arm-versatile.c
Extension
.c
Size
9772 bytes
Lines
376
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 versatile_panel_type {
	/**
	 * @name: the name of this panel
	 */
	const char *name;
	/**
	 * @magic: the magic value from the detection register
	 */
	u32 magic;
	/**
	 * @mode: the DRM display mode for this panel
	 */
	struct drm_display_mode mode;
	/**
	 * @bus_flags: the DRM bus flags for this panel e.g. inverted clock
	 */
	u32 bus_flags;
	/**
	 * @width_mm: the panel width in mm
	 */
	u32 width_mm;
	/**
	 * @height_mm: the panel height in mm
	 */
	u32 height_mm;
	/**
	 * @ib2: the panel may be connected on an IB2 daughterboard
	 */
	bool ib2;
};

/**
 * struct versatile_panel - state container for the Versatile panels
 */
struct versatile_panel {
	/**
	 * @dev: the container device
	 */
	struct device *dev;
	/**
	 * @panel: the DRM panel instance for this device
	 */
	struct drm_panel panel;
	/**
	 * @panel_type: the Versatile panel type as detected
	 */
	const struct versatile_panel_type *panel_type;
	/**
	 * @map: map to the parent syscon where the main register reside
	 */
	struct regmap *map;
	/**
	 * @ib2_map: map to the IB2 syscon, if applicable
	 */
	struct regmap *ib2_map;
};

static const struct versatile_panel_type versatile_panels[] = {
	/*
	 * Sanyo TM38QV67A02A - 3.8 inch QVGA (320x240) Color TFT
	 * found on the Versatile AB IB1 connector or the Versatile
	 * PB adaptor board connector.
	 */
	{
		.name = "Sanyo TM38QV67A02A",
		.magic = SYS_CLCD_ID_SANYO_3_8,
		.width_mm = 79,
		.height_mm = 54,
		.mode = {
			.clock = 10000,
			.hdisplay = 320,
			.hsync_start = 320 + 6,
			.hsync_end = 320 + 6 + 6,
			.htotal = 320 + 6 + 6 + 6,
			.vdisplay = 240,
			.vsync_start = 240 + 5,
			.vsync_end = 240 + 5 + 6,
			.vtotal = 240 + 5 + 6 + 5,
			.flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
		},
	},
	/*
	 * Sharp LQ084V1DG21 640x480 VGA Color TFT module
	 * found on the Versatile AB IB1 connector or the Versatile
	 * PB adaptor board connector.
	 */
	{
		.name = "Sharp LQ084V1DG21",
		.magic = SYS_CLCD_ID_SHARP_8_4,
		.width_mm = 171,

Annotation

Implementation Notes