drivers/gpu/drm/i915/i915_debugfs.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/i915_debugfs.c- Extension
.c- Size
- 20330 bytes
- Lines
- 747
- 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/sched/mm.hlinux/sort.hlinux/string_helpers.hdrm/drm_debugfs.hdrm/drm_print.hdrm/intel/intel_gmd_misc_regs.hdrm/intel/mchbar_regs.hgem/i915_gem_context.hgt/intel_gt.hgt/intel_gt_buffer_pool.hgt/intel_gt_clock_utils.hgt/intel_gt_debugfs.hgt/intel_gt_pm.hgt/intel_gt_pm_debugfs.hgt/intel_gt_regs.hgt/intel_gt_requests.hgt/intel_rc6.hgt/intel_reset.hgt/intel_rps.hgt/intel_sseu_debugfs.hi915_debugfs.hi915_debugfs_params.hi915_driver.hi915_gpu_error.hi915_irq.hi915_reg.hi915_scheduler.hi915_wait_util.h
Detected Declarations
function filesfunction i915_capabilitiesfunction get_tiling_flagfunction get_global_flagfunction get_pin_mapped_flagfunction stringify_page_sizesfunction i915_debugfs_describe_objfunction i915_gem_object_infofunction i915_frequency_infofunction i915_swizzle_infofunction i915_rps_boost_infofunction i915_runtime_pm_statusfunction i915_engine_infofunction i915_wa_registersfunction for_each_uabi_enginefunction i915_wedged_getfunction for_each_gtfunction i915_wedged_setfunction i915_perf_noa_delay_setfunction i915_perf_noa_delay_getfunction i915_drop_caches_getfunction gt_drop_cachesfunction i915_drop_caches_setfunction for_each_gtfunction i915_sseu_statusfunction i915_forcewake_openfunction i915_forcewake_releasefunction i915_debugfs_register
Annotated Snippet
static const struct file_operations i915_forcewake_fops = {
.owner = THIS_MODULE,
.open = i915_forcewake_open,
.release = i915_forcewake_release,
};
static const struct drm_info_list i915_debugfs_list[] = {
{"i915_capabilities", i915_capabilities, 0},
{"i915_gem_objects", i915_gem_object_info, 0},
{"i915_frequency_info", i915_frequency_info, 0},
{"i915_swizzle_info", i915_swizzle_info, 0},
{"i915_runtime_pm_status", i915_runtime_pm_status, 0},
{"i915_engine_info", i915_engine_info, 0},
{"i915_wa_registers", i915_wa_registers, 0},
{"i915_sseu_status", i915_sseu_status, 0},
{"i915_rps_boost_info", i915_rps_boost_info, 0},
};
static const struct i915_debugfs_files {
const char *name;
const struct file_operations *fops;
} i915_debugfs_files[] = {
{"i915_perf_noa_delay", &i915_perf_noa_delay_fops},
{"i915_wedged", &i915_wedged_fops},
{"i915_gem_drop_caches", &i915_drop_caches_fops},
};
void i915_debugfs_register(struct drm_i915_private *i915)
{
struct dentry *debugfs_root = i915->drm.debugfs_root;
int i;
i915_debugfs_params(i915);
debugfs_create_file("i915_forcewake_user", S_IRUSR, debugfs_root,
i915, &i915_forcewake_fops);
for (i = 0; i < ARRAY_SIZE(i915_debugfs_files); i++) {
debugfs_create_file(i915_debugfs_files[i].name, S_IRUGO | S_IWUSR,
debugfs_root, i915,
i915_debugfs_files[i].fops);
}
drm_debugfs_create_files(i915_debugfs_list,
ARRAY_SIZE(i915_debugfs_list),
debugfs_root, i915->drm.primary);
i915_gpu_error_debugfs_register(i915);
}
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/sched/mm.h`, `linux/sort.h`, `linux/string_helpers.h`, `drm/drm_debugfs.h`, `drm/drm_print.h`, `drm/intel/intel_gmd_misc_regs.h`, `drm/intel/mchbar_regs.h`.
- Detected declarations: `function files`, `function i915_capabilities`, `function get_tiling_flag`, `function get_global_flag`, `function get_pin_mapped_flag`, `function stringify_page_sizes`, `function i915_debugfs_describe_obj`, `function i915_gem_object_info`, `function i915_frequency_info`, `function i915_swizzle_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.