Skip to contentSkip to conversation

drm/amdgpu: Enable doorbell selfring after resize FB BAR

PATCH In review Shane Xiao 2 participants 3 messages Apr 25, 2023

Subsystems (2)
lore
Share & tools
lore

Shane Xiao

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Enable doorbell selfring after resize FB BAR

[Why]
The selfring doorbell aperture will change when resize FB BAR successfully during gmc sw init, we should reorder the sequence of enabling doorbell selfring aperture.

[How]
Move enable_doorbell_selfring_aperture from *_common_hw_init to *_common_late_init.

This fixes the potential issue that GPU ring its own doorbell when this device is in translated mode when iommu is on.

v2:
1. Remove *_enable_doorbell_aperture functions

---
 drivers/gpu/drm/amd/amdgpu/nv.c    | 17 +++++++----------
 drivers/gpu/drm/amd/amdgpu/soc15.c | 19 +++++++++----------
 drivers/gpu/drm/amd/amdgpu/soc21.c | 17 +++++++----------
 3 files changed, 23 insertions(+), 30 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +7 -10
index dabeeab2f2ad..cb39d556c23d 100644
@@ -531,13 +531,6 @@ static void nv_program_aspm(struct amdgpu_device *adev)
 
 }
 
-static void nv_enable_doorbell_aperture(struct amdgpu_device *adev,
-					bool enable)
-{
-	adev->nbio.funcs->enable_doorbell_aperture(adev, enable);
-	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, enable);
-}
-
 const struct amdgpu_ip_block_version nv_common_ip_block =
 {
 	.type = AMD_IP_BLOCK_TYPE_COMMON,
@@ -999,6 +992,9 @@ static int nv_common_late_init(void *handle)
 		}
 	}
 
+	/* enable selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, true);
+
 	return 0;
 }
 
@@ -1038,7 +1034,7 @@ static int nv_common_hw_init(void *handle)
 	if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf(adev))
 		adev->nbio.funcs->remap_hdp_registers(adev);
 	/* enable the doorbell aperture */
-	nv_enable_doorbell_aperture(adev, true);
+	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
 
 	return 0;
 }
@@ -1047,8 +1043,9 @@ static int nv_common_hw_fini(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	/* disable the doorbell aperture */
-	nv_enable_doorbell_aperture(adev, false);
+	/* disable the doorbell aperture and selfring doorbell aperture*/
+	adev->nbio.funcs->enable_doorbell_aperture(adev, false);
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, false);
 
 	return 0;
 }
drivers/gpu/drm/amd/amdgpu/soc15.c +9 -10
index 4d1487a9836c..2db021f6e8ac 100644
@@ -619,13 +619,6 @@ static void soc15_program_aspm(struct amdgpu_device *adev)
 		adev->nbio.funcs->program_aspm(adev);
 }
 
