drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c- Extension
.c- Size
- 124589 bytes
- Lines
- 4617
- 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.
- 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/string_helpers.hlinux/uaccess.hmedia/cec-notifier.hdc.hamdgpu.hamdgpu_dm.hamdgpu_dm_debugfs.hamdgpu_dm_replay.hamdgpu_dm_psr.hdm_helpers.hdmub/dmub_srv.hresource.hdsc.hlink_hwss.hdc/dc_dmub_srv.hlink/protocols/link_dp_capability.hinc/hw/dchubbub.h
Detected Declarations
struct dmub_debugfs_trace_headerstruct dmub_debugfs_trace_entryfunction parse_write_buffer_into_paramsfunction dp_link_settings_readfunction dp_link_settings_writefunction dp_mst_is_end_devicefunction dp_mst_link_settingfunction dp_phy_settings_readfunction dp_lttpr_status_showfunction dp_phy_settings_writefunction patternfunction dmub_tracebuffer_showfunction dmub_fw_state_showfunction replay_capability_showfunction psr_capability_showfunction amdgpu_current_bpc_showfunction amdgpu_current_colorspace_showfunction dp_dsc_passthrough_setfunction Displayfunction internal_display_showfunction odm_combine_segments_showfunction dp_sdp_message_debugfs_writefunction commandfunction trigger_hotplugfunction commandfunction dp_dsc_clock_en_writefunction dp_dsc_slice_width_readfunction dp_dsc_slice_width_writefunction dp_dsc_slice_height_readfunction dp_dsc_slice_height_writefunction dp_dsc_bits_per_pixel_readfunction dp_dsc_bits_per_pixel_writefunction dp_dsc_pic_width_readfunction dp_dsc_pic_height_readfunction dp_dsc_chunk_size_readfunction dp_dsc_slice_bpg_offset_readfunction dp_max_bpc_readfunction dp_max_bpc_writefunction ips_status_showfunction ips_residency_showfunction ips_residency_cntl_getfunction ips_residency_cntl_setfunction current_backlight_showfunction target_backlight_showfunction dp_is_mst_connector_showfunction dp_mst_progress_status_showfunction is_dpia_link_showfunction hdmi_cec_state_show
Annotated Snippet
static const struct file_operations dp_dsc_clock_en_debugfs_fops = {
.owner = THIS_MODULE,
.read = dp_dsc_clock_en_read,
.write = dp_dsc_clock_en_write,
.llseek = default_llseek
};
static const struct file_operations dp_dsc_slice_width_debugfs_fops = {
.owner = THIS_MODULE,
.read = dp_dsc_slice_width_read,
.write = dp_dsc_slice_width_write,
.llseek = default_llseek
};
static const struct file_operations dp_dsc_slice_height_debugfs_fops = {
.owner = THIS_MODULE,
.read = dp_dsc_slice_height_read,
.write = dp_dsc_slice_height_write,
.llseek = default_llseek
};
static const struct file_operations dp_dsc_bits_per_pixel_debugfs_fops = {
.owner = THIS_MODULE,
.read = dp_dsc_bits_per_pixel_read,
.write = dp_dsc_bits_per_pixel_write,
.llseek = default_llseek
};
static const struct file_operations dp_dsc_pic_width_debugfs_fops = {
.owner = THIS_MODULE,
.read = dp_dsc_pic_width_read,
.llseek = default_llseek
};
static const struct file_operations dp_dsc_pic_height_debugfs_fops = {
.owner = THIS_MODULE,
.read = dp_dsc_pic_height_read,
.llseek = default_llseek
};
static const struct file_operations dp_dsc_chunk_size_debugfs_fops = {
.owner = THIS_MODULE,
.read = dp_dsc_chunk_size_read,
.llseek = default_llseek
};
static const struct file_operations dp_dsc_slice_bpg_offset_debugfs_fops = {
.owner = THIS_MODULE,
.read = dp_dsc_slice_bpg_offset_read,
.llseek = default_llseek
};
static const struct file_operations trigger_hotplug_debugfs_fops = {
.owner = THIS_MODULE,
.write = trigger_hotplug,
.llseek = default_llseek
};
static const struct file_operations dp_link_settings_debugfs_fops = {
.owner = THIS_MODULE,
.read = dp_link_settings_read,
.write = dp_link_settings_write,
.llseek = default_llseek
};
static const struct file_operations dp_phy_settings_debugfs_fop = {
.owner = THIS_MODULE,
.read = dp_phy_settings_read,
.write = dp_phy_settings_write,
.llseek = default_llseek
};
static const struct file_operations dp_phy_test_pattern_fops = {
.owner = THIS_MODULE,
.write = dp_phy_test_pattern_debugfs_write,
.llseek = default_llseek
};
static const struct file_operations sdp_message_fops = {
.owner = THIS_MODULE,
.write = dp_sdp_message_debugfs_write,
.llseek = default_llseek
};
static const struct file_operations dp_max_bpc_debugfs_fops = {
.owner = THIS_MODULE,
.read = dp_max_bpc_read,
.write = dp_max_bpc_write,
.llseek = default_llseek
};
Annotation
- Immediate include surface: `linux/string_helpers.h`, `linux/uaccess.h`, `media/cec-notifier.h`, `dc.h`, `amdgpu.h`, `amdgpu_dm.h`, `amdgpu_dm_debugfs.h`, `amdgpu_dm_replay.h`.
- Detected declarations: `struct dmub_debugfs_trace_header`, `struct dmub_debugfs_trace_entry`, `function parse_write_buffer_into_params`, `function dp_link_settings_read`, `function dp_link_settings_write`, `function dp_mst_is_end_device`, `function dp_mst_link_setting`, `function dp_phy_settings_read`, `function dp_lttpr_status_show`, `function dp_phy_settings_write`.
- 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.