drivers/gpu/drm/i915/display/intel_wm.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_wm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_wm.c- Extension
.c- Size
- 10358 bytes
- Lines
- 405
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- 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.hdrm/drm_print.hi9xx_wm.hintel_display_core.hintel_display_types.hintel_wm.hskl_watermark.h
Detected Declarations
function intel_update_watermarksfunction intel_wm_computefunction intel_initial_watermarksfunction intel_atomic_update_watermarksfunction intel_optimize_watermarksfunction intel_compute_global_watermarksfunction intel_wm_get_hw_statefunction intel_wm_sanitizefunction intel_wm_plane_visiblefunction intel_print_wm_latencyfunction intel_wm_initfunction wm_latency_showfunction pri_wm_latency_showfunction spr_wm_latency_showfunction cur_wm_latency_showfunction pri_wm_latency_openfunction spr_wm_latency_openfunction cur_wm_latency_openfunction wm_latency_writefunction pri_wm_latency_writefunction spr_wm_latency_writefunction cur_wm_latency_writefunction intel_wm_debugfs_register
Annotated Snippet
static const struct file_operations i915_pri_wm_latency_fops = {
.owner = THIS_MODULE,
.open = pri_wm_latency_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
.write = pri_wm_latency_write
};
static const struct file_operations i915_spr_wm_latency_fops = {
.owner = THIS_MODULE,
.open = spr_wm_latency_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
.write = spr_wm_latency_write
};
static const struct file_operations i915_cur_wm_latency_fops = {
.owner = THIS_MODULE,
.open = cur_wm_latency_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
.write = cur_wm_latency_write
};
void intel_wm_debugfs_register(struct intel_display *display)
{
struct dentry *debugfs_root = display->drm->debugfs_root;
debugfs_create_file("i915_pri_wm_latency", 0644, debugfs_root,
display, &i915_pri_wm_latency_fops);
debugfs_create_file("i915_spr_wm_latency", 0644, debugfs_root,
display, &i915_spr_wm_latency_fops);
debugfs_create_file("i915_cur_wm_latency", 0644, debugfs_root,
display, &i915_cur_wm_latency_fops);
skl_watermark_debugfs_register(display);
}
Annotation
- Immediate include surface: `linux/debugfs.h`, `drm/drm_print.h`, `i9xx_wm.h`, `intel_display_core.h`, `intel_display_types.h`, `intel_wm.h`, `skl_watermark.h`.
- Detected declarations: `function intel_update_watermarks`, `function intel_wm_compute`, `function intel_initial_watermarks`, `function intel_atomic_update_watermarks`, `function intel_optimize_watermarks`, `function intel_compute_global_watermarks`, `function intel_wm_get_hw_state`, `function intel_wm_sanitize`, `function intel_wm_plane_visible`, `function intel_print_wm_latency`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.