drivers/gpu/drm/i915/display/intel_dp_aux.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_dp_aux.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_dp_aux.c- Extension
.c- Size
- 24572 bytes
- Lines
- 930
- 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
drm/drm_print.hintel_de.hintel_display_jiffies.hintel_display_types.hintel_display_utils.hintel_dp.hintel_dp_aux.hintel_dp_aux_regs.hintel_parent.hintel_pps.hintel_quirks.hintel_tc.hintel_uncore_trace.h
Detected Declarations
function intel_dp_aux_packfunction intel_dp_aux_unpackfunction intel_dp_aux_wait_donefunction g4x_get_aux_clock_dividerfunction ilk_get_aux_clock_dividerfunction hsw_get_aux_clock_dividerfunction skl_get_aux_clock_dividerfunction intel_dp_aux_sync_lenfunction intel_dp_aux_fw_sync_lenfunction g4x_dp_aux_precharge_lenfunction g4x_get_aux_send_ctlfunction skl_get_aux_send_ctlfunction intel_dp_aux_xferfunction intel_dp_aux_headerfunction intel_dp_aux_xfer_flagsfunction intel_dp_aux_transferfunction vlv_aux_ctl_regfunction vlv_aux_data_regfunction g4x_aux_ctl_regfunction g4x_aux_data_regfunction ilk_aux_ctl_regfunction ilk_aux_data_regfunction skl_aux_ctl_regfunction skl_aux_data_regfunction tgl_aux_ctl_regfunction tgl_aux_data_regfunction xelpdp_aux_ctl_regfunction xelpdp_aux_data_regfunction intel_dp_aux_finifunction intel_dp_aux_initfunction default_aux_chfunction get_encoder_by_aux_chfunction for_each_intel_encoderfunction intel_dp_aux_chfunction intel_dp_aux_irq_handler
Annotated Snippet
switch (index) {
case 0: return 63;
case 1: return 72;
default: return 0;
}
}
return ilk_get_aux_clock_divider(intel_dp, index);
}
static u32 skl_get_aux_clock_divider(struct intel_dp *intel_dp, int index)
{
/*
* SKL doesn't need us to program the AUX clock divider (Hardware will
* derive the clock from CDCLK automatically). We still implement the
* get_aux_clock_divider vfunc to plug-in into the existing code.
*/
return index ? 0 : 1;
}
static int intel_dp_aux_sync_len(void)
{
int precharge = 16; /* 10-16 */
int preamble = 16;
return precharge + preamble;
}
int intel_dp_aux_fw_sync_len(struct intel_dp *intel_dp)
{
int precharge = 10; /* 10-16 */
int preamble = 8;
/*
* We faced some glitches on Dell Precision 5490 MTL laptop with panel:
* "Manufacturer: AUO, Model: 63898" when using HW default 18. Using 20
* is fixing these problems with the panel. It is still within range
* mentioned in eDP specification. Increasing Fast Wake sync length is
* causing problems with other panels: increase length as a quirk for
* this specific laptop.
*/
if (intel_has_dpcd_quirk(intel_dp, QUIRK_FW_SYNC_LEN))
precharge += 2;
return precharge + preamble;
}
static int g4x_dp_aux_precharge_len(void)
{
int precharge_min = 10;
int preamble = 16;
/* HW wants the length of the extra precharge in 2us units */
return (intel_dp_aux_sync_len() -
precharge_min - preamble) / 2;
}
static u32 g4x_get_aux_send_ctl(struct intel_dp *intel_dp,
int send_bytes,
u32 aux_clock_divider)
{
struct intel_display *display = to_intel_display(intel_dp);
u32 timeout;
/* Max timeout value on G4x-BDW: 1.6ms */
if (display->platform.broadwell)
timeout = DP_AUX_CH_CTL_TIME_OUT_600us;
else
timeout = DP_AUX_CH_CTL_TIME_OUT_400us;
return DP_AUX_CH_CTL_SEND_BUSY |
DP_AUX_CH_CTL_DONE |
DP_AUX_CH_CTL_INTERRUPT |
DP_AUX_CH_CTL_TIME_OUT_ERROR |
timeout |
DP_AUX_CH_CTL_RECEIVE_ERROR |
DP_AUX_CH_CTL_MESSAGE_SIZE(send_bytes) |
DP_AUX_CH_CTL_PRECHARGE_2US(g4x_dp_aux_precharge_len()) |
DP_AUX_CH_CTL_BIT_CLOCK_2X(aux_clock_divider);
}
static u32 skl_get_aux_send_ctl(struct intel_dp *intel_dp,
int send_bytes,
u32 unused)
{
struct intel_display *display = to_intel_display(intel_dp);
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
u32 ret;
/*
Annotation
- Immediate include surface: `drm/drm_print.h`, `intel_de.h`, `intel_display_jiffies.h`, `intel_display_types.h`, `intel_display_utils.h`, `intel_dp.h`, `intel_dp_aux.h`, `intel_dp_aux_regs.h`.
- Detected declarations: `function intel_dp_aux_pack`, `function intel_dp_aux_unpack`, `function intel_dp_aux_wait_done`, `function g4x_get_aux_clock_divider`, `function ilk_get_aux_clock_divider`, `function hsw_get_aux_clock_divider`, `function skl_get_aux_clock_divider`, `function intel_dp_aux_sync_len`, `function intel_dp_aux_fw_sync_len`, `function g4x_dp_aux_precharge_len`.
- 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.