Skip to contentSkip to conversation

drm/amdgpu/nbio4.3: set proper rmmio_remap.reg_offset for SR-IOV

PATCH In review Alex Deucher 2 participants 2 messages Sep 7, 2023 – Sep 8, 2023 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/nbio4.3: set proper rmmio_remap.reg_offset for SR-IOV

Needed for HDP flush to work correctly.

---
 drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c +3 -0
index d5ed9e0e1a5f..e5b5b0f4940f 100644
@@ -345,6 +345,9 @@ static void nbio_v4_3_init_registers(struct amdgpu_device *adev)
 		data &= ~RCC_DEV0_EPF2_STRAP2__STRAP_NO_SOFT_RESET_DEV0_F2_MASK;
 		WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF2_STRAP2, data);
 	}
+	if (amdgpu_sriov_vf(adev))
+		adev->rmmio_remap.reg_offset = SOC15_REG_OFFSET(NBIO, 0,
+			regBIF_BX_DEV0_EPF0_VF0_HDP_MEM_COHERENCY_FLUSH_CNTL) << 2;
 }
 
 static u32 nbio_v4_3_get_rom_offset(struct amdgpu_device *adev)
Signature · 1 line
2.41.0

A message that is not in the archive (sent off-list or not yet received): DS0PR12MB88130DE097FDBDF8DBF03A83F4EDA@DS0PR12MB8813.namprd12.prod.outlook.com

Reviewed-by Timmy Tsai
#2 lore raw

[AMD Official Use Only - General]

________________________________
From: amd-gfx <[email protected]> on behalf of Alex Deucher <[email protected]>
Sent: Thursday, September 7, 2023 3:47 PM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/nbio4.3: set proper rmmio_remap.reg_offset for SR-IOV

Needed for HDP flush to work correctly.

---
 drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c +3 -0
index d5ed9e0e1a5f..e5b5b0f4940f 100644
@@ -345,6 +345,9 @@ static void nbio_v4_3_init_registers(struct amdgpu_device *adev)
                 data &= ~RCC_DEV0_EPF2_STRAP2__STRAP_NO_SOFT_RESET_DEV0_F2_MASK;
                 WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF2_STRAP2, data);
         }
+       if (amdgpu_sriov_vf(adev))
+               adev->rmmio_remap.reg_offset = SOC15_REG_OFFSET(NBIO, 0,
+                       regBIF_BX_DEV0_EPF0_VF0_HDP_MEM_COHERENCY_FLUSH_CNTL) << 2;
 }
 
 static u32 nbio_v4_3_get_rom_offset(struct amdgpu_device *adev)

--
2.41.0