drivers/gpu/drm/i915/display/icl_dsi.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/icl_dsi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/icl_dsi.c- Extension
.c- Size
- 61633 bytes
- Lines
- 2044
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/iopoll.hdrm/display/drm_dsc_helper.hdrm/drm_atomic_helper.hdrm/drm_fixed.hdrm/drm_mipi_dsi.hdrm/drm_print.hdrm/drm_probe_helper.hicl_dsi.hicl_dsi_regs.hintel_atomic.hintel_backlight.hintel_backlight_regs.hintel_combo_phy.hintel_combo_phy_regs.hintel_connector.hintel_crtc.hintel_ddi.hintel_de.hintel_display_regs.hintel_display_utils.hintel_dsi.hintel_dsi_vbt.hintel_panel.hintel_pfit.hintel_vdsc.hintel_vdsc_regs.hskl_scaler.hskl_universal_plane.h
Detected Declarations
function filesfunction payload_credits_availablefunction wait_for_header_creditsfunction wait_for_payload_creditsfunction dsi_port_to_transcoderfunction wait_for_cmds_dispatched_to_panelfunction dsi_send_pkt_payldfunction dsi_send_pkt_hdrfunction icl_dsi_frame_updatefunction dsi_program_swing_and_deemphasisfunction for_each_dsi_phyfunction configure_dual_link_modefunction afe_clkfunction gen11_dsi_program_esc_clk_divfunction for_each_dsi_portfunction for_each_dsi_portfunction get_dsi_io_power_domainsfunction for_each_dsi_portfunction gen11_dsi_enable_io_powerfunction gen11_dsi_power_up_lanesfunction gen11_dsi_config_phy_lanes_sequencefunction gen11_dsi_voltage_swing_program_seqfunction gen11_dsi_enable_ddi_bufferfunction for_each_dsi_portfunction gen11_dsi_setup_dphy_timingsfunction gen11_dsi_setup_timingsfunction gen11_dsi_gate_clocksfunction gen11_dsi_ungate_clocksfunction gen11_dsi_is_clock_enabledfunction for_each_dsi_phyfunction gen11_dsi_map_pllfunction for_each_dsi_phyfunction gen11_dsi_configure_transcoderfunction for_each_dsi_portfunction for_each_dsi_portfunction for_each_dsi_portfunction gen11_dsi_set_transcoder_timingsfunction timingsfunction for_each_dsi_portfunction for_each_dsi_portfunction for_each_dsi_portfunction for_each_dsi_portfunction gen11_dsi_enable_transcoderfunction for_each_dsi_portfunction gen11_dsi_setup_timeoutsfunction for_each_dsi_portfunction gen11_dsi_config_util_pinfunction gen11_dsi_enable_port_and_phy
Annotated Snippet
for_each_dsi_port(port, intel_dsi->ports) {
intel_de_write(display, ADL_MIPIO_DW(port, 8),
esc_clk_div_m_phy & TX_ESC_CLK_DIV_PHY);
intel_de_posting_read(display, ADL_MIPIO_DW(port, 8));
}
}
}
static void get_dsi_io_power_domains(struct intel_dsi *intel_dsi)
{
struct intel_display *display = to_intel_display(&intel_dsi->base);
enum port port;
for_each_dsi_port(port, intel_dsi->ports) {
drm_WARN_ON(display->drm, intel_dsi->io_wakeref[port]);
intel_dsi->io_wakeref[port] =
intel_display_power_get(display,
port == PORT_A ?
POWER_DOMAIN_PORT_DDI_IO_A :
POWER_DOMAIN_PORT_DDI_IO_B);
}
}
static void gen11_dsi_enable_io_power(struct intel_encoder *encoder)
{
struct intel_display *display = to_intel_display(encoder);
struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
enum port port;
for_each_dsi_port(port, intel_dsi->ports)
intel_de_rmw(display, ICL_DSI_IO_MODECTL(port),
0, COMBO_PHY_MODE_DSI);
get_dsi_io_power_domains(intel_dsi);
}
static void gen11_dsi_power_up_lanes(struct intel_encoder *encoder)
{
struct intel_display *display = to_intel_display(encoder);
struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
enum phy phy;
for_each_dsi_phy(phy, intel_dsi->phys)
intel_combo_phy_power_up_lanes(display, phy, true,
intel_dsi->lane_count, false);
}
static void gen11_dsi_config_phy_lanes_sequence(struct intel_encoder *encoder)
{
struct intel_display *display = to_intel_display(encoder);
struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
enum phy phy;
u32 tmp;
int lane;
/* Step 4b(i) set loadgen select for transmit and aux lanes */
for_each_dsi_phy(phy, intel_dsi->phys) {
intel_de_rmw(display, ICL_PORT_TX_DW4_AUX(phy),
LOADGEN_SELECT, 0);
for (lane = 0; lane <= 3; lane++)
intel_de_rmw(display, ICL_PORT_TX_DW4_LN(lane, phy),
LOADGEN_SELECT, lane != 2 ? LOADGEN_SELECT : 0);
}
/* Step 4b(ii) set latency optimization for transmit and aux lanes */
for_each_dsi_phy(phy, intel_dsi->phys) {
intel_de_rmw(display, ICL_PORT_TX_DW2_AUX(phy),
FRC_LATENCY_OPTIM_MASK, FRC_LATENCY_OPTIM_VAL(0x5));
tmp = intel_de_read(display, ICL_PORT_TX_DW2_LN(0, phy));
tmp &= ~FRC_LATENCY_OPTIM_MASK;
tmp |= FRC_LATENCY_OPTIM_VAL(0x5);
intel_de_write(display, ICL_PORT_TX_DW2_GRP(phy), tmp);
/* For EHL, TGL, set latency optimization for PCS_DW1 lanes */
if (display->platform.jasperlake || display->platform.elkhartlake ||
(DISPLAY_VER(display) >= 12)) {
intel_de_rmw(display, ICL_PORT_PCS_DW1_AUX(phy),
LATENCY_OPTIM_MASK, LATENCY_OPTIM_VAL(0));
tmp = intel_de_read(display,
ICL_PORT_PCS_DW1_LN(0, phy));
tmp &= ~LATENCY_OPTIM_MASK;
tmp |= LATENCY_OPTIM_VAL(0x1);
intel_de_write(display, ICL_PORT_PCS_DW1_GRP(phy),
tmp);
}
}
}
Annotation
- Immediate include surface: `linux/iopoll.h`, `drm/display/drm_dsc_helper.h`, `drm/drm_atomic_helper.h`, `drm/drm_fixed.h`, `drm/drm_mipi_dsi.h`, `drm/drm_print.h`, `drm/drm_probe_helper.h`, `icl_dsi.h`.
- Detected declarations: `function files`, `function payload_credits_available`, `function wait_for_header_credits`, `function wait_for_payload_credits`, `function dsi_port_to_transcoder`, `function wait_for_cmds_dispatched_to_panel`, `function dsi_send_pkt_payld`, `function dsi_send_pkt_hdr`, `function icl_dsi_frame_update`, `function dsi_program_swing_and_deemphasis`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.