drivers/gpu/drm/i915/display/intel_fdi.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_fdi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_fdi.c- Extension
.c- Size
- 32988 bytes
- Lines
- 1119
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/string_helpers.hdrm/drm_fixed.hdrm/drm_print.hintel_atomic.hintel_crtc.hintel_ddi.hintel_ddi_buf_trans.hintel_de.hintel_display_regs.hintel_display_types.hintel_display_utils.hintel_dp.hintel_fdi.hintel_fdi_regs.hintel_link_bw.h
Detected Declarations
struct intel_fdi_funcsfunction assert_fdi_txfunction assert_fdi_tx_enabledfunction assert_fdi_tx_disabledfunction assert_fdi_rxfunction assert_fdi_rx_enabledfunction assert_fdi_rx_disabledfunction assert_fdi_tx_pll_enabledfunction assert_fdi_rx_pllfunction assert_fdi_rx_pll_enabledfunction assert_fdi_rx_pll_disabledfunction intel_fdi_link_trainfunction limitedfunction pipe_required_fdi_lanesfunction ilk_check_fdi_lanesfunction intel_fdi_pll_freq_updatefunction intel_fdi_link_freqfunction ilk_fdi_compute_configfunction intel_fdi_atomic_check_bwfunction intel_fdi_atomic_check_linkfunction for_each_new_intel_crtc_in_statefunction cpt_set_fdi_bc_bifurcationfunction ivb_update_fdi_bc_bifurcationfunction intel_fdi_normal_trainfunction ilk_fdi_link_trainfunction gen6_fdi_link_trainfunction ivb_manual_fdi_link_trainfunction Afunction hsw_fdi_disablefunction ilk_fdi_pll_enablefunction ilk_fdi_pll_disablefunction ilk_fdi_disablefunction intel_fdi_init_hook
Annotated Snippet
struct intel_fdi_funcs {
void (*fdi_link_train)(struct intel_crtc *crtc,
const struct intel_crtc_state *crtc_state);
};
static void assert_fdi_tx(struct intel_display *display,
enum pipe pipe, bool state)
{
bool cur_state;
if (HAS_DDI(display)) {
/*
* DDI does not have a specific FDI_TX register.
*
* FDI is never fed from EDP transcoder
* so pipe->transcoder cast is fine here.
*/
enum transcoder cpu_transcoder = (enum transcoder)pipe;
cur_state = intel_de_read(display,
TRANS_DDI_FUNC_CTL(display, cpu_transcoder)) & TRANS_DDI_FUNC_ENABLE;
} else {
cur_state = intel_de_read(display, FDI_TX_CTL(pipe)) & FDI_TX_ENABLE;
}
INTEL_DISPLAY_STATE_WARN(display, cur_state != state,
"FDI TX state assertion failure (expected %s, current %s)\n",
str_on_off(state), str_on_off(cur_state));
}
void assert_fdi_tx_enabled(struct intel_display *display, enum pipe pipe)
{
assert_fdi_tx(display, pipe, true);
}
void assert_fdi_tx_disabled(struct intel_display *display, enum pipe pipe)
{
assert_fdi_tx(display, pipe, false);
}
static void assert_fdi_rx(struct intel_display *display,
enum pipe pipe, bool state)
{
bool cur_state;
cur_state = intel_de_read(display, FDI_RX_CTL(pipe)) & FDI_RX_ENABLE;
INTEL_DISPLAY_STATE_WARN(display, cur_state != state,
"FDI RX state assertion failure (expected %s, current %s)\n",
str_on_off(state), str_on_off(cur_state));
}
void assert_fdi_rx_enabled(struct intel_display *display, enum pipe pipe)
{
assert_fdi_rx(display, pipe, true);
}
void assert_fdi_rx_disabled(struct intel_display *display, enum pipe pipe)
{
assert_fdi_rx(display, pipe, false);
}
void assert_fdi_tx_pll_enabled(struct intel_display *display, enum pipe pipe)
{
bool cur_state;
/* ILK FDI PLL is always enabled */
if (display->platform.ironlake)
return;
/* On Haswell, DDI ports are responsible for the FDI PLL setup */
if (HAS_DDI(display))
return;
cur_state = intel_de_read(display, FDI_TX_CTL(pipe)) & FDI_TX_PLL_ENABLE;
INTEL_DISPLAY_STATE_WARN(display, !cur_state,
"FDI TX PLL assertion failure, should be active but is disabled\n");
}
static void assert_fdi_rx_pll(struct intel_display *display,
enum pipe pipe, bool state)
{
bool cur_state;
cur_state = intel_de_read(display, FDI_RX_CTL(pipe)) & FDI_RX_PLL_ENABLE;
INTEL_DISPLAY_STATE_WARN(display, cur_state != state,
"FDI RX PLL assertion failure (expected %s, current %s)\n",
str_on_off(state), str_on_off(cur_state));
}
void assert_fdi_rx_pll_enabled(struct intel_display *display, enum pipe pipe)
{
assert_fdi_rx_pll(display, pipe, true);
Annotation
- Immediate include surface: `linux/string_helpers.h`, `drm/drm_fixed.h`, `drm/drm_print.h`, `intel_atomic.h`, `intel_crtc.h`, `intel_ddi.h`, `intel_ddi_buf_trans.h`, `intel_de.h`.
- Detected declarations: `struct intel_fdi_funcs`, `function assert_fdi_tx`, `function assert_fdi_tx_enabled`, `function assert_fdi_tx_disabled`, `function assert_fdi_rx`, `function assert_fdi_rx_enabled`, `function assert_fdi_rx_disabled`, `function assert_fdi_tx_pll_enabled`, `function assert_fdi_rx_pll`, `function assert_fdi_rx_pll_enabled`.
- 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.