diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2017-12-15 16:45:02 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-18 11:00:03 -0500 |
commit | 6b8f4ee56fb27ac36fb3dbec91b5eb04beb90287 (patch) | |
tree | 9be8107381fea0a81d0dfc04ef5b8ea3f5d0add5 /drivers/gpu/drm/amd/amdgpu | |
parent | 5f152b5e69a5392181b0a84bd55fe17a417364ac (diff) |
drm/amdgpu: move amdgpu_need_backup to amdgpu_object.c
It's the only place it's used.
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 8 |
3 files changed, 8 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 04e5498929c3..91b4fda42873 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -1889,7 +1889,6 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) | |||
1889 | /* Common functions */ | 1889 | /* Common functions */ |
1890 | int amdgpu_device_gpu_recover(struct amdgpu_device *adev, | 1890 | int amdgpu_device_gpu_recover(struct amdgpu_device *adev, |
1891 | struct amdgpu_job* job, bool force); | 1891 | struct amdgpu_job* job, bool force); |
1892 | bool amdgpu_need_backup(struct amdgpu_device *adev); | ||
1893 | void amdgpu_device_pci_config_reset(struct amdgpu_device *adev); | 1892 | void amdgpu_device_pci_config_reset(struct amdgpu_device *adev); |
1894 | bool amdgpu_device_need_post(struct amdgpu_device *adev); | 1893 | bool amdgpu_device_need_post(struct amdgpu_device *adev); |
1895 | void amdgpu_update_display_priority(struct amdgpu_device *adev); | 1894 | void amdgpu_update_display_priority(struct amdgpu_device *adev); |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index cfeceab29224..f80081ecb02c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -2425,14 +2425,6 @@ static int amdgpu_device_ip_post_soft_reset(struct amdgpu_device *adev) | |||
2425 | return 0; | 2425 | return 0; |
2426 | } | 2426 | } |
2427 | 2427 | ||
2428 | bool amdgpu_need_backup(struct amdgpu_device *adev) | ||
2429 | { | ||
2430 | if (adev->flags & AMD_IS_APU) | ||
2431 | return false; | ||
2432 | |||
2433 | return amdgpu_gpu_recovery; | ||
2434 | } | ||
2435 | |||
2436 | static int amdgpu_device_recover_vram_from_shadow(struct amdgpu_device *adev, | 2428 | static int amdgpu_device_recover_vram_from_shadow(struct amdgpu_device *adev, |
2437 | struct amdgpu_ring *ring, | 2429 | struct amdgpu_ring *ring, |
2438 | struct amdgpu_bo *bo, | 2430 | struct amdgpu_bo *bo, |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 86340cfa6be7..4feee9927bce 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |||
@@ -37,6 +37,14 @@ | |||
37 | #include "amdgpu.h" | 37 | #include "amdgpu.h" |
38 | #include "amdgpu_trace.h" | 38 | #include "amdgpu_trace.h" |
39 | 39 | ||
40 | static bool amdgpu_need_backup(struct amdgpu_device *adev) | ||
41 | { | ||
42 | if (adev->flags & AMD_IS_APU) | ||
43 | return false; | ||
44 | |||
45 | return amdgpu_gpu_recovery; | ||
46 | } | ||
47 | |||
40 | static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo) | 48 | static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo) |
41 | { | 49 | { |
42 | struct amdgpu_device *adev = amdgpu_ttm_adev(tbo->bdev); | 50 | struct amdgpu_device *adev = amdgpu_ttm_adev(tbo->bdev); |