drm/amdgpu: add asic need_full_reset callback
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Mar 2018 18:51:28 +0000 (13:51 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 Apr 2018 18:07:57 +0000 (13:07 -0500)
Allow us to determine at the soc level whether the
asic requires full reset or if soft reset will work.

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h

index df409dd..21272ce 100644 (file)
@@ -1204,6 +1204,8 @@ struct amdgpu_asic_funcs {
        /* invalidate hdp read cache */
        void (*invalidate_hdp)(struct amdgpu_device *adev,
                               struct amdgpu_ring *ring);
+       /* check if the asic needs a full reset of if soft reset will work */
+       bool (*need_full_reset)(struct amdgpu_device *adev);
 };
 
 /*
@@ -1773,6 +1775,7 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)
 #define amdgpu_asic_get_config_memsize(adev) (adev)->asic_funcs->get_config_memsize((adev))
 #define amdgpu_asic_flush_hdp(adev, r) (adev)->asic_funcs->flush_hdp((adev), (r))
 #define amdgpu_asic_invalidate_hdp(adev, r) (adev)->asic_funcs->invalidate_hdp((adev), (r))
+#define amdgpu_asic_need_full_reset(adev) (adev)->asic_funcs->need_full_reset((adev))
 #define amdgpu_gmc_flush_gpu_tlb(adev, vmid) (adev)->gmc.gmc_funcs->flush_gpu_tlb((adev), (vmid))
 #define amdgpu_gmc_emit_flush_gpu_tlb(r, vmid, addr) (r)->adev->gmc.gmc_funcs->emit_flush_gpu_tlb((r), (vmid), (addr))
 #define amdgpu_gmc_emit_pasid_mapping(r, vmid, pasid) (r)->adev->gmc.gmc_funcs->emit_pasid_mapping((r), (vmid), (pasid))