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.

Dependency Surface

Detected Declarations

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

Implementation Notes