drivers/gpu/drm/i915/display/intel_quirks.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_quirks.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_quirks.c- Extension
.c- Size
- 10384 bytes
- Lines
- 346
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dmi.hdrm/drm_print.hintel_display_core.hintel_display_types.hintel_quirks.h
Detected Declarations
struct intel_quirkstruct intel_dpcd_quirkstruct intel_dmi_quirkfunction intel_set_quirkfunction intel_set_dpcd_quirkfunction machinesfunction machinefunction quirk_backlight_presentfunction quirk_increase_t12_delayfunction quirk_increase_ddi_disabled_timefunction quirk_no_pps_backlight_power_hookfunction quirk_fw_sync_lenfunction quirk_edp_limit_rate_hbr2function quirk_disable_edp_panel_replayfunction quirk_disable_psr2function intel_dmi_reverse_brightnessfunction intel_dmi_no_pps_backlightfunction DMI_MATCHfunction intel_init_quirksfunction intel_init_dpcd_quirksfunction intel_has_quirkfunction intel_has_dpcd_quirk
Annotated Snippet
struct intel_quirk {
int device;
int subsystem_vendor;
int subsystem_device;
void (*hook)(struct intel_display *display);
};
struct intel_dpcd_quirk {
int device;
int subsystem_vendor;
int subsystem_device;
u8 sink_oui[3];
u8 sink_device_id[6];
void (*hook)(struct intel_dp *intel_dp);
};
#define SINK_OUI(first, second, third) { (first), (second), (third) }
#define SINK_DEVICE_ID(first, second, third, fourth, fifth, sixth) \
{ (first), (second), (third), (fourth), (fifth), (sixth) }
#define SINK_DEVICE_ID_ANY SINK_DEVICE_ID(0, 0, 0, 0, 0, 0)
#define DEVICE_ID_ANY 0
/* For systems that don't have a meaningful PCI subdevice/subvendor ID */
struct intel_dmi_quirk {
void (*hook)(struct intel_display *display);
const struct dmi_system_id (*dmi_id_list)[];
};
static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
{
DRM_INFO("Backlight polarity reversed on %s\n", id->ident);
return 1;
}
static int intel_dmi_no_pps_backlight(const struct dmi_system_id *id)
{
DRM_INFO("No pps backlight support on %s\n", id->ident);
return 1;
}
static const struct intel_dmi_quirk intel_dmi_quirks[] = {
{
.dmi_id_list = &(const struct dmi_system_id[]) {
{
.callback = intel_dmi_reverse_brightness,
.ident = "NCR Corporation",
.matches = {DMI_MATCH(DMI_SYS_VENDOR, "NCR Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, ""),
},
},
{
.callback = intel_dmi_reverse_brightness,
.ident = "Thundersoft TST178 tablet",
/* DMI strings are too generic, also match on BIOS date */
.matches = {DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."),
DMI_EXACT_MATCH(DMI_BIOS_DATE, "04/15/2014"),
},
},
{ } /* terminating entry */
},
.hook = quirk_invert_brightness,
},
{
.dmi_id_list = &(const struct dmi_system_id[]) {
{
.callback = intel_dmi_no_pps_backlight,
.ident = "Google Lillipup sku524294",
.matches = {DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Google"),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Lindar"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "sku524294"),
},
},
{
.callback = intel_dmi_no_pps_backlight,
.ident = "Google Lillipup sku524295",
.matches = {DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Google"),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Lindar"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "sku524295"),
},
},
{ }
},
.hook = quirk_no_pps_backlight_power_hook,
},
};
Annotation
- Immediate include surface: `linux/dmi.h`, `drm/drm_print.h`, `intel_display_core.h`, `intel_display_types.h`, `intel_quirks.h`.
- Detected declarations: `struct intel_quirk`, `struct intel_dpcd_quirk`, `struct intel_dmi_quirk`, `function intel_set_quirk`, `function intel_set_dpcd_quirk`, `function machines`, `function machine`, `function quirk_backlight_present`, `function quirk_increase_t12_delay`, `function quirk_increase_ddi_disabled_time`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.