drm/amdgpu: remove in_baco_reset hack
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 4 Oct 2019 16:01:11 +0000 (11:01 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Oct 2019 19:51:39 +0000 (15:51 -0400)
It was a vega20 specific hack.  Check if we are in reset
and what reset method we are using.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/soc15.c
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c

index b7b00fc90d658f6592cb170901f79453df871b4e..b42fa21de80626779d6a2199869fa029523274d9 100644 (file)
@@ -960,8 +960,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;
index 5cf5f111931d0ada3d1daeb201d81f84714d2c3c..86bc4cbefbce6a28c6e9ae959427d0919dc13189 100644 (file)
@@ -516,8 +516,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;
 }
 
index 3d3c647a63ffafc501013de719f57079492964b7..9295bd90b792271e14e38bf3e86312486eeacaf5 100644 (file)
@@ -493,8 +493,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)