aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-11-01 00:54:27 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-01-14 15:04:55 -0500
commit444018893abfde1df86be9d4be3e0c84832397dd (patch)
treeadf9f797f448924746ef0ba6a4eaad7cc24f0a2b /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentd0948af7f6aaf05e3228063b26f696dedf2685df (diff)
drm/amdgpu: add need_reset_on_init asic callback (v2)
Used to determine if we need to reset the asic on init due to the driver having been previously loaded or not shutdown cleanly. E.g., kexec or VM passthrough. v2: rebase Reviewed-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 3b30bb2cdd21..88431ea88344 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -545,6 +545,8 @@ struct amdgpu_asic_funcs {
545 /* PCIe bandwidth usage */ 545 /* PCIe bandwidth usage */
546 void (*get_pcie_usage)(struct amdgpu_device *adev, uint64_t *count0, 546 void (*get_pcie_usage)(struct amdgpu_device *adev, uint64_t *count0,
547 uint64_t *count1); 547 uint64_t *count1);
548 /* do we need to reset the asic at init time (e.g., kexec) */
549 bool (*need_reset_on_init)(struct amdgpu_device *adev);
548}; 550};
549 551
550/* 552/*
@@ -1046,6 +1048,7 @@ int emu_soc_asic_init(struct amdgpu_device *adev);
1046#define amdgpu_asic_need_full_reset(adev) (adev)->asic_funcs->need_full_reset((adev)) 1048#define amdgpu_asic_need_full_reset(adev) (adev)->asic_funcs->need_full_reset((adev))
1047#define amdgpu_asic_init_doorbell_index(adev) (adev)->asic_funcs->init_doorbell_index((adev)) 1049#define amdgpu_asic_init_doorbell_index(adev) (adev)->asic_funcs->init_doorbell_index((adev))
1048#define amdgpu_asic_get_pcie_usage(adev, cnt0, cnt1) ((adev)->asic_funcs->get_pcie_usage((adev), (cnt0), (cnt1))) 1050#define amdgpu_asic_get_pcie_usage(adev, cnt0, cnt1) ((adev)->asic_funcs->get_pcie_usage((adev), (cnt0), (cnt1)))
1051#define amdgpu_asic_need_reset_on_init(adev) (adev)->asic_funcs->need_reset_on_init((adev))
1049 1052
1050/* Common functions */ 1053/* Common functions */
1051bool amdgpu_device_should_recover_gpu(struct amdgpu_device *adev); 1054bool amdgpu_device_should_recover_gpu(struct amdgpu_device *adev);