-static void soc15_enable_doorbell_aperture(struct amdgpu_device *adev,
-					   bool enable)
-{
-	adev->nbio.funcs->enable_doorbell_aperture(adev, enable);
-	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, enable);
-}
-
 const struct amdgpu_ip_block_version vega10_common_ip_block =
 {
 	.type = AMD_IP_BLOCK_TYPE_COMMON,
@@ -1125,6 +1118,9 @@ static int soc15_common_late_init(void *handle)
 	if (amdgpu_sriov_vf(adev))
 		xgpu_ai_mailbox_get_irq(adev);
 
+	/* enable selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, true);
+
 	return 0;
 }
 
@@ -1182,7 +1178,8 @@ static int soc15_common_hw_init(void *handle)
 		adev->nbio.funcs->remap_hdp_registers(adev);
 
 	/* enable the doorbell aperture */
-	soc15_enable_doorbell_aperture(adev, true);
+	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
+
 	/* HW doorbell routing policy: doorbell writing not
 	 * in SDMA/IH/MM/ACV range will be routed to CP. So
 	 * we need to init SDMA doorbell range prior
@@ -1198,8 +1195,10 @@ static int soc15_common_hw_fini(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	/* disable the doorbell aperture */
-	soc15_enable_doorbell_aperture(adev, false);
+	/* disable the doorbell aperture and selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_aperture(adev, false);
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, false);
+
 	if (amdgpu_sriov_vf(adev))
 		xgpu_ai_mailbox_put_irq(adev);
 
drivers/gpu/drm/amd/amdgpu/soc21.c +7 -10
index 7d59303ca2f9..21d11b7c510e 100644
@@ -450,13 +450,6 @@ static void soc21_program_aspm(struct amdgpu_device *adev)
 		adev->nbio.funcs->program_aspm(adev);
 }
 
-static void soc21_enable_doorbell_aperture(struct amdgpu_device *adev,
-					bool enable)
-{
-	adev->nbio.funcs->enable_doorbell_aperture(adev, enable);
-	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, enable);
-}
-
 const struct amdgpu_ip_block_version soc21_common_ip_block =
 {
 	.type = AMD_IP_BLOCK_TYPE_COMMON,
@@ -764,6 +757,9 @@ static int soc21_common_late_init(void *handle)
 			amdgpu_irq_get(adev, &adev->nbio.ras_err_event_athub_irq, 0);
 	}
 
+	/* enable selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, true);
+
 	return 0;
 }
 
@@ -797,7 +793,7 @@ static int soc21_common_hw_init(void *handle)
 	if (adev->nbio.funcs->remap_hdp_registers)
 		adev->nbio.funcs->remap_hdp_registers(adev);
 	/* enable the doorbell aperture */
-	soc21_enable_doorbell_aperture(adev, true);
+	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
 
 	return 0;
 }
@@ -806,8 +802,9 @@ static int soc21_common_hw_fini(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	/* disable the doorbell aperture */
-	soc21_enable_doorbell_aperture(adev, false);
+	/* disable the doorbell aperture and selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_aperture(adev, false);
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, false);
 
 	if (amdgpu_sriov_vf(adev)) {
 		xgpu_nv_mailbox_put_irq(adev);
Signature · 1 line
2.25.1
maintainer
#1 lore raw

Am 25.04.23 um 12:16 schrieb Shane Xiao:

Quoted 44 lines

[Why]
The selfring doorbell aperture will change when resize FB BAR successfully during gmc sw init, we should reorder the sequence of enabling doorbell selfring aperture.

[How]
Move enable_doorbell_selfring_aperture from *_common_hw_init to *_common_late_init.

This fixes the potential issue that GPU ring its own doorbell when this device is in translated mode when iommu is on.

v2:
1. Remove *_enable_doorbell_aperture functions

---
  drivers/gpu/drm/amd/amdgpu/nv.c    | 17 +++++++----------
  drivers/gpu/drm/amd/amdgpu/soc15.c | 19 +++++++++----------
  drivers/gpu/drm/amd/amdgpu/soc21.c | 17 +++++++----------
  3 files changed, 23 insertions(+), 30 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +0 -7
index dabeeab2f2ad..cb39d556c23d 100644
@@ -531,13 +531,6 @@ static void nv_program_aspm(struct amdgpu_device *adev)
 
  }
 
-static void nv_enable_doorbell_aperture(struct amdgpu_device *adev,
-					bool enable)
-{
-	adev->nbio.funcs->enable_doorbell_aperture(adev, enable);
-	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, enable);
-}
-
  const struct amdgpu_ip_block_version nv_common_ip_block =
  {
  	.type = AMD_IP_BLOCK_TYPE_COMMON,

drivers/gpu/drm/amd/amdgpu/nv.c static int nv_common_late_init(void *handle) · line 995

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
@@ -999,6 +992,9 @@ static int nv_common_late_init(void *handle)
  		}
  	}
 
+	/* enable selfring doorbell aperture */

Documenting *what* you do is usually a bad idea since that should be obvious. You need to document *why* you do it.

In other words maybe change the comment to /* Enable this late because doorbell BAR location can change during hw_init */.

Quoted 15 lines
drivers/gpu/drm/amd/amdgpu/nv.c +3 -1
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, true);
+
  	return 0;
  }
 
@@ -1038,7 +1034,7 @@ static int nv_common_hw_init(void *handle)
  	if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf(adev))
  		adev->nbio.funcs->remap_hdp_registers(adev);
  	/* enable the doorbell aperture */
-	nv_enable_doorbell_aperture(adev, true);
+	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
 
  	return 0;
  }

drivers/gpu/drm/amd/amdgpu/nv.c static int nv_common_hw_fini(void *handle) · line 1046

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/nv.c +1 -2
@@ -1047,8 +1043,9 @@ static int nv_common_hw_fini(void *handle)
  {
  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	/* disable the doorbell aperture */
-	nv_enable_doorbell_aperture(adev, false);
+	/* disable the doorbell aperture and selfring doorbell aperture*/

Same here and all other places as well.

Apart from that looks good to me,
Christian.

Quoted 105 lines
drivers/gpu/drm/amd/amdgpu/nv.c +2 -0
+	adev->nbio.funcs->enable_doorbell_aperture(adev, false);
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, false);
 
  	return 0;
  }
drivers/gpu/drm/amd/amdgpu/soc15.c +9 -10
index 4d1487a9836c..2db021f6e8ac 100644
@@ -619,13 +619,6 @@ static void soc15_program_aspm(struct amdgpu_device *adev)
  		adev->nbio.funcs->program_aspm(adev);
  }
 
-static void soc15_enable_doorbell_aperture(struct amdgpu_device *adev,
-					   bool enable)
-{
-	adev->nbio.funcs->enable_doorbell_aperture(adev, enable);
-	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, enable);
-}
-
  const struct amdgpu_ip_block_version vega10_common_ip_block =
  {
  	.type = AMD_IP_BLOCK_TYPE_COMMON,
@@ -1125,6 +1118,9 @@ static int soc15_common_late_init(void *handle)
  	if (amdgpu_sriov_vf(adev))
  		xgpu_ai_mailbox_get_irq(adev);
 
+	/* enable selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, true);
+
  	return 0;
  }
 
@@ -1182,7 +1178,8 @@ static int soc15_common_hw_init(void *handle)
  		adev->nbio.funcs->remap_hdp_registers(adev);
 
  	/* enable the doorbell aperture */
-	soc15_enable_doorbell_aperture(adev, true);
+	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
+
  	/* HW doorbell routing policy: doorbell writing not
  	 * in SDMA/IH/MM/ACV range will be routed to CP. So
  	 * we need to init SDMA doorbell range prior
@@ -1198,8 +1195,10 @@ static int soc15_common_hw_fini(void *handle)
  {
  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	/* disable the doorbell aperture */
-	soc15_enable_doorbell_aperture(adev, false);
+	/* disable the doorbell aperture and selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_aperture(adev, false);
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, false);
+
  	if (amdgpu_sriov_vf(adev))
  		xgpu_ai_mailbox_put_irq(adev);
 
drivers/gpu/drm/amd/amdgpu/soc21.c +7 -10
index 7d59303ca2f9..21d11b7c510e 100644
@@ -450,13 +450,6 @@ static void soc21_program_aspm(struct amdgpu_device *adev)
  		adev->nbio.funcs->program_aspm(adev);
  }
 
-static void soc21_enable_doorbell_aperture(struct amdgpu_device *adev,
-					bool enable)
-{
-	adev->nbio.funcs->enable_doorbell_aperture(adev, enable);
-	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, enable);
-}
-
  const struct amdgpu_ip_block_version soc21_common_ip_block =
  {
  	.type = AMD_IP_BLOCK_TYPE_COMMON,
@@ -764,6 +757,9 @@ static int soc21_common_late_init(void *handle)
  			amdgpu_irq_get(adev, &adev->nbio.ras_err_event_athub_irq, 0);
  	}
 
+	/* enable selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, true);
+
  	return 0;
  }
 
@@ -797,7 +793,7 @@ static int soc21_common_hw_init(void *handle)
  	if (adev->nbio.funcs->remap_hdp_registers)
  		adev->nbio.funcs->remap_hdp_registers(adev);
  	/* enable the doorbell aperture */
-	soc21_enable_doorbell_aperture(adev, true);
+	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
 
  	return 0;
  }
