aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c178
1 files changed, 131 insertions, 47 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 3e84ddf9e3b5..efcacb827de7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -56,6 +56,7 @@
56#include "amdgpu_vf_error.h" 56#include "amdgpu_vf_error.h"
57 57
58#include "amdgpu_amdkfd.h" 58#include "amdgpu_amdkfd.h"
59#include "amdgpu_pm.h"
59 60
60MODULE_FIRMWARE("amdgpu/vega10_gpu_info.bin"); 61MODULE_FIRMWARE("amdgpu/vega10_gpu_info.bin");
61MODULE_FIRMWARE("amdgpu/raven_gpu_info.bin"); 62MODULE_FIRMWARE("amdgpu/raven_gpu_info.bin");
@@ -108,10 +109,8 @@ uint32_t amdgpu_mm_rreg(struct amdgpu_device *adev, uint32_t reg,
108{ 109{
109 uint32_t ret; 110 uint32_t ret;
110 111
111 if (!(acc_flags & AMDGPU_REGS_NO_KIQ) && amdgpu_sriov_runtime(adev)) { 112 if (!(acc_flags & AMDGPU_REGS_NO_KIQ) && amdgpu_sriov_runtime(adev))
112 BUG_ON(in_interrupt());
113 return amdgpu_virt_kiq_rreg(adev, reg); 113 return amdgpu_virt_kiq_rreg(adev, reg);
114 }
115 114
116 if ((reg * 4) < adev->rmmio_size && !(acc_flags & AMDGPU_REGS_IDX)) 115 if ((reg * 4) < adev->rmmio_size && !(acc_flags & AMDGPU_REGS_IDX))
117 ret = readl(((void __iomem *)adev->rmmio) + (reg * 4)); 116 ret = readl(((void __iomem *)adev->rmmio) + (reg * 4));
@@ -136,10 +135,8 @@ void amdgpu_mm_wreg(struct amdgpu_device *adev, uint32_t reg, uint32_t v,
136 adev->last_mm_index = v; 135 adev->last_mm_index = v;
137 } 136 }
138 137
139 if (!(acc_flags & AMDGPU_REGS_NO_KIQ) && amdgpu_sriov_runtime(adev)) { 138 if (!(acc_flags & AMDGPU_REGS_NO_KIQ) && amdgpu_sriov_runtime(adev))
140 BUG_ON(in_interrupt());
141 return amdgpu_virt_kiq_wreg(adev, reg, v); 139 return amdgpu_virt_kiq_wreg(adev, reg, v);
142 }
143 140
144 if ((reg * 4) < adev->rmmio_size && !(acc_flags & AMDGPU_REGS_IDX)) 141 if ((reg * 4) < adev->rmmio_size && !(acc_flags & AMDGPU_REGS_IDX))
145 writel(v, ((void __iomem *)adev->rmmio) + (reg * 4)); 142 writel(v, ((void __iomem *)adev->rmmio) + (reg * 4));
@@ -549,7 +546,7 @@ int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb)
549 546
550 if (offset < adev->wb.num_wb) { 547 if (offset < adev->wb.num_wb) {
551 __set_bit(offset, adev->wb.used); 548 __set_bit(offset, adev->wb.used);
552 *wb = offset * 8; /* convert to dw offset */ 549 *wb = offset << 3; /* convert to dw offset */
553 return 0; 550 return 0;
554 } else { 551 } else {
555 return -EINVAL; 552 return -EINVAL;
@@ -567,7 +564,7 @@ int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb)
567void amdgpu_wb_free(struct amdgpu_device *adev, u32 wb) 564void amdgpu_wb_free(struct amdgpu_device *adev, u32 wb)
568{ 565{
569 if (wb < adev->wb.num_wb) 566 if (wb < adev->wb.num_wb)
570 __clear_bit(wb, adev->wb.used); 567 __clear_bit(wb >> 3, adev->wb.used);
571} 568}
572 569
573/** 570/**
@@ -657,42 +654,96 @@ void amdgpu_gart_location(struct amdgpu_device *adev, struct amdgpu_mc *mc)
657} 654}
658 655
659/* 656/*
660 * GPU helpers function. 657 * Firmware Reservation functions
661 */ 658 */
662/** 659/**
663 * amdgpu_need_post - check if the hw need post or not 660 * amdgpu_fw_reserve_vram_fini - free fw reserved vram
664 * 661 *
665 * @adev: amdgpu_device pointer 662 * @adev: amdgpu_device pointer
666 * 663 *
667 * Check if the asic has been initialized (all asics) at driver startup 664 * free fw reserved vram if it has been reserved.
668 * or post is needed if hw reset is performed.
669 * Returns true if need or false if not.
670 */ 665 */
671bool amdgpu_need_post(struct amdgpu_device *adev) 666void amdgpu_fw_reserve_vram_fini(struct amdgpu_device *adev)
672{ 667{
673 uint32_t reg; 668 amdgpu_bo_free_kernel(&adev->fw_vram_usage.reserved_bo,
669 NULL, &adev->fw_vram_usage.va);
670}
674 671
675 if (adev->has_hw_reset) { 672/**
676 adev->has_hw_reset = false; 673 * amdgpu_fw_reserve_vram_init - create bo vram reservation from fw
677 return true; 674 *
678 } 675 * @adev: amdgpu_device pointer
676 *
677 * create bo vram reservation from fw.
678 */
679int amdgpu_fw_reserve_vram_init(struct amdgpu_device *adev)
680{
681 int r = 0;
682 u64 gpu_addr;
683 u64 vram_size = adev->mc.visible_vram_size;
679 684
680 /* bios scratch used on CIK+ */ 685 adev->fw_vram_usage.va = NULL;
681 if (adev->asic_type >= CHIP_BONAIRE) 686 adev->fw_vram_usage.reserved_bo = NULL;
682 return amdgpu_atombios_scratch_need_asic_init(adev);
683 687
684 /* check MEM_SIZE for older asics */ 688 if (adev->fw_vram_usage.size > 0 &&
685 reg = amdgpu_asic_get_config_memsize(adev); 689 adev->fw_vram_usage.size <= vram_size) {
686 690
687 if ((reg != 0) && (reg != 0xffffffff)) 691 r = amdgpu_bo_create(adev, adev->fw_vram_usage.size,
688 return false; 692 PAGE_SIZE, true, 0,
693 AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
694 AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS, NULL, NULL, 0,
695 &adev->fw_vram_usage.reserved_bo);
696 if (r)
697 goto error_create;
689 698
690 return true; 699 r = amdgpu_bo_reserve(adev->fw_vram_usage.reserved_bo, false);
700 if (r)
701 goto error_reserve;
702 r = amdgpu_bo_pin_restricted(adev->fw_vram_usage.reserved_bo,
703 AMDGPU_GEM_DOMAIN_VRAM,
704 adev->fw_vram_usage.start_offset,
705 (adev->fw_vram_usage.start_offset +
706 adev->fw_vram_usage.size), &gpu_addr);
707 if (r)
708 goto error_pin;
709 r = amdgpu_bo_kmap(adev->fw_vram_usage.reserved_bo,
710 &adev->fw_vram_usage.va);
711 if (r)
712 goto error_kmap;
691 713
714 amdgpu_bo_unreserve(adev->fw_vram_usage.reserved_bo);
715 }
716 return r;
717
718error_kmap:
719 amdgpu_bo_unpin(adev->fw_vram_usage.reserved_bo);
720error_pin:
721 amdgpu_bo_unreserve(adev->fw_vram_usage.reserved_bo);
722error_reserve:
723 amdgpu_bo_unref(&adev->fw_vram_usage.reserved_bo);
724error_create:
725 adev->fw_vram_usage.va = NULL;
726 adev->fw_vram_usage.reserved_bo = NULL;
727 return r;
692} 728}
693 729
694static bool amdgpu_vpost_needed(struct amdgpu_device *adev) 730
731/*
732 * GPU helpers function.
733 */
734/**
735 * amdgpu_need_post - check if the hw need post or not
736 *
737 * @adev: amdgpu_device pointer
738 *
739 * Check if the asic has been initialized (all asics) at driver startup
740 * or post is needed if hw reset is performed.
741 * Returns true if need or false if not.
742 */
743bool amdgpu_need_post(struct amdgpu_device *adev)
695{ 744{
745 uint32_t reg;
746
696 if (amdgpu_sriov_vf(adev)) 747 if (amdgpu_sriov_vf(adev))
697 return false; 748 return false;
698 749
@@ -715,7 +766,23 @@ static bool amdgpu_vpost_needed(struct amdgpu_device *adev)
715 return true; 766 return true;
716 } 767 }
717 } 768 }
718 return amdgpu_need_post(adev); 769
770 if (adev->has_hw_reset) {
771 adev->has_hw_reset = false;
772 return true;
773 }
774
775 /* bios scratch used on CIK+ */
776 if (adev->asic_type >= CHIP_BONAIRE)
777 return amdgpu_atombios_scratch_need_asic_init(adev);
778
779 /* check MEM_SIZE for older asics */
780 reg = amdgpu_asic_get_config_memsize(adev);
781
782 if ((reg != 0) && (reg != 0xffffffff))
783 return false;
784
785 return true;
719} 786}
720 787
721/** 788/**
@@ -1879,6 +1946,7 @@ static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
1879 1946
1880 static enum amd_ip_block_type ip_order[] = { 1947 static enum amd_ip_block_type ip_order[] = {
1881 AMD_IP_BLOCK_TYPE_SMC, 1948 AMD_IP_BLOCK_TYPE_SMC,
1949 AMD_IP_BLOCK_TYPE_PSP,
1882 AMD_IP_BLOCK_TYPE_DCE, 1950 AMD_IP_BLOCK_TYPE_DCE,
1883 AMD_IP_BLOCK_TYPE_GFX, 1951 AMD_IP_BLOCK_TYPE_GFX,
1884 AMD_IP_BLOCK_TYPE_SDMA, 1952 AMD_IP_BLOCK_TYPE_SDMA,
@@ -1964,12 +2032,17 @@ static int amdgpu_resume(struct amdgpu_device *adev)
1964 2032
1965static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev) 2033static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
1966{ 2034{
1967 if (adev->is_atom_fw) { 2035 if (amdgpu_sriov_vf(adev)) {
1968 if (amdgpu_atomfirmware_gpu_supports_virtualization(adev)) 2036 if (adev->is_atom_fw) {
1969 adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS; 2037 if (amdgpu_atomfirmware_gpu_supports_virtualization(adev))
1970 } else { 2038 adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
1971 if (amdgpu_atombios_has_gpu_virtualization_table(adev)) 2039 } else {
1972 adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS; 2040 if (amdgpu_atombios_has_gpu_virtualization_table(adev))
2041 adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
2042 }
2043
2044 if (!(adev->virt.caps & AMDGPU_SRIOV_CAPS_SRIOV_VBIOS))
2045 amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
1973 } 2046 }
1974} 2047}
1975 2048
@@ -2010,6 +2083,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2010 adev->vm_manager.vm_pte_num_rings = 0; 2083 adev->vm_manager.vm_pte_num_rings = 0;
2011 adev->gart.gart_funcs = NULL; 2084 adev->gart.gart_funcs = NULL;
2012 adev->fence_context = dma_fence_context_alloc(AMDGPU_MAX_RINGS); 2085 adev->fence_context = dma_fence_context_alloc(AMDGPU_MAX_RINGS);
2086 bitmap_zero(adev->gfx.pipe_reserve_bitmap, AMDGPU_MAX_COMPUTE_QUEUES);
2013 2087
2014 adev->smc_rreg = &amdgpu_invalid_rreg; 2088 adev->smc_rreg = &amdgpu_invalid_rreg;
2015 adev->smc_wreg = &amdgpu_invalid_wreg; 2089 adev->smc_wreg = &amdgpu_invalid_wreg;
@@ -2038,8 +2112,10 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2038 mutex_init(&adev->pm.mutex); 2112 mutex_init(&adev->pm.mutex);
2039 mutex_init(&adev->gfx.gpu_clock_mutex); 2113 mutex_init(&adev->gfx.gpu_clock_mutex);
2040 mutex_init(&adev->srbm_mutex); 2114 mutex_init(&adev->srbm_mutex);
2115 mutex_init(&adev->gfx.pipe_reserve_mutex);
2041 mutex_init(&adev->grbm_idx_mutex); 2116 mutex_init(&adev->grbm_idx_mutex);
2042 mutex_init(&adev->mn_lock); 2117 mutex_init(&adev->mn_lock);
2118 mutex_init(&adev->virt.vf_errors.lock);
2043 hash_init(adev->mn_hash); 2119 hash_init(adev->mn_hash);
2044 2120
2045 amdgpu_check_arguments(adev); 2121 amdgpu_check_arguments(adev);
@@ -2125,7 +2201,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2125 r = amdgpu_atombios_init(adev); 2201 r = amdgpu_atombios_init(adev);
2126 if (r) { 2202 if (r) {
2127 dev_err(adev->dev, "amdgpu_atombios_init failed\n"); 2203 dev_err(adev->dev, "amdgpu_atombios_init failed\n");
2128 amdgpu_vf_error_put(AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0); 2204 amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);
2129 goto failed; 2205 goto failed;
2130 } 2206 }
2131 2207
@@ -2133,10 +2209,9 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2133 amdgpu_device_detect_sriov_bios(adev); 2209 amdgpu_device_detect_sriov_bios(adev);
2134 2210
2135 /* Post card if necessary */ 2211 /* Post card if necessary */
2136 if (amdgpu_vpost_needed(adev)) { 2212 if (amdgpu_need_post(adev)) {
2137 if (!adev->bios) { 2213 if (!adev->bios) {
2138 dev_err(adev->dev, "no vBIOS found\n"); 2214 dev_err(adev->dev, "no vBIOS found\n");
2139 amdgpu_vf_error_put(AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
2140 r = -EINVAL; 2215 r = -EINVAL;
2141 goto failed; 2216 goto failed;
2142 } 2217 }
@@ -2144,7 +2219,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2144 r = amdgpu_atom_asic_init(adev->mode_info.atom_context); 2219 r = amdgpu_atom_asic_init(adev->mode_info.atom_context);
2145 if (r) { 2220 if (r) {
2146 dev_err(adev->dev, "gpu post error!\n"); 2221 dev_err(adev->dev, "gpu post error!\n");
2147 amdgpu_vf_error_put(AMDGIM_ERROR_VF_GPU_POST_ERROR, 0, 0);
2148 goto failed; 2222 goto failed;
2149 } 2223 }
2150 } else { 2224 } else {
@@ -2156,7 +2230,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2156 r = amdgpu_atomfirmware_get_clock_info(adev); 2230 r = amdgpu_atomfirmware_get_clock_info(adev);
2157 if (r) { 2231 if (r) {
2158 dev_err(adev->dev, "amdgpu_atomfirmware_get_clock_info failed\n"); 2232 dev_err(adev->dev, "amdgpu_atomfirmware_get_clock_info failed\n");
2159 amdgpu_vf_error_put(AMDGIM_ERROR_VF_ATOMBIOS_GET_CLOCK_FAIL, 0, 0); 2233 amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_GET_CLOCK_FAIL, 0, 0);
2160 goto failed; 2234 goto failed;
2161 } 2235 }
2162 } else { 2236 } else {
@@ -2164,7 +2238,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2164 r = amdgpu_atombios_get_clock_info(adev); 2238 r = amdgpu_atombios_get_clock_info(adev);
2165 if (r) { 2239 if (r) {
2166 dev_err(adev->dev, "amdgpu_atombios_get_clock_info failed\n"); 2240 dev_err(adev->dev, "amdgpu_atombios_get_clock_info failed\n");
2167 amdgpu_vf_error_put(AMDGIM_ERROR_VF_ATOMBIOS_GET_CLOCK_FAIL, 0, 0); 2241 amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_GET_CLOCK_FAIL, 0, 0);
2168 goto failed; 2242 goto failed;
2169 } 2243 }
2170 /* init i2c buses */ 2244 /* init i2c buses */
@@ -2175,7 +2249,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2175 r = amdgpu_fence_driver_init(adev); 2249 r = amdgpu_fence_driver_init(adev);
2176 if (r) { 2250 if (r) {
2177 dev_err(adev->dev, "amdgpu_fence_driver_init failed\n"); 2251 dev_err(adev->dev, "amdgpu_fence_driver_init failed\n");
2178 amdgpu_vf_error_put(AMDGIM_ERROR_VF_FENCE_INIT_FAIL, 0, 0); 2252 amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_FENCE_INIT_FAIL, 0, 0);
2179 goto failed; 2253 goto failed;
2180 } 2254 }
2181 2255
@@ -2185,7 +2259,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2185 r = amdgpu_init(adev); 2259 r = amdgpu_init(adev);
2186 if (r) { 2260 if (r) {
2187 dev_err(adev->dev, "amdgpu_init failed\n"); 2261 dev_err(adev->dev, "amdgpu_init failed\n");
2188 amdgpu_vf_error_put(AMDGIM_ERROR_VF_AMDGPU_INIT_FAIL, 0, 0); 2262 amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_AMDGPU_INIT_FAIL, 0, 0);
2189 amdgpu_fini(adev); 2263 amdgpu_fini(adev);
2190 goto failed; 2264 goto failed;
2191 } 2265 }
@@ -2205,7 +2279,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2205 r = amdgpu_ib_pool_init(adev); 2279 r = amdgpu_ib_pool_init(adev);
2206 if (r) { 2280 if (r) {
2207 dev_err(adev->dev, "IB initialization failed (%d).\n", r); 2281 dev_err(adev->dev, "IB initialization failed (%d).\n", r);
2208 amdgpu_vf_error_put(AMDGIM_ERROR_VF_IB_INIT_FAIL, 0, r); 2282 amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_IB_INIT_FAIL, 0, r);
2209 goto failed; 2283 goto failed;
2210 } 2284 }
2211 2285
@@ -2213,8 +2287,15 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2213 if (r) 2287 if (r)
2214 DRM_ERROR("ib ring test failed (%d).\n", r); 2288 DRM_ERROR("ib ring test failed (%d).\n", r);
2215 2289
2290 if (amdgpu_sriov_vf(adev))
2291 amdgpu_virt_init_data_exchange(adev);
2292
2216 amdgpu_fbdev_init(adev); 2293 amdgpu_fbdev_init(adev);
2217 2294
2295 r = amdgpu_pm_sysfs_init(adev);
2296 if (r)
2297 DRM_ERROR("registering pm debugfs failed (%d).\n", r);
2298
2218 r = amdgpu_gem_debugfs_init(adev); 2299 r = amdgpu_gem_debugfs_init(adev);
2219 if (r) 2300 if (r)
2220 DRM_ERROR("registering gem debugfs failed (%d).\n", r); 2301 DRM_ERROR("registering gem debugfs failed (%d).\n", r);
@@ -2254,7 +2335,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
2254 r = amdgpu_late_init(adev); 2335 r = amdgpu_late_init(adev);
2255 if (r) { 2336 if (r) {
2256 dev_err(adev->dev, "amdgpu_late_init failed\n"); 2337 dev_err(adev->dev, "amdgpu_late_init failed\n");
2257 amdgpu_vf_error_put(AMDGIM_ERROR_VF_AMDGPU_LATE_INIT_FAIL, 0, r); 2338 amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_AMDGPU_LATE_INIT_FAIL, 0, r);
2258 goto failed; 2339 goto failed;
2259 } 2340 }
2260 2341
@@ -2286,6 +2367,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
2286 /* evict vram memory */ 2367 /* evict vram memory */
2287 amdgpu_bo_evict_vram(adev); 2368 amdgpu_bo_evict_vram(adev);
2288 amdgpu_ib_pool_fini(adev); 2369 amdgpu_ib_pool_fini(adev);
2370 amdgpu_fw_reserve_vram_fini(adev);
2289 amdgpu_fence_driver_fini(adev); 2371 amdgpu_fence_driver_fini(adev);
2290 amdgpu_fbdev_fini(adev); 2372 amdgpu_fbdev_fini(adev);
2291 r = amdgpu_fini(adev); 2373 r = amdgpu_fini(adev);
@@ -2311,6 +2393,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
2311 iounmap(adev->rmmio); 2393 iounmap(adev->rmmio);
2312 adev->rmmio = NULL; 2394 adev->rmmio = NULL;
2313 amdgpu_doorbell_fini(adev); 2395 amdgpu_doorbell_fini(adev);
2396 amdgpu_pm_sysfs_fini(adev);
2314 amdgpu_debugfs_regs_cleanup(adev); 2397 amdgpu_debugfs_regs_cleanup(adev);
2315} 2398}
2316 2399
@@ -2537,6 +2620,9 @@ static bool amdgpu_check_soft_reset(struct amdgpu_device *adev)
2537 int i; 2620 int i;
2538 bool asic_hang = false; 2621 bool asic_hang = false;
2539 2622
2623 if (amdgpu_sriov_vf(adev))
2624 return true;
2625
2540 for (i = 0; i < adev->num_ip_blocks; i++) { 2626 for (i = 0; i < adev->num_ip_blocks; i++) {
2541 if (!adev->ip_blocks[i].status.valid) 2627 if (!adev->ip_blocks[i].status.valid)
2542 continue; 2628 continue;
@@ -2936,7 +3022,6 @@ out:
2936 } 3022 }
2937 } else { 3023 } else {
2938 dev_err(adev->dev, "asic resume failed (%d).\n", r); 3024 dev_err(adev->dev, "asic resume failed (%d).\n", r);
2939 amdgpu_vf_error_put(AMDGIM_ERROR_VF_ASIC_RESUME_FAIL, 0, r);
2940 for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { 3025 for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
2941 if (adev->rings[i] && adev->rings[i]->sched.thread) { 3026 if (adev->rings[i] && adev->rings[i]->sched.thread) {
2942 kthread_unpark(adev->rings[i]->sched.thread); 3027 kthread_unpark(adev->rings[i]->sched.thread);
@@ -2950,7 +3035,6 @@ out:
2950 if (r) { 3035 if (r) {
2951 /* bad news, how to tell it to userspace ? */ 3036 /* bad news, how to tell it to userspace ? */
2952 dev_info(adev->dev, "GPU reset failed\n"); 3037 dev_info(adev->dev, "GPU reset failed\n");
2953 amdgpu_vf_error_put(AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r);
2954 } 3038 }
2955 else { 3039 else {
2956 dev_info(adev->dev, "GPU reset successed!\n"); 3040 dev_info(adev->dev, "GPU reset successed!\n");