RE: [PATCH 05/10] drm/amdgpu: enable/disable doorbell interrupt in baco entry/exit helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

 

From: Zhang, Hawking <Hawking.Zhang@xxxxxxx>
Sent: Wednesday, November 27, 2019 8:04 PM
To: Ma, Le <Le.Ma@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Chen, Guchun <Guchun.Chen@xxxxxxx>; Zhou1, Tao <Tao.Zhou1@xxxxxxx>; Li, Dennis <Dennis.Li@xxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Ma, Le <Le.Ma@xxxxxxx>
Subject: RE: [PATCH 05/10] drm/amdgpu: enable/disable doorbell interrupt in baco entry/exit helper

 

Please check my comments inline

 

Regards,
Hawking

 

-----Original Message-----
From: Le Ma <le.ma@xxxxxxx>
Sent: 20191127 17:15
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Zhang, Hawking <Hawking.Zhang@xxxxxxx>; Chen, Guchun <Guchun.Chen@xxxxxxx>; Zhou1, Tao <Tao.Zhou1@xxxxxxx>; Li, Dennis <Dennis.Li@xxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Ma, Le <Le.Ma@xxxxxxx>
Subject: [PATCH 05/10] drm/amdgpu: enable/disable doorbell interrupt in baco entry/exit helper

 

This operation is needed when baco entry/exit for ras recovery

 

Change-Id: I535c7231693f3138a8e3d5acd55672e2ac68232f

Signed-off-by: Le Ma <le.ma@xxxxxxx>

---

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 ++++++++++++-------

1 file changed, 12 insertions(+), 7 deletions(-)

 

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index b1408c5..bd387bb 100644

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

@@ -4308,10 +4308,14 @@ static void amdgpu_device_get_pcie_info(struct amdgpu_device *adev)  int amdgpu_device_baco_enter(struct drm_device *dev)  {

               struct amdgpu_device *adev = dev->dev_private;

+             struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);

 

                if (!amdgpu_device_supports_baco(adev->ddev))

                               return -ENOTSUPP;

 

+             if (ras && ras->supported)

+                             adev->nbio.funcs->enable_doorbell_interrupt(adev, false);

+

               if (is_support_sw_smu(adev)) {

                               struct smu_context *smu = &adev->smu;

                               int ret;

@@ -4319,8 +4323,6 @@ int amdgpu_device_baco_enter(struct drm_device *dev)

                               ret = smu_baco_enter(smu);

                               if (ret)

                                               return ret;

-

-                              return 0;

               } else {

                               void *pp_handle = adev->powerplay.pp_handle;

                               const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; @@ -4331,14 +4333,15 @@ int amdgpu_device_baco_enter(struct drm_device *dev)

                               /* enter BACO state */

                               if (pp_funcs->set_asic_baco_state(pp_handle, 1))

                                               return -EIO;

-

-                              return 0;

               }

+

+             return 0;

}

 

 int amdgpu_device_baco_exit(struct drm_device *dev)  {

               struct amdgpu_device *adev = dev->dev_private;

+             struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);

 

                if (!amdgpu_device_supports_baco(adev->ddev))

                               return -ENOTSUPP;

@@ -4351,7 +4354,6 @@ int amdgpu_device_baco_exit(struct drm_device *dev)

                               if (ret)

                                               return ret;

 

-                              return 0;

               } else {

                               void *pp_handle = adev->powerplay.pp_handle;

                               const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; @@ -4362,7 +4364,10 @@ int amdgpu_device_baco_exit(struct drm_device *dev)

                               /* exit BACO state */

                               if (pp_funcs->set_asic_baco_state(pp_handle, 0))

                                               return -EIO;

-

-                              return 0;

               }

+

+             if (ras && ras->supported)

+                             adev->nbio.funcs->enable_doorbell_interrupt(adev, false);

+

 

 

[Hawking] Shouldn't be enabled doorbell interrupt after exit baco? Or do I miss something?

 

[Le]: Yes, the argument should be true. I made a typo here.

 

+             return 0;

}

--

2.7.4

 

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux