Skip to contentSkip to conversation

drm/amdgpu/sriov: Remove clear vf fw support

PATCH In review Victor Zhao 2 participants 2 messages Apr 22, 2021 – Apr 26, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/sriov: Remove clear vf fw support

PSP clear_vf_fw feature is outdated and has been removed. Remove the related functions.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 32 -------------------------
 drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h |  1 -
 2 files changed, 33 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -32
index 9311dcc94cb6..623044414bb5 100644
@@ -417,26 +417,6 @@ static int psp_tmr_init(struct psp_context *psp)
 	return ret;
 }
 
-static int psp_clear_vf_fw(struct psp_context *psp)
-{
-	int ret;
-	struct psp_gfx_cmd_resp *cmd;
-
-	if (!amdgpu_sriov_vf(psp->adev) || psp->adev->asic_type != CHIP_NAVI12)
-		return 0;
-
-	cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL);
-	if (!cmd)
-		return -ENOMEM;
-
-	cmd->cmd_id = GFX_CMD_ID_CLEAR_VF_FW;
-
-	ret = psp_cmd_submit_buf(psp, NULL, cmd, psp->fence_buf_mc_addr);
-	kfree(cmd);
-
-	return ret;
-}
-
 static bool psp_skip_tmr(struct psp_context *psp)
 {
 	switch (psp->adev->asic_type) {
@@ -1925,12 +1905,6 @@ static int psp_hw_start(struct psp_context *psp)
 		return ret;
 	}
 
-	ret = psp_clear_vf_fw(psp);
-	if (ret) {
-		DRM_ERROR("PSP clear vf fw!\n");
-		return ret;
-	}
-
 	ret = psp_boot_config_set(adev);
 	if (ret) {
 		DRM_WARN("PSP set boot config@\n");
@@ -2439,7 +2413,6 @@ static int psp_hw_fini(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 	struct psp_context *psp = &adev->psp;
-	int ret;
 
 	if (psp->adev->psp.ta_fw) {
 		psp_ras_terminate(psp);
@@ -2450,11 +2423,6 @@ static int psp_hw_fini(void *handle)
 	}
 
 	psp_asd_unload(psp);
-	ret = psp_clear_vf_fw(psp);
-	if (ret) {
-		DRM_ERROR("PSP clear vf fw!\n");
-		return ret;
-	}
 
 	psp_tmr_terminate(psp);
 	psp_ring_destroy(psp, PSP_RING_TYPE__KM);
drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h +0 -1
index 96064c343163..f6d3180febc4 100644
@@ -97,7 +97,6 @@ enum psp_gfx_cmd_id
     GFX_CMD_ID_SETUP_VMR          = 0x00000009,   /* setup VMR region */
     GFX_CMD_ID_DESTROY_VMR        = 0x0000000A,   /* destroy VMR region */
     GFX_CMD_ID_PROG_REG           = 0x0000000B,   /* program regs */
-    GFX_CMD_ID_CLEAR_VF_FW        = 0x0000000D,   /* Clear VF FW, to be used on VF shutdown. */
     GFX_CMD_ID_GET_FW_ATTESTATION = 0x0000000F,   /* Query GPUVA of the Fw Attestation DB */
     /* IDs upto 0x1F are reserved for older programs (Raven, Vega 10/12/20) */
     GFX_CMD_ID_LOAD_TOC           = 0x00000020,   /* Load TOC and obtain TMR size */
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

Quoted 92 lines

-----Original Message-----
From: Victor Zhao <[email protected]>
Sent: Thursday, April 22, 2021 6:02 PM
To: [email protected]; Deng, Emily <[email protected]>
Cc: Zhao, Victor <[email protected]>
Subject: [PATCH] drm/amdgpu/sriov: Remove clear vf fw support

PSP clear_vf_fw feature is outdated and has been removed. Remove the related functions.

---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 32 ------------------------- drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 1 -

2 files changed, 33 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -19
index 9311dcc94cb6..623044414bb5 100644
@@ -417,26 +417,6 @@ static int psp_tmr_init(struct psp_context *psp)
 return ret;
 }
 
-static int psp_clear_vf_fw(struct psp_context *psp) -{
-int ret;
-struct psp_gfx_cmd_resp *cmd;
-
-if (!amdgpu_sriov_vf(psp->adev) || psp->adev->asic_type !=
 CHIP_NAVI12)
-return 0;
-
-cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL);
-if (!cmd)
-return -ENOMEM;
-
-cmd->cmd_id = GFX_CMD_ID_CLEAR_VF_FW;
-
-ret = psp_cmd_submit_buf(psp, NULL, cmd, psp-
 >fence_buf_mc_addr);
-kfree(cmd);
-
-return ret;
-}
-
 static bool psp_skip_tmr(struct psp_context *psp)  {

switch (psp->adev->asic_type) {

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -12
@@ -1925,12 +1905,6 @@ static int psp_hw_start(struct psp_context *psp)
 return ret;
 }
 
-ret = psp_clear_vf_fw(psp);
-if (ret) {
-DRM_ERROR("PSP clear vf fw!\n");
-return ret;
-}
-
 ret = psp_boot_config_set(adev);
 if (ret) {
 DRM_WARN("PSP set boot config@\n");
@@ -2439,7 +2413,6 @@ static int psp_hw_fini(void *handle)  {
 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 struct psp_context *psp = &adev->psp;
-int ret;
 
 if (psp->adev->psp.ta_fw) {
 psp_ras_terminate(psp);
@@ -2450,11 +2423,6 @@ static int psp_hw_fini(void *handle)
 }
 
 psp_asd_unload(psp);
-ret = psp_clear_vf_fw(psp);
-if (ret) {
-DRM_ERROR("PSP clear vf fw!\n");
-return ret;
-}
 
 psp_tmr_terminate(psp);

psp_ring_destroy(psp, PSP_RING_TYPE__KM); diff --git a/drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h b/drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h index 96064c343163..f6d3180febc4 100644

drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h +0 -1
@@ -97,7 +97,6 @@ enum psp_gfx_cmd_id
    GFX_CMD_ID_SETUP_VMR          = 0x00000009,   /* setup VMR region */
    GFX_CMD_ID_DESTROY_VMR        = 0x0000000A,   /* destroy VMR region
 */
    GFX_CMD_ID_PROG_REG           = 0x0000000B,   /* program regs */
-    GFX_CMD_ID_CLEAR_VF_FW        = 0x0000000D,   /* Clear VF FW, to be

used on VF shutdown. */

Quoted 8 lines
    GFX_CMD_ID_GET_FW_ATTESTATION = 0x0000000F,   /* Query GPUVA of
the Fw Attestation DB */
    /* IDs upto 0x1F are reserved for older programs (Raven, Vega 10/12/20)
*/
    GFX_CMD_ID_LOAD_TOC           = 0x00000020,   /* Load TOC and obtain

TMR size */
--
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx