Skip to contentSkip to conversation

drm/amdgpu/sriov: Need to initialize the HDP_NONSURFACE_BAStE

PATCH In review Tiecheng Zhou 3 participants 3 messages May 14, 2019 2 messages not in the archive

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

PATCH 1/1 drm/amdgpu/sriov: Need to initialize the HDP_NONSURFACE_BAStE

it requires to initialize HDP_NONSURFACE_BASE, so as to avoid using the value left by a previous VM under sriov scenario.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +5 -0
index be729e7..e96684e 100644
@@ -1181,6 +1181,11 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev)
 	tmp = RREG32_SOC15(HDP, 0, mmHDP_HOST_PATH_CNTL);
 	WREG32_SOC15(HDP, 0, mmHDP_HOST_PATH_CNTL, tmp);
 
+	if (amdgpu_sriov_vf(adev)) {
+		WREG32_SOC15(HDP, 0, mmHDP_NONSURFACE_BASE, (adev->gmc.vram_start >> 8));
+		WREG32_SOC15(HDP, 0, mmHDP_NONSURFACE_BASE_HI, (adev->gmc.vram_start >> 40));
+	}
+
 	/* After HDP is initialized, flush HDP.*/
 	adev->nbio_funcs->hdp_flush(adev, NULL);
 
Signature · 6 lines
2.7.4

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

A message that is not in the archive (sent off-list or not yet received): 1557829492-5991-1-git-send-email-Tiecheng.Zhou-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 14.05.19 um 12:24 schrieb Tiecheng Zhou:

Quoted 5 lines

it requires to initialize HDP_NONSURFACE_BASE, so as to avoid using the value left by a previous VM under sriov scenario.

Would it hurt us to also do this on bare metal?

Apart from that looks good to me,
Christian.

Quoted 10 lines
---
  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -0
index be729e7..e96684e 100644
@@ -1181,6 +1181,11 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev)
  	tmp = RREG32_SOC15(HDP, 0, mmHDP_HOST_PATH_CNTL);

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_gart_enable(struct amdgpu_device *adev) · line 1191

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +5 -0
  	WREG32_SOC15(HDP, 0, mmHDP_HOST_PATH_CNTL, tmp);
 
+	if (amdgpu_sriov_vf(adev)) {
+		WREG32_SOC15(HDP, 0, mmHDP_NONSURFACE_BASE, (adev->gmc.vram_start >> 8));
+		WREG32_SOC15(HDP, 0, mmHDP_NONSURFACE_BASE_HI, (adev->gmc.vram_start >> 40));
+	}
+
  	/* After HDP is initialized, flush HDP.*/
  	adev->nbio_funcs->hdp_flush(adev, NULL);
 

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

A message that is not in the archive (sent off-list or not yet received): 8cca3031-e258-785c-331c-6c6d32421ed0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw
Quoted 12 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian König
Sent: Tuesday, May 14, 2019 6:34 AM
To: Zhou, Tiecheng <[email protected]>; amd- [email protected]
Cc: Deng, Emily <[email protected]>
Subject: Re: [PATCH] drm/amdgpu/sriov: Need to initialize the HDP_NONSURFACE_BAStE

[CAUTION: External Email]

Quoted 9 lines

Am 14.05.19 um 12:24 schrieb Tiecheng Zhou:

Quoted 5 lines

it requires to initialize HDP_NONSURFACE_BASE, so as to avoid using the value left by a previous VM under sriov scenario.

Would it hurt us to also do this on bare metal?

Vbios Asic_init handles this for us on bare metal.

Alex

Quoted 28 lines

Apart from that looks good to me,
Christian.

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_gart_enable(struct

Quoted 10 lines
---
  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -0
index be729e7..e96684e 100644
@@ -1181,6 +1181,11 @@ static int gmc_v9_0_gart_enable(struct

amdgpu_device *adev)

Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +5 -0
      tmp = RREG32_SOC15(HDP, 0, mmHDP_HOST_PATH_CNTL);
      WREG32_SOC15(HDP, 0, mmHDP_HOST_PATH_CNTL, tmp);
 
+     if (amdgpu_sriov_vf(adev)) {
+             WREG32_SOC15(HDP, 0, mmHDP_NONSURFACE_BASE, (adev-
 gmc.vram_start >> 8));
+             WREG32_SOC15(HDP, 0, mmHDP_NONSURFACE_BASE_HI, (adev-
 gmc.vram_start >> 40));
+     }
+
      /* After HDP is initialized, flush HDP.*/
Quoted 2 lines
      adev->nbio_funcs->hdp_flush(adev, NULL);
Quoted 4 lines

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

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