drivers/gpu/drm/i915/display/vlv_dsi.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/vlv_dsi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/vlv_dsi.c- Extension
.c- Size
- 65869 bytes
- Lines
- 2058
- 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/dmi.hlinux/slab.hdrm/drm_atomic_helper.hdrm/drm_crtc.hdrm/drm_edid.hdrm/drm_mipi_dsi.hdrm/drm_print.hdrm/drm_probe_helper.hintel_atomic.hintel_backlight.hintel_connector.hintel_crtc.hintel_de.hintel_display_regs.hintel_display_types.hintel_display_utils.hintel_dsi.hintel_dsi_vbt.hintel_fifo_underrun.hintel_panel.hintel_pfit.hskl_scaler.hvlv_dsi.hvlv_dsi_pll.hvlv_dsi_regs.hvlv_sideband.h
Detected Declarations
function filesfunction pixels_from_txbyteclkhsfunction pixel_format_from_register_bitsfunction vlv_dsi_wait_for_fifo_emptyfunction write_datafunction read_datafunction intel_dsi_host_transferfunction intel_dsi_host_attachfunction intel_dsi_host_detachfunction dpi_send_cmdfunction band_gap_resetfunction intel_dsi_compute_configfunction glk_dsi_enable_iofunction glk_dsi_device_readyfunction bxt_dsi_device_readyfunction vlv_dsi_device_readyfunction for_each_dsi_portfunction intel_dsi_device_readyfunction glk_dsi_enter_low_power_modefunction glk_dsi_disable_mipi_iofunction glk_dsi_clear_device_readyfunction port_ctrl_regfunction vlv_dsi_clear_device_readyfunction intel_dsi_port_enablefunction for_each_dsi_portfunction intel_dsi_port_disablefunction for_each_dsi_portfunction intel_dsi_pre_enablefunction bxt_dsi_enablefunction intel_dsi_disablefunction intel_dsi_clear_device_readyfunction intel_dsi_post_disablefunction intel_dsi_get_hw_statefunction bxt_dsi_get_pipe_configfunction intel_dsi_get_configfunction txclkescfunction set_dsi_timingsfunction for_each_dsi_portfunction pixel_format_to_regfunction intel_dsi_preparefunction for_each_dsi_portfunction for_each_dsi_portfunction clockfunction intel_dsi_unpreparefunction for_each_dsi_portfunction vlv_dsi_mode_validfunction vlv_dsi_add_propertiesfunction vlv_dphy_param_init
Annotated Snippet
if (!(intel_de_read(display, MIPI_DEVICE_READY(display, port)) & DEVICE_READY)) {
intel_de_rmw(display, MIPI_DEVICE_READY(display, port),
ULPS_STATE_MASK, DEVICE_READY);
usleep_range(10, 15);
} else {
/* Enter ULPS */
intel_de_rmw(display, MIPI_DEVICE_READY(display, port),
ULPS_STATE_MASK, ULPS_STATE_ENTER | DEVICE_READY);
/* Wait for ULPS active */
if (intel_de_wait_for_clear_ms(display, MIPI_CTRL(display, port),
GLK_ULPS_NOT_ACTIVE, 20))
drm_err(display->drm, "ULPS not active\n");
/* Exit ULPS */
intel_de_rmw(display, MIPI_DEVICE_READY(display, port),
ULPS_STATE_MASK, ULPS_STATE_EXIT | DEVICE_READY);
/* Enter Normal Mode */
intel_de_rmw(display, MIPI_DEVICE_READY(display, port),
ULPS_STATE_MASK,
ULPS_STATE_NORMAL_OPERATION | DEVICE_READY);
intel_de_rmw(display, MIPI_CTRL(display, port), GLK_LP_WAKE, 0);
}
}
/* Wait for Stop state */
for_each_dsi_port(port, intel_dsi->ports) {
if (intel_de_wait_for_set_ms(display, MIPI_CTRL(display, port),
GLK_DATA_LANE_STOP_STATE, 20))
drm_err(display->drm,
"Date lane not in STOP state\n");
}
/* Wait for AFE LATCH */
for_each_dsi_port(port, intel_dsi->ports) {
if (intel_de_wait_for_set_ms(display, BXT_MIPI_PORT_CTRL(port),
AFE_LATCHOUT, 20))
drm_err(display->drm,
"D-PHY not entering LP-11 state\n");
}
}
static void bxt_dsi_device_ready(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;
u32 val;
drm_dbg_kms(display->drm, "\n");
/* Enable MIPI PHY transparent latch */
for_each_dsi_port(port, intel_dsi->ports) {
intel_de_rmw(display, BXT_MIPI_PORT_CTRL(port), 0, LP_OUTPUT_HOLD);
usleep_range(2000, 2500);
}
/* Clear ULPS and set device ready */
for_each_dsi_port(port, intel_dsi->ports) {
val = intel_de_read(display, MIPI_DEVICE_READY(display, port));
val &= ~ULPS_STATE_MASK;
intel_de_write(display, MIPI_DEVICE_READY(display, port), val);
usleep_range(2000, 2500);
val |= DEVICE_READY;
intel_de_write(display, MIPI_DEVICE_READY(display, port), val);
}
}
static void vlv_dsi_device_ready(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;
drm_dbg_kms(display->drm, "\n");
vlv_flisdsi_get(display);
/* program rcomp for compliance, reduce from 50 ohms to 45 ohms
* needed everytime after power gate */
vlv_flisdsi_write(display, 0x04, 0x0004);
vlv_flisdsi_put(display);
/* bandgap reset is needed after everytime we do power gate */
band_gap_reset(display);
for_each_dsi_port(port, intel_dsi->ports) {
intel_de_write(display, MIPI_DEVICE_READY(display, port),
Annotation
- Immediate include surface: `linux/dmi.h`, `linux/slab.h`, `drm/drm_atomic_helper.h`, `drm/drm_crtc.h`, `drm/drm_edid.h`, `drm/drm_mipi_dsi.h`, `drm/drm_print.h`, `drm/drm_probe_helper.h`.
- Detected declarations: `function files`, `function pixels_from_txbyteclkhs`, `function pixel_format_from_register_bits`, `function vlv_dsi_wait_for_fifo_empty`, `function write_data`, `function read_data`, `function intel_dsi_host_transfer`, `function intel_dsi_host_attach`, `function intel_dsi_host_detach`, `function dpi_send_cmd`.
- 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.