[PATCH] drm/amdgpu/virt: fix the build

Alex Deucher alexdeucher at gmail.com
Thu Sep 24 19:31:39 UTC 2020


drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c: In function ‘amdgpu_virt_init_data_exchange’:
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:586:10: error: ‘struct amdgpu_device’ has no member named ‘fw_vram_usage’
  586 |  if (adev->fw_vram_usage.va != NULL) {
      |          ^~
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:591:9: error: ‘struct amdgpu_device’ has no member named ‘fw_vram_usage’
  591 |    (adev->fw_vram_usage.va + (AMD_SRIOV_MSG_PF2VF_OFFSET_KB << 10));
      |         ^~
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:594:9: error: ‘struct amdgpu_device’ has no member named ‘fw_vram_usage’
  594 |    (adev->fw_vram_usage.va + (AMD_SRIOV_MSG_VF2PF_OFFSET_KB << 10));
      |         ^~
make[4]: *** [scripts/Makefile.build:283: drivers/gpu/drm/amd/amdgpu/amdgpu_virt.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:500: drivers/gpu/drm/amd/amdgpu] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:500: drivers/gpu/drm] Error 2
make[1]: *** [scripts/Makefile.build:500: drivers/gpu] Error 2
make: *** [Makefile:1788: drivers] Error 2

Cc: Bokun Zhang <Bokun.Zhang at amd.com>
Fixes: 614e7ac92979 ("drm/amdgpu: Implement new guest side VF2PF message transaction")
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index 1f1171812e35..836d784456e5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -583,15 +583,15 @@ void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev)
 	adev->virt.fw_reserve.p_vf2pf = NULL;
 	adev->virt.vf2pf_update_interval_ms = 0;
 
-	if (adev->fw_vram_usage.va != NULL) {
+	if (adev->mman.fw_vram_usage_va != NULL) {
 		adev->virt.vf2pf_update_interval_ms = 2000;
 
 		adev->virt.fw_reserve.p_pf2vf =
 			(struct amd_sriov_msg_pf2vf_info_header *)
-			(adev->fw_vram_usage.va + (AMD_SRIOV_MSG_PF2VF_OFFSET_KB << 10));
+			(adev->mman.fw_vram_usage_va + (AMD_SRIOV_MSG_PF2VF_OFFSET_KB << 10));
 		adev->virt.fw_reserve.p_vf2pf =
 			(struct amd_sriov_msg_vf2pf_info_header *)
-			(adev->fw_vram_usage.va + (AMD_SRIOV_MSG_VF2PF_OFFSET_KB << 10));
+			(adev->mman.fw_vram_usage_va + (AMD_SRIOV_MSG_VF2PF_OFFSET_KB << 10));
 
 		amdgpu_virt_read_pf2vf_data(adev);
 		amdgpu_virt_write_vf2pf_data(adev);
-- 
2.25.4



More information about the amd-gfx mailing list