drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h- Extension
.h- Size
- 26661 bytes
- Lines
- 522
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct psp_gfx_ctrlstruct psp_gfx_cmd_load_tastruct psp_gfx_cmd_unload_tastruct psp_gfx_buf_descstruct psp_gfx_buf_liststruct psp_gfx_cmd_invoke_cmdstruct psp_gfx_cmd_setup_tmrstruct psp_gfx_cmd_load_ip_fwstruct psp_gfx_cmd_save_restore_ip_fwstruct psp_gfx_cmd_reg_progstruct psp_gfx_cmd_load_tocstruct psp_gfx_cmd_boot_cfgstruct psp_gfx_cmd_sriov_spatial_partstruct psp_gfx_cmd_config_sq_perfmonstruct psp_gfx_cmd_fb_memory_partstruct psp_gfx_cmd_req_perf_hwstruct psp_gfx_uresp_reservedstruct psp_gfx_uresp_fwar_db_infostruct psp_gfx_uresp_bootcfgstruct psp_gfx_uresp_fw_reserve_infostruct psp_gfx_uresp_perf_hwstruct psp_gfx_respstruct psp_gfx_cmd_respstruct psp_gfx_rb_frameenum psp_gfx_crtl_cmd_idenum psp_gfx_cmd_idenum psp_gfx_boot_config_cmdenum psp_gfx_boot_configenum psp_gfx_fw_typeenum tee_error_code
Annotated Snippet
struct psp_gfx_cmd_reg_prog {
uint32_t reg_value;
uint32_t reg_id;
};
/* Command to load TOC */
struct psp_gfx_cmd_load_toc
{
uint32_t toc_phy_addr_lo; /* bits [31:0] of GPU Virtual address of FW location (must be 4 KB aligned) */
uint32_t toc_phy_addr_hi; /* bits [63:32] of GPU Virtual address of FW location */
uint32_t toc_size; /* FW buffer size in bytes */
};
/* Dynamic boot configuration */
struct psp_gfx_cmd_boot_cfg
{
uint32_t timestamp; /* calendar time as number of seconds */
enum psp_gfx_boot_config_cmd sub_cmd; /* sub-command indicating how to process command data */
uint32_t boot_config; /* dynamic boot configuration bitmask */
uint32_t boot_config_valid; /* dynamic boot configuration valid bits bitmask */
};
struct psp_gfx_cmd_sriov_spatial_part {
uint32_t mode;
uint32_t override_ips;
uint32_t override_xcds_avail;
uint32_t override_this_aid;
};
/*Structure for sq performance monitoring/profiling enable/disable*/
struct psp_gfx_cmd_config_sq_perfmon {
uint32_t gfx_xcp_mask;
uint8_t core_override;
uint8_t reg_override;
uint8_t perfmon_override;
uint8_t reserved[5];
};
struct psp_gfx_cmd_fb_memory_part {
uint32_t mode; /* requested NPS mode */
uint32_t resvd;
};
struct psp_gfx_cmd_req_perf_hw {
uint32_t req;
uint32_t ptl_state;
uint32_t pref_format1;
uint32_t pref_format2;
};
/* All GFX ring buffer commands. */
union psp_gfx_commands
{
struct psp_gfx_cmd_load_ta cmd_load_ta;
struct psp_gfx_cmd_unload_ta cmd_unload_ta;
struct psp_gfx_cmd_invoke_cmd cmd_invoke_cmd;
struct psp_gfx_cmd_setup_tmr cmd_setup_tmr;
struct psp_gfx_cmd_load_ip_fw cmd_load_ip_fw;
struct psp_gfx_cmd_save_restore_ip_fw cmd_save_restore_ip_fw;
struct psp_gfx_cmd_reg_prog cmd_setup_reg_prog;
struct psp_gfx_cmd_setup_tmr cmd_setup_vmr;
struct psp_gfx_cmd_load_toc cmd_load_toc;
struct psp_gfx_cmd_boot_cfg boot_cfg;
struct psp_gfx_cmd_sriov_spatial_part cmd_spatial_part;
struct psp_gfx_cmd_config_sq_perfmon config_sq_perfmon;
struct psp_gfx_cmd_fb_memory_part cmd_memory_part;
struct psp_gfx_cmd_req_perf_hw cmd_req_perf_hw;
};
struct psp_gfx_uresp_reserved
{
uint32_t reserved[8];
};
/* Command-specific response for Fw Attestation Db */
struct psp_gfx_uresp_fwar_db_info
{
uint32_t fwar_db_addr_lo;
uint32_t fwar_db_addr_hi;
};
/* Command-specific response for boot config. */
struct psp_gfx_uresp_bootcfg {
uint32_t boot_cfg; /* boot config data */
};
/* Command-specific response for fw reserve info */
struct psp_gfx_uresp_fw_reserve_info {
uint32_t reserve_base_address_hi;
uint32_t reserve_base_address_lo;
Annotation
- Detected declarations: `struct psp_gfx_ctrl`, `struct psp_gfx_cmd_load_ta`, `struct psp_gfx_cmd_unload_ta`, `struct psp_gfx_buf_desc`, `struct psp_gfx_buf_list`, `struct psp_gfx_cmd_invoke_cmd`, `struct psp_gfx_cmd_setup_tmr`, `struct psp_gfx_cmd_load_ip_fw`, `struct psp_gfx_cmd_save_restore_ip_fw`, `struct psp_gfx_cmd_reg_prog`.
- 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.