It was a vega20 specific hack.  Check if we are in reset
and what reset method we are using.

Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h                | 2 --
 drivers/gpu/drm/amd/amdgpu/soc15.c                 | 2 --
 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 4 ++--
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index c82579c93265..438775d54a6a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -959,8 +959,6 @@ struct amdgpu_device {
        int asic_reset_res;
        struct work_struct              xgmi_reset_work;
 
-       bool                            in_baco_reset;
-
        long                            gfx_timeout;
        long                            sdma_timeout;
        long                            video_timeout;
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c 
b/drivers/gpu/drm/amd/amdgpu/soc15.c
index fc6cfbced170..d17568dd9e87 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -507,8 +507,6 @@ static int soc15_asic_baco_reset(struct amdgpu_device *adev)
 
        dev_info(adev->dev, "GPU BACO reset\n");
 
-       adev->in_baco_reset = 1;
-
        return 0;
 }
 
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
index f5915308e643..892f9f5389b9 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
@@ -490,8 +490,8 @@ static int vega20_setup_asic_task(struct pp_hwmgr *hwmgr)
                        "Failed to init sclk threshold!",
                        return ret);
 
-       if (adev->in_baco_reset) {
-               adev->in_baco_reset = 0;
+       if (adev->in_gpu_reset &&
+           (amdgpu_asic_reset_method(adev) == AMD_RESET_METHOD_BACO)) {
 
                ret = vega20_baco_apply_vdci_flush_workaround(hwmgr);
                if (ret)
-- 
2.20.1

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

Reply via email to