Skip to contentSkip to conversation

drm/amd/amdgpu: add dummy_page_addr to sriov msg

PATCH Superseded Jingwen Chen 2 participants 2 messages Oct 21, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: add dummy_page_addr to sriov msg

Add dummy_page_addr to sriov msg for host driver to set GCVM_L2_PROTECTION_DEFAULT_ADDR* registers correctly.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c    | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +1 -0
index 88c4177b708a..99c149397aae 100644
@@ -584,6 +584,7 @@ static int amdgpu_virt_write_vf2pf_data(struct amdgpu_device *adev)
 	vf2pf_info->encode_usage = 0;
 	vf2pf_info->decode_usage = 0;
 
+	vf2pf_info->dummy_page_addr = (uint64_t)adev->dummy_page_addr;
 	vf2pf_info->checksum =
 		amd_sriov_msg_checksum(
 		vf2pf_info, vf2pf_info->header.size, 0, 0);
drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h +3 -1
index 995899191288..5e3d8ecfa968 100644
@@ -206,8 +206,10 @@ struct amd_sriov_msg_pf2vf_info {
 	struct amd_sriov_msg_uuid_info uuid_info;
 	/* pcie atomic Ops info */
 	uint32_t pcie_atomic_ops_enabled_flags;
+	/* dummy page addr */
+	uint64_t dummy_page_addr;
 	/* reserved */
-	uint32_t reserved[256 - 48];
+	uint32_t reserved[256 - 50];
 };
 
 struct amd_sriov_msg_vf2pf_info_header {
Signature · 1 line
2.30.2
Acked-by on v1 1/1
#1 lore raw

Am 21.10.21 um 10:50 schrieb Jingwen Chen:

Quoted 4 lines

Add dummy_page_addr to sriov msg for host driver to set GCVM_L2_PROTECTION_DEFAULT_ADDR* registers correctly.

Quoted 33 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c    | 1 +
  drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h | 4 +++-
  2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +1 -0
index 88c4177b708a..99c149397aae 100644
@@ -584,6 +584,7 @@ static int amdgpu_virt_write_vf2pf_data(struct amdgpu_device *adev)
  	vf2pf_info->encode_usage = 0;
  	vf2pf_info->decode_usage = 0;
 
+	vf2pf_info->dummy_page_addr = (uint64_t)adev->dummy_page_addr;
  	vf2pf_info->checksum =
  		amd_sriov_msg_checksum(
  		vf2pf_info, vf2pf_info->header.size, 0, 0);
drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h +3 -1
index 995899191288..5e3d8ecfa968 100644
@@ -206,8 +206,10 @@ struct amd_sriov_msg_pf2vf_info {
  	struct amd_sriov_msg_uuid_info uuid_info;
  	/* pcie atomic Ops info */
  	uint32_t pcie_atomic_ops_enabled_flags;
+	/* dummy page addr */
+	uint64_t dummy_page_addr;
  	/* reserved */
-	uint32_t reserved[256 - 48];
+	uint32_t reserved[256 - 50];
  };
 
  struct amd_sriov_msg_vf2pf_info_header {