drivers/gpu/drm/i915/display/intel_display.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_display.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_display.c- Extension
.c- Size
- 256570 bytes
- Lines
- 8459
- 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/dma-resv.hlinux/i2c.hlinux/input.hlinux/kernel.hlinux/module.hlinux/slab.hlinux/string_helpers.hdrm/display/drm_dp_helper.hdrm/display/drm_dp_tunnel.hdrm/drm_atomic.hdrm/drm_atomic_helper.hdrm/drm_atomic_uapi.hdrm/drm_damage_helper.hdrm/drm_edid.hdrm/drm_fixed.hdrm/drm_fourcc.hdrm/drm_print.hdrm/drm_probe_helper.hdrm/drm_rect.hdrm/drm_vblank.hg4x_dp.hg4x_hdmi.hhsw_ips.hi915_config.hi9xx_plane.hi9xx_plane_regs.hi9xx_wm.hintel_alpm.hintel_atomic.hintel_audio.hintel_bo.hintel_bw.h
Detected Declarations
function is_hdr_modefunction skl_wa_827function icl_wa_scalerclkgatingfunction icl_wa_cursorclkgatingfunction is_trans_port_sync_slavefunction is_trans_port_sync_masterfunction is_trans_port_sync_modefunction joiner_primary_pipefunction is_bigjoinerfunction bigjoiner_primary_pipesfunction bigjoiner_secondary_pipesfunction intel_crtc_is_bigjoiner_primaryfunction intel_crtc_is_bigjoiner_secondaryfunction _intel_modeset_primary_pipesfunction _intel_modeset_secondary_pipesfunction intel_crtc_is_ultrajoinerfunction ultrajoiner_primary_pipesfunction intel_crtc_is_ultrajoiner_primaryfunction ultrajoiner_enable_pipesfunction intel_crtc_ultrajoiner_enable_neededfunction intel_crtc_joiner_secondary_pipesfunction intel_crtc_is_joiner_secondaryfunction intel_crtc_is_joiner_primaryfunction intel_crtc_num_joined_pipesfunction intel_crtc_joined_pipe_maskfunction intel_wait_for_pipe_offfunction assert_transcoderfunction assert_planefunction assert_planes_disabledfunction intel_enable_transcoderfunction intel_disable_transcoderfunction intel_plane_fb_max_stridefunction intel_dumb_fb_max_stridefunction intel_set_plane_visiblefunction intel_plane_fixup_bitmasksfunction drm_for_each_plane_maskfunction intel_plane_disable_noatomicfunction intel_plane_fence_y_offsetfunction icl_set_pipe_chickenfunction intel_has_pending_fb_unpinfunction for_each_intel_crtcfunction intel_display_flush_cleanup_workfunction for_each_intel_crtcfunction intel_get_crtc_new_encoderfunction for_each_new_connector_in_statefunction intel_crtc_dpms_overlay_disablefunction needs_nv12_wafunction needs_scalerclk_wa
Annotated Snippet
if (new_crtc_state->has_pch_encoder) {
/* if driving the PCH, we need FDI enabled */
assert_fdi_rx_pll_enabled(display,
intel_crtc_pch_transcoder(crtc));
assert_fdi_tx_pll_enabled(display,
(enum pipe) cpu_transcoder);
}
/* FIXME: assert CPU port conditions for SNB+ */
}
/* Wa_22012358565:adl-p */
if (intel_display_wa(display, INTEL_DISPLAY_WA_22012358565))
intel_de_rmw(display, PIPE_ARB_CTL(display, pipe),
0, PIPE_ARB_USE_PROG_SLOTS);
if (DISPLAY_VER(display) >= 14) {
u32 clear = DP_DSC_INSERT_SF_AT_EOL_WA;
u32 set = 0;
if (DISPLAY_VER(display) == 14)
set |= DP_FEC_BS_JITTER_WA;
intel_de_rmw(display, CHICKEN_TRANS(display, cpu_transcoder),
clear, set);
}
val = intel_de_read(display, TRANSCONF(display, cpu_transcoder));
if (val & TRANSCONF_ENABLE) {
/* we keep both pipes enabled on 830 */
drm_WARN_ON(display->drm, !display->platform.i830);
return;
}
/* Wa_1409098942:adlp+ */
if (DISPLAY_VER(display) >= 13 &&
new_crtc_state->dsc.compression_enable) {
val &= ~TRANSCONF_PIXEL_COUNT_SCALING_MASK;
val |= REG_FIELD_PREP(TRANSCONF_PIXEL_COUNT_SCALING_MASK,
TRANSCONF_PIXEL_COUNT_SCALING_X4);
}
intel_de_write(display, TRANSCONF(display, cpu_transcoder),
val | TRANSCONF_ENABLE);
intel_de_posting_read(display, TRANSCONF(display, cpu_transcoder));
/*
* Until the pipe starts PIPEDSL reads will return a stale value,
* which causes an apparent vblank timestamp jump when PIPEDSL
* resets to its proper value. That also messes up the frame count
* when it's derived from the timestamps. So let's wait for the
* pipe to start properly before we call drm_crtc_vblank_on()
*/
if (intel_crtc_max_vblank_count(new_crtc_state) == 0)
intel_wait_for_pipe_scanline_moving(crtc);
}
void intel_disable_transcoder(const struct intel_crtc_state *old_crtc_state)
{
struct intel_display *display = to_intel_display(old_crtc_state);
struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc);
enum transcoder cpu_transcoder = old_crtc_state->cpu_transcoder;
enum pipe pipe = crtc->pipe;
u32 val;
drm_dbg_kms(display->drm, "disabling pipe %c\n", pipe_name(pipe));
/*
* Make sure planes won't keep trying to pump pixels to us,
* or we might hang the display.
*/
assert_planes_disabled(crtc);
val = intel_de_read(display, TRANSCONF(display, cpu_transcoder));
if ((val & TRANSCONF_ENABLE) == 0)
return;
/*
* Double wide has implications for planes
* so best keep it disabled when not needed.
*/
if (old_crtc_state->double_wide)
val &= ~TRANSCONF_DOUBLE_WIDE;
/* Don't disable pipe or pipe PLLs if needed */
if (!display->platform.i830)
val &= ~TRANSCONF_ENABLE;
/* Wa_1409098942:adlp+ */
if (DISPLAY_VER(display) >= 13 &&
old_crtc_state->dsc.compression_enable)
Annotation
- Immediate include surface: `linux/dma-resv.h`, `linux/i2c.h`, `linux/input.h`, `linux/kernel.h`, `linux/module.h`, `linux/slab.h`, `linux/string_helpers.h`, `drm/display/drm_dp_helper.h`.
- Detected declarations: `function is_hdr_mode`, `function skl_wa_827`, `function icl_wa_scalerclkgating`, `function icl_wa_cursorclkgating`, `function is_trans_port_sync_slave`, `function is_trans_port_sync_master`, `function is_trans_port_sync_mode`, `function joiner_primary_pipe`, `function is_bigjoiner`, `function bigjoiner_primary_pipes`.
- 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.