drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c- Extension
.c- Size
- 42145 bytes
- Lines
- 1618
- 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.
- 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/pci.hlinux/acpi.hlinux/backlight.hlinux/slab.hlinux/xarray.hlinux/power_supply.hlinux/pm_runtime.hlinux/suspend.hacpi/video.hacpi/actbl.hamdgpu.hamdgpu_pm.hamdgpu_display.hamd_acpi.hatom.h
Detected Declarations
struct amdgpu_acpi_xcc_infostruct amdgpu_acpi_dev_infostruct amdgpu_atif_notification_cfgstruct amdgpu_atif_notificationsstruct amdgpu_atif_functionsstruct amdgpu_atifstruct amdgpu_atcs_functionsstruct amdgpu_atcsfunction functionfunction supportedfunction supportedfunction amdgpu_atif_verify_interfacefunction amdgpu_atif_get_notification_paramsfunction amdgpu_atif_query_backlight_capsfunction amdgpu_atif_get_sbios_requestsfunction amdgpu_atif_handlerfunction functionfunction supportedfunction amdgpu_atcs_verify_interfacefunction supportedfunction amdgpu_acpi_is_power_shift_control_supportedfunction amdgpu_acpi_is_set_uma_allocation_size_supportedfunction amdgpu_acpi_pcie_notify_device_readyfunction speedfunction amdgpu_acpi_power_shift_controlfunction amdgpu_acpi_smart_shift_updatefunction amdgpu_acpi_get_numa_sizefunction amdgpu_acpi_set_uma_allocation_sizefunction amdgpu_acpi_get_node_idfunction amdgpu_acpi_dev_initfunction amdgpu_acpi_get_xcc_infofunction amdgpu_acpi_enumerate_xccfunction amdgpu_acpi_get_tmr_infofunction amdgpu_acpi_get_mem_infofunction list_for_each_entryfunction amdgpu_acpi_eventfunction chainfunction list_for_each_entryfunction amdgpu_acpi_get_backlight_capsfunction chainfunction handlesfunction handlesfunction amdgpu_acpi_should_gpu_resetfunction amdgpu_acpi_detectfunction amdgpu_acpi_releasefunction xa_for_eachfunction list_for_each_entry_safefunction amdgpu_acpi_is_s3_active
Annotated Snippet
struct amdgpu_acpi_xcc_info {
struct list_head list;
struct amdgpu_numa_info *numa_info;
uint8_t xcp_node;
uint8_t phy_id;
acpi_handle handle;
};
struct amdgpu_acpi_dev_info {
struct list_head list;
struct list_head xcc_list;
uint32_t sbdf;
uint16_t supp_xcp_mode;
uint16_t xcp_mode;
uint16_t mem_mode;
uint64_t tmr_base;
uint64_t tmr_size;
};
struct list_head amdgpu_acpi_dev_list;
struct amdgpu_atif_notification_cfg {
bool enabled;
int command_code;
};
struct amdgpu_atif_notifications {
bool thermal_state;
bool forced_power_state;
bool system_power_state;
bool brightness_change;
bool dgpu_display_event;
bool gpu_package_power_limit;
};
struct amdgpu_atif_functions {
bool system_params;
bool sbios_requests;
bool temperature_change;
bool query_backlight_transfer_characteristics;
bool ready_to_undock;
bool external_gpu_information;
};
struct amdgpu_atif {
acpi_handle handle;
struct amdgpu_atif_notifications notifications;
struct amdgpu_atif_functions functions;
struct amdgpu_atif_notification_cfg notification_cfg;
struct backlight_device *bd;
struct amdgpu_dm_backlight_caps backlight_caps;
};
struct amdgpu_atcs_functions {
bool get_ext_state;
bool pcie_perf_req;
bool pcie_dev_rdy;
bool pcie_bus_width;
bool get_uma_size;
bool power_shift_control;
bool set_uma_allocation_size;
};
struct amdgpu_atcs {
acpi_handle handle;
struct amdgpu_atcs_functions functions;
};
static struct amdgpu_acpi_priv {
struct amdgpu_atif atif;
struct amdgpu_atcs atcs;
} amdgpu_acpi_priv;
/* Call the ATIF method
*/
/**
* amdgpu_atif_call - call an ATIF method
*
* @atif: atif structure
* @function: the ATIF function to execute
* @params: ATIF function params
*
* Executes the requested ATIF function (all asics).
* Returns a pointer to the acpi output buffer.
*/
static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif,
int function,
struct acpi_buffer *params)
Annotation
- Immediate include surface: `linux/pci.h`, `linux/acpi.h`, `linux/backlight.h`, `linux/slab.h`, `linux/xarray.h`, `linux/power_supply.h`, `linux/pm_runtime.h`, `linux/suspend.h`.
- Detected declarations: `struct amdgpu_acpi_xcc_info`, `struct amdgpu_acpi_dev_info`, `struct amdgpu_atif_notification_cfg`, `struct amdgpu_atif_notifications`, `struct amdgpu_atif_functions`, `struct amdgpu_atif`, `struct amdgpu_atcs_functions`, `struct amdgpu_atcs`, `function function`, `function supported`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
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.