[PATCH] drm/amd/amdgpu: add dummy_page_addr to sriov msg

Jingwen Chen Jingwen.Chen2 at amd.com
Thu Oct 21 08:50:23 UTC 2021


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

Signed-off-by: Jingwen Chen <Jingwen.Chen2 at amd.com>
---
 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(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index 88c4177b708a..99c149397aae 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -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);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h b/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
index 995899191288..5e3d8ecfa968 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
@@ -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 {
-- 
2.30.2



More information about the amd-gfx mailing list