<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Series is:</p>
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Hawking Zhang <Hawking.Zhang@amd.com><br>
<b>Sent:</b> Thursday, January 3, 2019 9:00:44 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Zhang, Hawking<br>
<b>Subject:</b> [PATCH 2/2] drm/amdgpu/psp: make get_fw_type and prep_cmd_buf to be common interfaces</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">get_fw_type and prep_cmd_buf should be common interface<br>
instead of IP specific ones<br>
<br>
Change-Id: I115a8d3fafdbe143008b3698ad3a5f3bd4b87481<br>
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 94 ++++++++++++++++++++++++++++++++-<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 3 --<br>
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 90 -------------------------------<br>
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 75 --------------------------<br>
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 72 -------------------------<br>
5 files changed, 93 insertions(+), 241 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
index 8189a90..53c2d60 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
@@ -501,6 +501,98 @@ static int psp_hw_start(struct psp_context *psp)<br>
return 0;<br>
}<br>
<br>
+static int psp_get_fw_type(struct amdgpu_firmware_info *ucode,<br>
+ enum psp_gfx_fw_type *type)<br>
+{<br>
+ switch (ucode->ucode_id) {<br>
+ case AMDGPU_UCODE_ID_SDMA0:<br>
+ *type = GFX_FW_TYPE_SDMA0;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_SDMA1:<br>
+ *type = GFX_FW_TYPE_SDMA1;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_CP_CE:<br>
+ *type = GFX_FW_TYPE_CP_CE;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_CP_PFP:<br>
+ *type = GFX_FW_TYPE_CP_PFP;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_CP_ME:<br>
+ *type = GFX_FW_TYPE_CP_ME;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_CP_MEC1:<br>
+ *type = GFX_FW_TYPE_CP_MEC;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_CP_MEC1_JT:<br>
+ *type = GFX_FW_TYPE_CP_MEC_ME1;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_CP_MEC2:<br>
+ *type = GFX_FW_TYPE_CP_MEC;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_CP_MEC2_JT:<br>
+ *type = GFX_FW_TYPE_CP_MEC_ME2;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_RLC_G:<br>
+ *type = GFX_FW_TYPE_RLC_G;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL:<br>
+ *type = GFX_FW_TYPE_RLC_RESTORE_LIST_SRM_CNTL;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM:<br>
+ *type = GFX_FW_TYPE_RLC_RESTORE_LIST_GPM_MEM;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM:<br>
+ *type = GFX_FW_TYPE_RLC_RESTORE_LIST_SRM_MEM;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_SMC:<br>
+ *type = GFX_FW_TYPE_SMU;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_UVD:<br>
+ *type = GFX_FW_TYPE_UVD;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_UVD1:<br>
+ *type = GFX_FW_TYPE_UVD1;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_VCE:<br>
+ *type = GFX_FW_TYPE_VCE;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_VCN:<br>
+ *type = GFX_FW_TYPE_VCN;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_DMCU_ERAM:<br>
+ *type = GFX_FW_TYPE_DMCU_ERAM;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_DMCU_INTV:<br>
+ *type = GFX_FW_TYPE_DMCU_ISR;<br>
+ break;<br>
+ case AMDGPU_UCODE_ID_MAXIMUM:<br>
+ default:<br>
+ return -EINVAL;<br>
+ }<br>
+<br>
+ return 0;<br>
+}<br>
+<br>
+static int psp_prep_load_ip_fw_cmd_buf(struct amdgpu_firmware_info *ucode,<br>
+ struct psp_gfx_cmd_resp *cmd)<br>
+{<br>
+ int ret;<br>
+ uint64_t fw_mem_mc_addr = ucode->mc_addr;<br>
+<br>
+ memset(cmd, 0, sizeof(struct psp_gfx_cmd_resp));<br>
+<br>
+ cmd->cmd_id = GFX_CMD_ID_LOAD_IP_FW;<br>
+ cmd->cmd.cmd_load_ip_fw.fw_phy_addr_lo = lower_32_bits(fw_mem_mc_addr);<br>
+ cmd->cmd.cmd_load_ip_fw.fw_phy_addr_hi = upper_32_bits(fw_mem_mc_addr);<br>
+ cmd->cmd.cmd_load_ip_fw.fw_size = ucode->ucode_size;<br>
+<br>
+ ret = psp_get_fw_type(ucode, &cmd->cmd.cmd_load_ip_fw.fw_type);<br>
+ if (ret)<br>
+ DRM_ERROR("Unknown firmware type\n");<br>
+<br>
+ return ret;<br>
+}<br>
+<br>
static int psp_np_fw_load(struct psp_context *psp)<br>
{<br>
int i, ret;<br>
@@ -522,7 +614,7 @@ static int psp_np_fw_load(struct psp_context *psp)<br>
/*skip ucode loading in SRIOV VF */<br>
continue;<br>
<br>
- ret = psp_prep_cmd_buf(ucode, psp->cmd);<br>
+ ret = psp_prep_load_ip_fw_cmd_buf(ucode, psp->cmd);<br>
if (ret)<br>
return ret;<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h<br>
index 3ee573b..2ef98cc 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h<br>
@@ -65,8 +65,6 @@ struct psp_funcs<br>
int (*init_microcode)(struct psp_context *psp);<br>
int (*bootloader_load_sysdrv)(struct psp_context *psp);<br>
int (*bootloader_load_sos)(struct psp_context *psp);<br>
- int (*prep_cmd_buf)(struct amdgpu_firmware_info *ucode,<br>
- struct psp_gfx_cmd_resp *cmd);<br>
int (*ring_init)(struct psp_context *psp, enum psp_ring_type ring_type);<br>
int (*ring_create)(struct psp_context *psp,<br>
enum psp_ring_type ring_type);<br>
@@ -176,7 +174,6 @@ struct psp_xgmi_topology_info {<br>
struct psp_xgmi_node_info nodes[AMDGPU_XGMI_MAX_CONNECTED_NODES];<br>
};<br>
<br>
-#define psp_prep_cmd_buf(ucode, type) (psp)->funcs->prep_cmd_buf((ucode), (type))<br>
#define psp_ring_init(psp, type) (psp)->funcs->ring_init((psp), (type))<br>
#define psp_ring_create(psp, type) (psp)->funcs->ring_create((psp), (type))<br>
#define psp_ring_stop(psp, type) (psp)->funcs->ring_stop((psp), (type))<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c<br>
index f2e937a9..77c2bc3 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c<br>
@@ -38,75 +38,6 @@ MODULE_FIRMWARE("amdgpu/raven_asd.bin");<br>
MODULE_FIRMWARE("amdgpu/picasso_asd.bin");<br>
MODULE_FIRMWARE("amdgpu/raven2_asd.bin");<br>
<br>
-static int<br>
-psp_v10_0_get_fw_type(struct amdgpu_firmware_info *ucode, enum psp_gfx_fw_type *type)<br>
-{<br>
- switch(ucode->ucode_id) {<br>
- case AMDGPU_UCODE_ID_SDMA0:<br>
- *type = GFX_FW_TYPE_SDMA0;<br>
- break;<br>
- case AMDGPU_UCODE_ID_SDMA1:<br>
- *type = GFX_FW_TYPE_SDMA1;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_CE:<br>
- *type = GFX_FW_TYPE_CP_CE;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_PFP:<br>
- *type = GFX_FW_TYPE_CP_PFP;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_ME:<br>
- *type = GFX_FW_TYPE_CP_ME;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC1:<br>
- *type = GFX_FW_TYPE_CP_MEC;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC1_JT:<br>
- *type = GFX_FW_TYPE_CP_MEC_ME1;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC2:<br>
- *type = GFX_FW_TYPE_CP_MEC;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC2_JT:<br>
- *type = GFX_FW_TYPE_CP_MEC_ME2;<br>
- break;<br>
- case AMDGPU_UCODE_ID_RLC_G:<br>
- *type = GFX_FW_TYPE_RLC_G;<br>
- break;<br>
- case AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL:<br>
- *type = GFX_FW_TYPE_RLC_RESTORE_LIST_SRM_CNTL;<br>
- break;<br>
- case AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM:<br>
- *type = GFX_FW_TYPE_RLC_RESTORE_LIST_GPM_MEM;<br>
- break;<br>
- case AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM:<br>
- *type = GFX_FW_TYPE_RLC_RESTORE_LIST_SRM_MEM;<br>
- break;<br>
- case AMDGPU_UCODE_ID_SMC:<br>
- *type = GFX_FW_TYPE_SMU;<br>
- break;<br>
- case AMDGPU_UCODE_ID_UVD:<br>
- *type = GFX_FW_TYPE_UVD;<br>
- break;<br>
- case AMDGPU_UCODE_ID_VCE:<br>
- *type = GFX_FW_TYPE_VCE;<br>
- break;<br>
- case AMDGPU_UCODE_ID_VCN:<br>
- *type = GFX_FW_TYPE_VCN;<br>
- break;<br>
- case AMDGPU_UCODE_ID_DMCU_ERAM:<br>
- *type = GFX_FW_TYPE_DMCU_ERAM;<br>
- break;<br>
- case AMDGPU_UCODE_ID_DMCU_INTV:<br>
- *type = GFX_FW_TYPE_DMCU_ISR;<br>
- break;<br>
- case AMDGPU_UCODE_ID_MAXIMUM:<br>
- default:<br>
- return -EINVAL;<br>
- }<br>
-<br>
- return 0;<br>
-}<br>
-<br>
static int psp_v10_0_init_microcode(struct psp_context *psp)<br>
{<br>
struct amdgpu_device *adev = psp->adev;<br>
@@ -158,26 +89,6 @@ static int psp_v10_0_init_microcode(struct psp_context *psp)<br>
return err;<br>
}<br>
<br>
-static int psp_v10_0_prep_cmd_buf(struct amdgpu_firmware_info *ucode,<br>
- struct psp_gfx_cmd_resp *cmd)<br>
-{<br>
- int ret;<br>
- uint64_t fw_mem_mc_addr = ucode->mc_addr;<br>
-<br>
- memset(cmd, 0, sizeof(struct psp_gfx_cmd_resp));<br>
-<br>
- cmd->cmd_id = GFX_CMD_ID_LOAD_IP_FW;<br>
- cmd->cmd.cmd_load_ip_fw.fw_phy_addr_lo = lower_32_bits(fw_mem_mc_addr);<br>
- cmd->cmd.cmd_load_ip_fw.fw_phy_addr_hi = upper_32_bits(fw_mem_mc_addr);<br>
- cmd->cmd.cmd_load_ip_fw.fw_size = ucode->ucode_size;<br>
-<br>
- ret = psp_v10_0_get_fw_type(ucode, &cmd->cmd.cmd_load_ip_fw.fw_type);<br>
- if (ret)<br>
- DRM_ERROR("Unknown firmware type\n");<br>
-<br>
- return ret;<br>
-}<br>
-<br>
static int psp_v10_0_ring_init(struct psp_context *psp,<br>
enum psp_ring_type ring_type)<br>
{<br>
@@ -454,7 +365,6 @@ static int psp_v10_0_mode1_reset(struct psp_context *psp)<br>
<br>
static const struct psp_funcs psp_v10_0_funcs = {<br>
.init_microcode = psp_v10_0_init_microcode,<br>
- .prep_cmd_buf = psp_v10_0_prep_cmd_buf,<br>
.ring_init = psp_v10_0_ring_init,<br>
.ring_create = psp_v10_0_ring_create,<br>
.ring_stop = psp_v10_0_ring_stop,<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c<br>
index 0c6e7f9..f71384b 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c<br>
@@ -40,60 +40,6 @@ MODULE_FIRMWARE("amdgpu/vega20_ta.bin");<br>
/* address block */<br>
#define smnMP1_FIRMWARE_FLAGS 0x3010024<br>
<br>
-static int<br>
-psp_v11_0_get_fw_type(struct amdgpu_firmware_info *ucode, enum psp_gfx_fw_type *type)<br>
-{<br>
- switch (ucode->ucode_id) {<br>
- case AMDGPU_UCODE_ID_SDMA0:<br>
- *type = GFX_FW_TYPE_SDMA0;<br>
- break;<br>
- case AMDGPU_UCODE_ID_SDMA1:<br>
- *type = GFX_FW_TYPE_SDMA1;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_CE:<br>
- *type = GFX_FW_TYPE_CP_CE;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_PFP:<br>
- *type = GFX_FW_TYPE_CP_PFP;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_ME:<br>
- *type = GFX_FW_TYPE_CP_ME;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC1:<br>
- *type = GFX_FW_TYPE_CP_MEC;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC1_JT:<br>
- *type = GFX_FW_TYPE_CP_MEC_ME1;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC2:<br>
- *type = GFX_FW_TYPE_CP_MEC;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC2_JT:<br>
- *type = GFX_FW_TYPE_CP_MEC_ME2;<br>
- break;<br>
- case AMDGPU_UCODE_ID_RLC_G:<br>
- *type = GFX_FW_TYPE_RLC_G;<br>
- break;<br>
- case AMDGPU_UCODE_ID_SMC:<br>
- *type = GFX_FW_TYPE_SMU;<br>
- break;<br>
- case AMDGPU_UCODE_ID_UVD:<br>
- *type = GFX_FW_TYPE_UVD;<br>
- break;<br>
- case AMDGPU_UCODE_ID_VCE:<br>
- *type = GFX_FW_TYPE_VCE;<br>
- break;<br>
- case AMDGPU_UCODE_ID_UVD1:<br>
- *type = GFX_FW_TYPE_UVD1;<br>
- break;<br>
- case AMDGPU_UCODE_ID_MAXIMUM:<br>
- default:<br>
- return -EINVAL;<br>
- }<br>
-<br>
- return 0;<br>
-}<br>
-<br>
static int psp_v11_0_init_microcode(struct psp_context *psp)<br>
{<br>
struct amdgpu_device *adev = psp->adev;<br>
@@ -267,26 +213,6 @@ static int psp_v11_0_bootloader_load_sos(struct psp_context *psp)<br>
return ret;<br>
}<br>
<br>
-static int psp_v11_0_prep_cmd_buf(struct amdgpu_firmware_info *ucode,<br>
- struct psp_gfx_cmd_resp *cmd)<br>
-{<br>
- int ret;<br>
- uint64_t fw_mem_mc_addr = ucode->mc_addr;<br>
-<br>
- memset(cmd, 0, sizeof(struct psp_gfx_cmd_resp));<br>
-<br>
- cmd->cmd_id = GFX_CMD_ID_LOAD_IP_FW;<br>
- cmd->cmd.cmd_load_ip_fw.fw_phy_addr_lo = lower_32_bits(fw_mem_mc_addr);<br>
- cmd->cmd.cmd_load_ip_fw.fw_phy_addr_hi = upper_32_bits(fw_mem_mc_addr);<br>
- cmd->cmd.cmd_load_ip_fw.fw_size = ucode->ucode_size;<br>
-<br>
- ret = psp_v11_0_get_fw_type(ucode, &cmd->cmd.cmd_load_ip_fw.fw_type);<br>
- if (ret)<br>
- DRM_ERROR("Unknown firmware type\n");<br>
-<br>
- return ret;<br>
-}<br>
-<br>
static int psp_v11_0_ring_init(struct psp_context *psp,<br>
enum psp_ring_type ring_type)<br>
{<br>
@@ -753,7 +679,6 @@ static const struct psp_funcs psp_v11_0_funcs = {<br>
.init_microcode = psp_v11_0_init_microcode,<br>
.bootloader_load_sysdrv = psp_v11_0_bootloader_load_sysdrv,<br>
.bootloader_load_sos = psp_v11_0_bootloader_load_sos,<br>
- .prep_cmd_buf = psp_v11_0_prep_cmd_buf,<br>
.ring_init = psp_v11_0_ring_init,<br>
.ring_create = psp_v11_0_ring_create,<br>
.ring_stop = psp_v11_0_ring_stop,<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c<br>
index 79694ff..c63de94 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c<br>
@@ -47,57 +47,6 @@ MODULE_FIRMWARE("amdgpu/vega12_asd.bin");<br>
<br>
static uint32_t sos_old_versions[] = {1517616, 1510592, 1448594, 1446554};<br>
<br>
-static int<br>
-psp_v3_1_get_fw_type(struct amdgpu_firmware_info *ucode, enum psp_gfx_fw_type *type)<br>
-{<br>
- switch(ucode->ucode_id) {<br>
- case AMDGPU_UCODE_ID_SDMA0:<br>
- *type = GFX_FW_TYPE_SDMA0;<br>
- break;<br>
- case AMDGPU_UCODE_ID_SDMA1:<br>
- *type = GFX_FW_TYPE_SDMA1;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_CE:<br>
- *type = GFX_FW_TYPE_CP_CE;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_PFP:<br>
- *type = GFX_FW_TYPE_CP_PFP;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_ME:<br>
- *type = GFX_FW_TYPE_CP_ME;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC1:<br>
- *type = GFX_FW_TYPE_CP_MEC;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC1_JT:<br>
- *type = GFX_FW_TYPE_CP_MEC_ME1;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC2:<br>
- *type = GFX_FW_TYPE_CP_MEC;<br>
- break;<br>
- case AMDGPU_UCODE_ID_CP_MEC2_JT:<br>
- *type = GFX_FW_TYPE_CP_MEC_ME2;<br>
- break;<br>
- case AMDGPU_UCODE_ID_RLC_G:<br>
- *type = GFX_FW_TYPE_RLC_G;<br>
- break;<br>
- case AMDGPU_UCODE_ID_SMC:<br>
- *type = GFX_FW_TYPE_SMU;<br>
- break;<br>
- case AMDGPU_UCODE_ID_UVD:<br>
- *type = GFX_FW_TYPE_UVD;<br>
- break;<br>
- case AMDGPU_UCODE_ID_VCE:<br>
- *type = GFX_FW_TYPE_VCE;<br>
- break;<br>
- case AMDGPU_UCODE_ID_MAXIMUM:<br>
- default:<br>
- return -EINVAL;<br>
- }<br>
-<br>
- return 0;<br>
-}<br>
-<br>
static int psp_v3_1_init_microcode(struct psp_context *psp)<br>
{<br>
struct amdgpu_device *adev = psp->adev;<br>
@@ -277,26 +226,6 @@ static int psp_v3_1_bootloader_load_sos(struct psp_context *psp)<br>
return ret;<br>
}<br>
<br>
-static int psp_v3_1_prep_cmd_buf(struct amdgpu_firmware_info *ucode,<br>
- struct psp_gfx_cmd_resp *cmd)<br>
-{<br>
- int ret;<br>
- uint64_t fw_mem_mc_addr = ucode->mc_addr;<br>
-<br>
- memset(cmd, 0, sizeof(struct psp_gfx_cmd_resp));<br>
-<br>
- cmd->cmd_id = GFX_CMD_ID_LOAD_IP_FW;<br>
- cmd->cmd.cmd_load_ip_fw.fw_phy_addr_lo = lower_32_bits(fw_mem_mc_addr);<br>
- cmd->cmd.cmd_load_ip_fw.fw_phy_addr_hi = upper_32_bits(fw_mem_mc_addr);<br>
- cmd->cmd.cmd_load_ip_fw.fw_size = ucode->ucode_size;<br>
-<br>
- ret = psp_v3_1_get_fw_type(ucode, &cmd->cmd.cmd_load_ip_fw.fw_type);<br>
- if (ret)<br>
- DRM_ERROR("Unknown firmware type\n");<br>
-<br>
- return ret;<br>
-}<br>
-<br>
static int psp_v3_1_ring_init(struct psp_context *psp,<br>
enum psp_ring_type ring_type)<br>
{<br>
@@ -615,7 +544,6 @@ static const struct psp_funcs psp_v3_1_funcs = {<br>
.init_microcode = psp_v3_1_init_microcode,<br>
.bootloader_load_sysdrv = psp_v3_1_bootloader_load_sysdrv,<br>
.bootloader_load_sos = psp_v3_1_bootloader_load_sos,<br>
- .prep_cmd_buf = psp_v3_1_prep_cmd_buf,<br>
.ring_init = psp_v3_1_ring_init,<br>
.ring_create = psp_v3_1_ring_create,<br>
.ring_stop = psp_v3_1_ring_stop,<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>