drm/amdgpu: Navi12 SRIOV VF doesn't load TOC

Submitted by jianzh@amd.com on Sept. 12, 2019, 5:22 a.m.

Details

Message ID 20190912052158.20362-1-jianzh@amd.com
State New
Headers show
Series "drm/amdgpu: Navi12 SRIOV VF doesn't load TOC" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

jianzh@amd.com Sept. 12, 2019, 5:22 a.m.
From: Jiange Zhao <Jiange.Zhao@amd.com>

In SRIOV case, the autoload sequence is the same

as bare metal, except VF won't load TOC.

Signed-off-by: Jiange Zhao <Jiange.Zhao@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index f90a0cd12827..762c97ce8251 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -253,7 +253,8 @@  static int psp_tmr_init(struct psp_context *psp)
 
 	/* For ASICs support RLC autoload, psp will parse the toc
 	 * and calculate the total size of TMR needed */
-	if (psp->toc_start_addr &&
+	if (!amdgpu_sriov_vf(psp->adev) &&
+	    psp->toc_start_addr &&
 	    psp->toc_bin_size &&
 	    psp->fw_pri_buf) {
 		ret = psp_load_toc(psp, &tmr_size);
@@ -1305,9 +1306,6 @@  int psp_rlc_autoload_start(struct psp_context *psp)
 	int ret;
 	struct psp_gfx_cmd_resp *cmd;
 
-	if (amdgpu_sriov_vf(psp->adev))
-		return 0;
-
 	cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL);
 	if (!cmd)
 		return -ENOMEM;

Comments

Reviewed-by: Emily Deng <Emily.Deng@amd.com>

>-----Original Message-----
>From: Zhao, Jiange <Jiange.Zhao@amd.com>
>Sent: Thursday, September 12, 2019 1:22 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Nieto, David M <David.Nieto@amd.com>; Deng, Emily
><Emily.Deng@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>;
>Zhao, Jiange <Jiange.Zhao@amd.com>
>Subject: [PATCH] drm/amdgpu: Navi12 SRIOV VF doesn't load TOC
>
>From: Jiange Zhao <Jiange.Zhao@amd.com>
>
>In SRIOV case, the autoload sequence is the same
>
>as bare metal, except VF won't load TOC.
>
>Signed-off-by: Jiange Zhao <Jiange.Zhao@amd.com>
>---
> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
>b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
>index f90a0cd12827..762c97ce8251 100644
>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
>@@ -253,7 +253,8 @@ static int psp_tmr_init(struct psp_context *psp)
>
> 	/* For ASICs support RLC autoload, psp will parse the toc
> 	 * and calculate the total size of TMR needed */
>-	if (psp->toc_start_addr &&
>+	if (!amdgpu_sriov_vf(psp->adev) &&
>+	    psp->toc_start_addr &&
> 	    psp->toc_bin_size &&
> 	    psp->fw_pri_buf) {
> 		ret = psp_load_toc(psp, &tmr_size);
>@@ -1305,9 +1306,6 @@ int psp_rlc_autoload_start(struct psp_context *psp)
> 	int ret;
> 	struct psp_gfx_cmd_resp *cmd;
>
>-	if (amdgpu_sriov_vf(psp->adev))
>-		return 0;
>-
> 	cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL);
> 	if (!cmd)
> 		return -ENOMEM;
>--
>2.20.1