mirror of
https://github.com/torvalds/linux.git
synced 2026-10-28 01:26:02 +01:00
drm/amdgpu: Implement PSP cmd UAL_SET_NPA_CONFIG
To set NPA translation configuration to PSP. Signed-off-by: Felix Kuehling <felix.kuehling@amd.com> Reviewed-by: Mukul Joshi <mukul.joshi@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c53a91c275
commit
698ed831fe
|
|
@ -843,6 +843,8 @@ static const char *psp_gfx_cmd_name(enum psp_gfx_cmd_id cmd_id)
|
|||
return "UAL_SET_VPOD_CONFIG";
|
||||
case GFX_CMD_ID_UAL_SET_STATION_CONFIG:
|
||||
return "UAL_SET_STATION_CONFIG";
|
||||
case GFX_CMD_ID_UAL_SET_NPA_CONFIG:
|
||||
return "UAL_SET_NPA_CONFIG";
|
||||
default:
|
||||
return "UNKNOWN CMD";
|
||||
}
|
||||
|
|
@ -1398,6 +1400,34 @@ int psp_ual_set_station_config(struct psp_context *psp, uint32_t intf_ver,
|
|||
return ret;
|
||||
}
|
||||
|
||||
int psp_ual_set_npa_config(struct psp_context *psp, uint32_t intf_ver,
|
||||
unsigned int vmid, bool enable)
|
||||
{
|
||||
struct psp_gfx_cmd_resp *cmd;
|
||||
int ret;
|
||||
|
||||
/* TBD check interface version 1.x */
|
||||
if (intf_ver > 0x1ffff) {
|
||||
pr_warn("PSP UAL interface version mismatch: 0x%x\n", intf_ver);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
cmd = acquire_psp_cmd_buf(psp);
|
||||
|
||||
cmd->cmd_id = GFX_CMD_ID_UAL_SET_NPA_CONFIG;
|
||||
cmd->cmd.cmd_set_npa_config_ual.vmid = vmid;
|
||||
cmd->cmd.cmd_set_npa_config_ual.enable_npa_translation = enable;
|
||||
|
||||
ret = psp_cmd_submit_buf(psp, NULL, cmd, psp->fence_buf_mc_addr);
|
||||
|
||||
if (!ret && cmd->resp.status)
|
||||
ret = -EINVAL;
|
||||
|
||||
release_psp_cmd_buf(psp);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int psp_update_fw_reservation(struct psp_context *psp)
|
||||
{
|
||||
int ret;
|
||||
|
|
|
|||
|
|
@ -725,4 +725,7 @@ int psp_ual_set_vpod_config(struct psp_context *psp, uint32_t intf_ver,
|
|||
int psp_ual_set_station_config(struct psp_context *psp, uint32_t intf_ver,
|
||||
const struct amdgpu_ualink_station_config *stations);
|
||||
|
||||
int psp_ual_set_npa_config(struct psp_context *psp, uint32_t intf_ver,
|
||||
unsigned int vmid, bool enable);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user