]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: ignore changes of buffer function status because of GPU resets
authorChristian König <christian.koenig@amd.com>
Thu, 1 Mar 2018 10:03:27 +0000 (11:03 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Mar 2018 20:37:18 +0000 (15:37 -0500)
When we reset the GPU we also disable/enable the SDMA, but we don't want
to change TTM idea of the VRAM size in the middle of that.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Chunming zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index 46d7a690a28704bbb5bc6a546791e99e0bba7497..2aa6823ef503038cd0c8d9d7edc5bd9be254e602 100644 (file)
@@ -1540,7 +1540,7 @@ void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable)
        struct ttm_mem_type_manager *man = &adev->mman.bdev.man[TTM_PL_VRAM];
        uint64_t size;
 
-       if (!adev->mman.initialized)
+       if (!adev->mman.initialized || adev->in_gpu_reset)
                return;
 
        /* this just adjusts TTM size idea, which sets lpfn to the correct value */