]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
Merge tag 'pm-part2-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_object.c
index dc0a8be98043ee3476d774b8d043cc83688c1d10..5c4c3e0d527be64386dcab0951727642f64d73db 100644 (file)
 #include "amdgpu.h"
 #include "amdgpu_trace.h"
 
+static bool amdgpu_need_backup(struct amdgpu_device *adev)
+{
+       if (adev->flags & AMD_IS_APU)
+               return false;
+
+       if (amdgpu_gpu_recovery == 0 ||
+           (amdgpu_gpu_recovery == -1  && !amdgpu_sriov_vf(adev)))
+               return false;
+
+       return true;
+}
+
 static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo)
 {
        struct amdgpu_device *adev = amdgpu_ttm_adev(tbo->bdev);
@@ -327,7 +339,12 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,
                               uint64_t init_value,
                               struct amdgpu_bo **bo_ptr)
 {
-       struct ttm_operation_ctx ctx = { !kernel, false };
+       struct ttm_operation_ctx ctx = {
+               .interruptible = !kernel,
+               .no_wait_gpu = false,
+               .allow_reserved_eviction = true,
+               .resv = resv
+       };
        struct amdgpu_bo *bo;
        enum ttm_bo_type type;
        unsigned long page_align;
This page took 0.033774 seconds and 4 git commands to generate.