diff options
| author | Frank Min <Frank.Min@amd.com> | 2025-05-21 16:46:27 +0800 | 
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2025-06-18 12:19:21 -0400 | 
| commit | a3b7f9c306e19a5b618483c11e8af6404ff69408 (patch) | |
| tree | 290a0ea736a601c756c44df944a082277ffeb5dc /drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | |
| parent | e2d1e96c536d48b88bfaac4d6b1512be42c2b9f6 (diff) | |
drm/amdgpu: reclaim psp fw reservation memory region
PSP v14 fw update introduced changes on memory reservation region, according
to the change driver reclaim some non-reserved region.
1. introduce 2 new psp commands to query fw reservation regions
2. add a new reservation region for psp
3. reclaim psp non-used region
Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 12 | 
1 files changed, 11 insertions, 1 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h b/drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h index f4a91b126c73..73f87131a7e9 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h +++ b/drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h @@ -106,7 +106,9 @@ enum psp_gfx_cmd_id      /*IDs of performance monitoring/profiling*/      GFX_CMD_ID_CONFIG_SQ_PERFMON  = 0x00000046,   /* Config CGTT_SQ_CLK_CTRL */      /* Dynamic memory partitioninig (NPS mode change)*/ -    GFX_CMD_ID_FB_NPS_MODE         = 0x00000048,  /* Configure memory partitioning mode */ +    GFX_CMD_ID_FB_NPS_MODE        = 0x00000048,  /* Configure memory partitioning mode */ +    GFX_CMD_ID_FB_FW_RESERV_ADDR  = 0x00000050,  /* Query FW reservation addr */ +    GFX_CMD_ID_FB_FW_RESERV_EXT_ADDR = 0x00000051,  /* Query FW reservation extended addr */  };  /* PSP boot config sub-commands */ @@ -404,11 +406,19 @@ 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; +    uint32_t reserve_size; +}; +  /* Union of command-specific responses for GPCOM ring. */  union psp_gfx_uresp {  	struct psp_gfx_uresp_reserved		reserved;  	struct psp_gfx_uresp_bootcfg		boot_cfg;  	struct psp_gfx_uresp_fwar_db_info	fwar_db_info; +	struct psp_gfx_uresp_fw_reserve_info	fw_reserve_info;  };  /* Structure of GFX Response buffer. | 
