drivers/gpu/drm/panel/panel-truly-nt35597.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-truly-nt35597.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/panel/panel-truly-nt35597.c
Extension
.c
Size
14681 bytes
Lines
632
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 cmd_set {
	u8 commands[4];
	u8 size;
};

struct nt35597_config {
	u32 width_mm;
	u32 height_mm;
	const char *panel_name;
	const struct cmd_set *panel_on_cmds;
	u32 num_on_cmds;
	const struct drm_display_mode *dm;
};

struct truly_nt35597 {
	struct device *dev;
	struct drm_panel panel;

	struct regulator_bulk_data supplies[ARRAY_SIZE(regulator_names)];

	struct gpio_desc *reset_gpio;
	struct gpio_desc *mode_gpio;

	struct backlight_device *backlight;

	struct mipi_dsi_device *dsi[2];

	const struct nt35597_config *config;
};

static inline struct truly_nt35597 *panel_to_ctx(struct drm_panel *panel)
{
	return container_of(panel, struct truly_nt35597, panel);
}

static const struct cmd_set qcom_2k_panel_magic_cmds[] = {
	/* CMD2_P0 */
	{ { 0xff, 0x20 }, 2 },
	{ { 0xfb, 0x01 }, 2 },
	{ { 0x00, 0x01 }, 2 },
	{ { 0x01, 0x55 }, 2 },
	{ { 0x02, 0x45 }, 2 },
	{ { 0x05, 0x40 }, 2 },
	{ { 0x06, 0x19 }, 2 },
	{ { 0x07, 0x1e }, 2 },
	{ { 0x0b, 0x73 }, 2 },
	{ { 0x0c, 0x73 }, 2 },
	{ { 0x0e, 0xb0 }, 2 },
	{ { 0x0f, 0xae }, 2 },
	{ { 0x11, 0xb8 }, 2 },
	{ { 0x13, 0x00 }, 2 },
	{ { 0x58, 0x80 }, 2 },
	{ { 0x59, 0x01 }, 2 },
	{ { 0x5a, 0x00 }, 2 },
	{ { 0x5b, 0x01 }, 2 },
	{ { 0x5c, 0x80 }, 2 },
	{ { 0x5d, 0x81 }, 2 },
	{ { 0x5e, 0x00 }, 2 },
	{ { 0x5f, 0x01 }, 2 },
	{ { 0x72, 0x11 }, 2 },
	{ { 0x68, 0x03 }, 2 },
	/* CMD2_P4 */
	{ { 0xFF, 0x24 }, 2 },
	{ { 0xFB, 0x01 }, 2 },
	{ { 0x00, 0x1C }, 2 },
	{ { 0x01, 0x0B }, 2 },
	{ { 0x02, 0x0C }, 2 },
	{ { 0x03, 0x01 }, 2 },
	{ { 0x04, 0x0F }, 2 },
	{ { 0x05, 0x10 }, 2 },
	{ { 0x06, 0x10 }, 2 },
	{ { 0x07, 0x10 }, 2 },
	{ { 0x08, 0x89 }, 2 },
	{ { 0x09, 0x8A }, 2 },
	{ { 0x0A, 0x13 }, 2 },
	{ { 0x0B, 0x13 }, 2 },
	{ { 0x0C, 0x15 }, 2 },
	{ { 0x0D, 0x15 }, 2 },
	{ { 0x0E, 0x17 }, 2 },
	{ { 0x0F, 0x17 }, 2 },
	{ { 0x10, 0x1C }, 2 },
	{ { 0x11, 0x0B }, 2 },
	{ { 0x12, 0x0C }, 2 },
	{ { 0x13, 0x01 }, 2 },
	{ { 0x14, 0x0F }, 2 },
	{ { 0x15, 0x10 }, 2 },
	{ { 0x16, 0x10 }, 2 },
	{ { 0x17, 0x10 }, 2 },
	{ { 0x18, 0x89 }, 2 },
	{ { 0x19, 0x8A }, 2 },

Annotation

Implementation Notes