drivers/gpu/drm/i915/display/intel_display_debugfs.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_display_debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_display_debugfs.c- Extension
.c- Size
- 40246 bytes
- Lines
- 1402
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/debugfs.hlinux/string_choices.hlinux/string_helpers.hdrm/drm_debugfs.hdrm/drm_drv.hdrm/drm_edid.hdrm/drm_file.hdrm/drm_fourcc.hdrm/drm_print.hdrm/intel/intel_gmd_misc_regs.hhsw_ips.hi9xx_wm_regs.hintel_alpm.hintel_bo.hintel_crtc.hintel_crtc_state_dump.hintel_de.hintel_display_debugfs.hintel_display_debugfs_params.hintel_display_power.hintel_display_power_well.hintel_display_regs.hintel_display_reset.hintel_display_rpm.hintel_display_types.hintel_dmc.hintel_dp.hintel_dp_link_training.hintel_dp_mst.hintel_dp_test.hintel_drrs.hintel_fb.h
Detected Declarations
function intel_display_capsfunction i915_frontbuffer_trackingfunction i915_sr_statusfunction i915_gem_framebuffer_infofunction i915_power_domain_infofunction intel_seq_print_modefunction intel_encoder_infofunction intel_panel_infofunction intel_dp_infofunction intel_dp_mst_infofunction intel_hdmi_infofunction intel_connector_infofunction plane_rotationfunction intel_plane_uapi_infofunction intel_plane_hw_infofunction intel_plane_infofunction for_each_intel_plane_on_crtcfunction intel_scaler_infofunction crtc_updates_infofunction crtc_updates_showfunction crtc_updates_openfunction crtc_updates_writefunction crtc_updates_addfunction crtc_updates_infofunction i915_display_infofunction i915_shared_dplls_infofunction for_each_dpllfunction i915_ddb_infofunction for_each_intel_crtcfunction for_each_plane_id_on_crtcfunction intel_lpsp_power_well_enabledfunction i915_lpsp_statusfunction i915_dp_mst_infofunction i915_fifo_underrun_reset_writefunction for_each_intel_crtcfunction intel_display_debugfs_registerfunction i915_lpsp_capability_showfunction i915_dsc_fec_support_showfunction i915_dsc_fec_support_writefunction i915_dsc_fec_support_openfunction i915_dsc_bpc_showfunction i915_dsc_bpc_writefunction i915_dsc_bpc_openfunction i915_dsc_output_format_showfunction i915_dsc_output_format_writefunction i915_dsc_output_format_openfunction i915_dsc_fractional_bpp_showfunction i915_dsc_fractional_bpp_write
Annotated Snippet
static const struct file_operations crtc_updates_fops = {
.owner = THIS_MODULE,
.open = crtc_updates_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
.write = crtc_updates_write
};
static void crtc_updates_add(struct intel_crtc *crtc)
{
debugfs_create_file("i915_update_info", 0644, crtc->base.debugfs_entry,
crtc, &crtc_updates_fops);
}
#else
static void crtc_updates_info(struct seq_file *m,
struct intel_crtc *crtc,
const char *hdr)
{
}
static void crtc_updates_add(struct intel_crtc *crtc)
{
}
#endif
static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)
{
struct intel_display *display = node_to_intel_display(m->private);
struct drm_printer p = drm_seq_file_printer(m);
const struct intel_crtc_state *crtc_state =
to_intel_crtc_state(crtc->base.state);
struct intel_encoder *encoder;
seq_printf(m, "[CRTC:%d:%s]:\n",
crtc->base.base.id, crtc->base.name);
seq_printf(m, "\tuapi: enable=%s, active=%s, mode=" DRM_MODE_FMT "\n",
str_yes_no(crtc_state->uapi.enable),
str_yes_no(crtc_state->uapi.active),
DRM_MODE_ARG(&crtc_state->uapi.mode));
seq_printf(m, "\thw: enable=%s, active=%s\n",
str_yes_no(crtc_state->hw.enable), str_yes_no(crtc_state->hw.active));
seq_printf(m, "\tadjusted_mode=" DRM_MODE_FMT "\n",
DRM_MODE_ARG(&crtc_state->hw.adjusted_mode));
seq_printf(m, "\tpipe__mode=" DRM_MODE_FMT "\n",
DRM_MODE_ARG(&crtc_state->hw.pipe_mode));
seq_printf(m, "\tpipe src=" DRM_RECT_FMT ", dither=%s, bpp=%d\n",
DRM_RECT_ARG(&crtc_state->pipe_src),
str_yes_no(crtc_state->dither), crtc_state->pipe_bpp);
seq_printf(m, "\tport_clock=%d, lane_count=%d\n",
crtc_state->port_clock, crtc_state->lane_count);
intel_scaler_info(m, crtc);
if (DISPLAY_VER(display) >= 9) {
u32 background = crtc_state->hw.background_color;
seq_printf(m, "\tbackground color (10bpc XRGB2101010): %08x\n", background);
}
if (crtc_state->joiner_pipes)
seq_printf(m, "\tLinked to 0x%x pipes as a %s\n",
crtc_state->joiner_pipes,
intel_crtc_is_joiner_secondary(crtc_state) ? "slave" : "master");
intel_vdsc_state_dump(&p, 1, crtc_state);
for_each_intel_encoder_mask(display->drm, encoder,
crtc_state->uapi.encoder_mask)
intel_encoder_info(m, crtc, encoder);
intel_plane_info(m, crtc);
seq_printf(m, "\tunderrun reporting: cpu=%s pch=%s\n",
str_yes_no(!crtc->cpu_fifo_underrun_disabled),
str_yes_no(!crtc->pch_fifo_underrun_disabled));
crtc_updates_info(m, crtc, "\t");
}
static int i915_display_info(struct seq_file *m, void *unused)
{
struct intel_display *display = node_to_intel_display(m->private);
struct intel_crtc *crtc;
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/string_choices.h`, `linux/string_helpers.h`, `drm/drm_debugfs.h`, `drm/drm_drv.h`, `drm/drm_edid.h`, `drm/drm_file.h`, `drm/drm_fourcc.h`.
- Detected declarations: `function intel_display_caps`, `function i915_frontbuffer_tracking`, `function i915_sr_status`, `function i915_gem_framebuffer_info`, `function i915_power_domain_info`, `function intel_seq_print_mode`, `function intel_encoder_info`, `function intel_panel_info`, `function intel_dp_info`, `function intel_dp_mst_info`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern 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.