drivers/gpu/drm/i915/i915_sysfs.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_sysfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/i915_sysfs.c- Extension
.c- Size
- 5401 bytes
- Lines
- 201
- 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/device.hlinux/module.hlinux/stat.hlinux/sysfs.hdrm/drm_print.hgt/intel_gt_regs.hgt/intel_rc6.hgt/intel_rps.hgt/sysfs_engines.hi915_drv.hi915_sysfs.h
Detected Declarations
function filesfunction l3_access_validfunction i915_l3_readfunction i915_l3_writefunction i915_setup_sysfsfunction i915_teardown_sysfs
Annotated Snippet
if (NUM_L3_SLICES(dev_priv) > 1) {
ret = device_create_bin_file(kdev,
&dpf_attrs_1);
if (ret)
drm_err(&dev_priv->drm,
"l3 parity slice 1 setup failed\n");
}
}
dev_priv->sysfs_gt = kobject_create_and_add("gt", &kdev->kobj);
if (!dev_priv->sysfs_gt)
drm_warn(&dev_priv->drm,
"failed to register GT sysfs directory\n");
i915_gpu_error_sysfs_setup(dev_priv);
intel_engines_add_sysfs(dev_priv);
}
void i915_teardown_sysfs(struct drm_i915_private *dev_priv)
{
struct device *kdev = dev_priv->drm.primary->kdev;
i915_gpu_error_sysfs_teardown(dev_priv);
device_remove_bin_file(kdev, &dpf_attrs_1);
device_remove_bin_file(kdev, &dpf_attrs);
kobject_put(dev_priv->sysfs_gt);
}
Annotation
- Immediate include surface: `linux/device.h`, `linux/module.h`, `linux/stat.h`, `linux/sysfs.h`, `drm/drm_print.h`, `gt/intel_gt_regs.h`, `gt/intel_rc6.h`, `gt/intel_rps.h`.
- Detected declarations: `function files`, `function l3_access_valid`, `function i915_l3_read`, `function i915_l3_write`, `function i915_setup_sysfs`, `function i915_teardown_sysfs`.
- 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.