@@ -806,8 +802,9 @@ static int soc21_common_hw_fini(void *handle)
  {
  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	/* disable the doorbell aperture */
-	soc21_enable_doorbell_aperture(adev, false);
+	/* disable the doorbell aperture and selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_aperture(adev, false);
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, false);
 
  	if (amdgpu_sriov_vf(adev)) {
  		xgpu_nv_mailbox_put_irq(adev);
#2 lore raw

[AMD Official Use Only - General]

Quoted 59 lines

-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Tuesday, April 25, 2023 7:24 PM
To: Xiao, Shane <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>; Kuehling, Felix <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Liu, Aaron <[email protected]>; Hou, Xiaomeng (Matthew) <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Enable doorbell selfring after resize FB BAR

Am 25.04.23 um 12:16 schrieb Shane Xiao:

Quoted 48 lines

[Why]
The selfring doorbell aperture will change when resize FB BAR successfully during gmc sw init, we should reorder the sequence of enabling doorbell selfring aperture.

[How]
Move enable_doorbell_selfring_aperture from *_common_hw_init to *_common_late_init.

This fixes the potential issue that GPU ring its own doorbell when this device is in translated mode when iommu is on.

v2:
1. Remove *_enable_doorbell_aperture functions

---
  drivers/gpu/drm/amd/amdgpu/nv.c    | 17 +++++++----------
  drivers/gpu/drm/amd/amdgpu/soc15.c | 19 +++++++++----------
  drivers/gpu/drm/amd/amdgpu/soc21.c | 17 +++++++----------
  3 files changed, 23 insertions(+), 30 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/nv.c index dabeeab2f2ad..cb39d556c23d 100644

drivers/gpu/drm/amd/amdgpu/nv.c +0 -7
@@ -531,13 +531,6 @@ static void nv_program_aspm(struct amdgpu_device
 *adev)
 
  }
 
-static void nv_enable_doorbell_aperture(struct amdgpu_device *adev,
-					bool enable)
-{
-	adev->nbio.funcs->enable_doorbell_aperture(adev, enable);
-	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, enable);
-}
-
  const struct amdgpu_ip_block_version nv_common_ip_block =
  {

.type = AMD_IP_BLOCK_TYPE_COMMON,

drivers/gpu/drm/amd/amdgpu/nv.c +0 -0
@@ -999,6 +992,9 @@ static int nv_common_late_init(void *handle)
  		}
  	}
 
Quoted 8 lines

drivers/gpu/drm/amd/amdgpu/nv.c static int nv_common_late_init(void *handle) · line 995

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
+	/* enable selfring doorbell aperture */

Documenting *what* you do is usually a bad idea since that should be obvious. You need to document *why* you do it.

In other words maybe change the comment to /* Enable this late because doorbell BAR location can change during hw_init */.

Yes, I will update this comment.

Quoted 19 lines

drivers/gpu/drm/amd/amdgpu/nv.c static int nv_common_hw_init(void *handle) · line 1034

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/nv.c +2 -0
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, true);
+
  	return 0;
  }
 
@@ -1038,7 +1034,7 @@ static int nv_common_hw_init(void *handle)
  	if (adev->nbio.funcs->remap_hdp_registers

&& !amdgpu_sriov_vf(adev))

Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/nv.c +1 -1
  		adev->nbio.funcs->remap_hdp_registers(adev);
  	/* enable the doorbell aperture */
-	nv_enable_doorbell_aperture(adev, true);
+	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
 
  	return 0;
  }
@@ -1047,8 +1043,9 @@ static int nv_common_hw_fini(void *handle)
  {
  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/nv.c static int nv_common_hw_fini(void *handle) · line 1046

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/nv.c +1 -2
-	/* disable the doorbell aperture */
-	nv_enable_doorbell_aperture(adev, false);
+	/* disable the doorbell aperture and selfring doorbell aperture*/

Same here and all other places as well.

Get it. I will update all the comment in the next version.

Best Regards,
Shane

Quoted 114 lines

Apart from that looks good to me,
Christian.

drivers/gpu/drm/amd/amdgpu/soc15.c static void soc15_program_aspm(struct

Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/nv.c +2 -0
+	adev->nbio.funcs->enable_doorbell_aperture(adev, false);
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, false);
 
  	return 0;
  }
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -0
index 4d1487a9836c..2db021f6e8ac 100644
@@ -619,13 +619,6 @@ static void soc15_program_aspm(struct

amdgpu_device *adev)

