drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c
Extension
.c
Size
9041 bytes
Lines
413
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 kingdisplay_panel {
	struct drm_panel base;
	struct mipi_dsi_device *link;

	struct regulator *supply;
	struct gpio_desc *enable_gpio;
};

struct kingdisplay_panel_cmd {
	char cmd;
	char data;
};

/*
 * According to the discussion on
 * https://review.coreboot.org/#/c/coreboot/+/22472/
 * the panel init array is not part of the panels datasheet but instead
 * just came in this form from the panel vendor.
 */
static const struct kingdisplay_panel_cmd init_code[] = {
	/* voltage setting */
	{ 0xB0, 0x00 },
	{ 0xB2, 0x02 },
	{ 0xB3, 0x11 },
	{ 0xB4, 0x00 },
	{ 0xB6, 0x80 },
	/* VCOM disable */
	{ 0xB7, 0x02 },
	{ 0xB8, 0x80 },
	{ 0xBA, 0x43 },
	/* VCOM setting */
	{ 0xBB, 0x53 },
	/* VSP setting */
	{ 0xBC, 0x0A },
	/* VSN setting */
	{ 0xBD, 0x4A },
	/* VGH setting */
	{ 0xBE, 0x2F },
	/* VGL setting */
	{ 0xBF, 0x1A },
	{ 0xF0, 0x39 },
	{ 0xF1, 0x22 },
	/* Gamma setting */
	{ 0xB0, 0x02 },
	{ 0xC0, 0x00 },
	{ 0xC1, 0x01 },
	{ 0xC2, 0x0B },
	{ 0xC3, 0x15 },
	{ 0xC4, 0x22 },
	{ 0xC5, 0x11 },
	{ 0xC6, 0x15 },
	{ 0xC7, 0x19 },
	{ 0xC8, 0x1A },
	{ 0xC9, 0x16 },
	{ 0xCA, 0x18 },
	{ 0xCB, 0x13 },
	{ 0xCC, 0x18 },
	{ 0xCD, 0x13 },
	{ 0xCE, 0x1C },
	{ 0xCF, 0x19 },
	{ 0xD0, 0x21 },
	{ 0xD1, 0x2C },
	{ 0xD2, 0x2F },
	{ 0xD3, 0x30 },
	{ 0xD4, 0x19 },
	{ 0xD5, 0x1F },
	{ 0xD6, 0x00 },
	{ 0xD7, 0x01 },
	{ 0xD8, 0x0B },
	{ 0xD9, 0x15 },
	{ 0xDA, 0x22 },
	{ 0xDB, 0x11 },
	{ 0xDC, 0x15 },
	{ 0xDD, 0x19 },
	{ 0xDE, 0x1A },
	{ 0xDF, 0x16 },
	{ 0xE0, 0x18 },
	{ 0xE1, 0x13 },
	{ 0xE2, 0x18 },
	{ 0xE3, 0x13 },
	{ 0xE4, 0x1C },
	{ 0xE5, 0x19 },
	{ 0xE6, 0x21 },
	{ 0xE7, 0x2C },
	{ 0xE8, 0x2F },
	{ 0xE9, 0x30 },
	{ 0xEA, 0x19 },
	{ 0xEB, 0x1F },
	/* GOA MUX setting */
	{ 0xB0, 0x01 },

Annotation

Implementation Notes