drivers/gpu/drm/drm_panel_backlight_quirks.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/drm_panel_backlight_quirks.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/drm_panel_backlight_quirks.c
Extension
.c
Size
4369 bytes
Lines
157
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: exported/initcall integration point
Status
integration 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 drm_panel_match {
	enum dmi_field field;
	const char * const value;
};

struct drm_get_panel_backlight_quirk {
	struct drm_panel_match dmi_match;
	struct drm_panel_match dmi_match_other;
	struct drm_edid_ident ident;
	struct drm_panel_backlight_quirk quirk;
};

static const struct drm_get_panel_backlight_quirk drm_panel_min_backlight_quirks[] = {
	/* 13 inch matte panel */
	{
		.dmi_match.field = DMI_BOARD_VENDOR,
		.dmi_match.value = "Framework",
		.ident.panel_id = drm_edid_encode_panel_id('B', 'O', 'E', 0x0bca),
		.ident.name = "NE135FBM-N41",
		.quirk = { .min_brightness = 1, },
	},
	/* 13 inch glossy panel */
	{
		.dmi_match.field = DMI_BOARD_VENDOR,
		.dmi_match.value = "Framework",
		.ident.panel_id = drm_edid_encode_panel_id('B', 'O', 'E', 0x095f),
		.ident.name = "NE135FBM-N41",
		.quirk = { .min_brightness = 1, },
	},
	/* 13 inch 2.8k panel */
	{
		.dmi_match.field = DMI_BOARD_VENDOR,
		.dmi_match.value = "Framework",
		.ident.panel_id = drm_edid_encode_panel_id('B', 'O', 'E', 0x0cb4),
		.ident.name = "NE135A1M-NY1",
		.quirk = { .min_brightness = 1, },
	},
	/* Steam Deck models */
	{
		.dmi_match.field = DMI_SYS_VENDOR,
		.dmi_match.value = "Valve",
		.dmi_match_other.field = DMI_PRODUCT_NAME,
		.dmi_match_other.value = "Jupiter",
		.quirk = { .min_brightness = 1, },
	},
	{
		.dmi_match.field = DMI_SYS_VENDOR,
		.dmi_match.value = "Valve",
		.dmi_match_other.field = DMI_PRODUCT_NAME,
		.dmi_match_other.value = "Galileo",
		.quirk = { .min_brightness = 1, },
	},
	/* Have OLED Panels with brightness issue when last byte is 0/1 */
	{
		.dmi_match.field = DMI_SYS_VENDOR,
		.dmi_match.value = "AYANEO",
		.dmi_match_other.field = DMI_PRODUCT_NAME,
		.dmi_match_other.value = "AYANEO 3",
		.quirk = { .brightness_mask = 3, },
	},
	{
		.dmi_match.field = DMI_SYS_VENDOR,
		.dmi_match.value = "ZOTAC",
		.dmi_match_other.field = DMI_BOARD_NAME,
		.dmi_match_other.value = "G0A1W",
		.quirk = { .brightness_mask = 3, },
	},
	{
		.dmi_match.field = DMI_SYS_VENDOR,
		.dmi_match.value = "ZOTAC",
		.dmi_match_other.field = DMI_BOARD_NAME,
		.dmi_match_other.value = "G1A1W",
		.quirk = { .brightness_mask = 3, },
	},
	{
		.dmi_match.field = DMI_SYS_VENDOR,
		.dmi_match.value = "ONE-NETBOOK",
		.dmi_match_other.field = DMI_PRODUCT_NAME,
		.dmi_match_other.value = "ONEXPLAYER F1Pro",
		.quirk = { .brightness_mask = 3, },
	},
	{
		.dmi_match.field = DMI_SYS_VENDOR,
		.dmi_match.value = "ONE-NETBOOK",
		.dmi_match_other.field = DMI_PRODUCT_NAME,
		.dmi_match_other.value = "ONEXPLAYER F1 EVA-02",
		.quirk = { .brightness_mask = 3, },
	},
};

Annotation

Implementation Notes