Quoted 24 lines
drivers/gpu/drm/amd/amdgpu/soc15.c +3 -7
  		adev->nbio.funcs->program_aspm(adev);
  }
 
-static void soc15_enable_doorbell_aperture(struct amdgpu_device *adev,
-					   bool enable)
-{
-	adev->nbio.funcs->enable_doorbell_aperture(adev, enable);
-	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, enable);
-}
-
  const struct amdgpu_ip_block_version vega10_common_ip_block =
  {
  	.type = AMD_IP_BLOCK_TYPE_COMMON,
@@ -1125,6 +1118,9 @@ static int soc15_common_late_init(void *handle)
  	if (amdgpu_sriov_vf(adev))
  		xgpu_ai_mailbox_get_irq(adev);
 
+	/* enable selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, true);
+
  	return 0;
  }
 

drivers/gpu/drm/amd/amdgpu/soc15.c static int soc15_common_hw_init(void *handle) · line 1185

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -1
@@ -1182,7 +1178,8 @@ static int soc15_common_hw_init(void *handle)
  		adev->nbio.funcs->remap_hdp_registers(adev);
 
  	/* enable the doorbell aperture */
-	soc15_enable_doorbell_aperture(adev, true);
+	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
+
  	/* HW doorbell routing policy: doorbell writing not
  	 * in SDMA/IH/MM/ACV range will be routed to CP. So
  	 * we need to init SDMA doorbell range prior @@ -1198,8 +1195,10

@@

drivers/gpu/drm/amd/amdgpu/soc21.c static void soc21_program_aspm(struct

Quoted 19 lines

static int soc15_common_hw_fini(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;

drivers/gpu/drm/amd/amdgpu/soc15.c +4 -2
-	/* disable the doorbell aperture */
-	soc15_enable_doorbell_aperture(adev, false);
+	/* disable the doorbell aperture and selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_aperture(adev, false);
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, false);
+
  	if (amdgpu_sriov_vf(adev))
  		xgpu_ai_mailbox_put_irq(adev);
drivers/gpu/drm/amd/amdgpu/soc21.c +0 -0
index 7d59303ca2f9..21d11b7c510e 100644
@@ -450,13 +450,6 @@ static void soc21_program_aspm(struct

amdgpu_device *adev)

Quoted 45 lines
drivers/gpu/drm/amd/amdgpu/soc21.c +7 -10
  		adev->nbio.funcs->program_aspm(adev);
  }
 
-static void soc21_enable_doorbell_aperture(struct amdgpu_device *adev,
-					bool enable)
-{
-	adev->nbio.funcs->enable_doorbell_aperture(adev, enable);
-	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, enable);
-}
-
  const struct amdgpu_ip_block_version soc21_common_ip_block =
  {
  	.type = AMD_IP_BLOCK_TYPE_COMMON,
@@ -764,6 +757,9 @@ static int soc21_common_late_init(void *handle)
  			amdgpu_irq_get(adev, &adev-
 nbio.ras_err_event_athub_irq, 0);
  	}
 
+	/* enable selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, true);
+
  	return 0;
  }
@@ -797,7 +793,7 @@ static int soc21_common_hw_init(void *handle)
  	if (adev->nbio.funcs->remap_hdp_registers)
  		adev->nbio.funcs->remap_hdp_registers(adev);
  	/* enable the doorbell aperture */
-	soc21_enable_doorbell_aperture(adev, true);
+	adev->nbio.funcs->enable_doorbell_aperture(adev, true);
 
  	return 0;
  }
@@ -806,8 +802,9 @@ static int soc21_common_hw_fini(void *handle)
  {
  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	/* disable the doorbell aperture */
-	soc21_enable_doorbell_aperture(adev, false);
+	/* disable the doorbell aperture and selfring doorbell aperture */
+	adev->nbio.funcs->enable_doorbell_aperture(adev, false);
+	adev->nbio.funcs->enable_doorbell_selfring_aperture(adev, false);
 
  	if (amdgpu_sriov_vf(adev)) {
  		xgpu_nv_mailbox_put_irq(adev);