aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-03-29 15:39:28 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-04-11 14:07:58 -0400
commit06082d9b711fd5889c5f182c6fa629891e5b48c3 (patch)
tree26a0ae23a26a5be89ff48d4ae14260f2702a76c6
parentb7acb46f210b92005b8db16380eac6b3a4c61431 (diff)
drm/amdgpu/vi: implement asic need_full_reset callback
Used to check on a per SoC basis whether the SoC needs a full reset of a per IP soft reset. 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>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vi.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 126f1276d347..1b4ee249b95a 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -876,6 +876,27 @@ static void vi_invalidate_hdp(struct amdgpu_device *adev,
876 } 876 }
877} 877}
878 878
879static bool vi_need_full_reset(struct amdgpu_device *adev)
880{
881 switch (adev->asic_type) {
882 case CHIP_CARRIZO:
883 case CHIP_STONEY:
884 /* CZ has hang issues with full reset at the moment */
885 return false;
886 case CHIP_FIJI:
887 case CHIP_TONGA:
888 /* XXX: soft reset should work on fiji and tonga */
889 return true;
890 case CHIP_POLARIS10:
891 case CHIP_POLARIS11:
892 case CHIP_POLARIS12:
893 case CHIP_TOPAZ:
894 default:
895 /* change this when we support soft reset */
896 return true;
897 }
898}
899
879static const struct amdgpu_asic_funcs vi_asic_funcs = 900static const struct amdgpu_asic_funcs vi_asic_funcs =
880{ 901{
881 .read_disabled_bios = &vi_read_disabled_bios, 902 .read_disabled_bios = &vi_read_disabled_bios,
@@ -889,6 +910,7 @@ static const struct amdgpu_asic_funcs vi_asic_funcs =
889 .get_config_memsize = &vi_get_config_memsize, 910 .get_config_memsize = &vi_get_config_memsize,
890 .flush_hdp = &vi_flush_hdp, 911 .flush_hdp = &vi_flush_hdp,
891 .invalidate_hdp = &vi_invalidate_hdp, 912 .invalidate_hdp = &vi_invalidate_hdp,
913 .need_full_reset = &vi_need_full_reset,
892}; 914};
893 915
894#define CZ_REV_BRISTOL(rev) \ 916#define CZ_REV_BRISTOL(rev) \