]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_gem.c
index 55a840ae6d68e6d056563f6b24756d65abd8c8a9..28c2706e48d7d46847d463d834d55e3603b639aa 100644 (file)
@@ -36,8 +36,6 @@ void amdgpu_gem_object_free(struct drm_gem_object *gobj)
        struct amdgpu_bo *robj = gem_to_amdgpu_bo(gobj);
 
        if (robj) {
-               if (robj->gem_base.import_attach)
-                       drm_prime_gem_destroy(&robj->gem_base, robj->tbo.sg);
                amdgpu_mn_unregister(robj);
                amdgpu_bo_unref(&robj);
        }
@@ -45,7 +43,7 @@ void amdgpu_gem_object_free(struct drm_gem_object *gobj)
 
 int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
                             int alignment, u32 initial_domain,
-                            u64 flags, bool kernel,
+                            u64 flags, enum ttm_bo_type type,
                             struct reservation_object *resv,
                             struct drm_gem_object **obj)
 {
@@ -58,23 +56,11 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
                alignment = PAGE_SIZE;
        }
 
-retry:
-       r = amdgpu_bo_create(adev, size, alignment, kernel, initial_domain,
-                            flags, NULL, resv, &bo);
+       r = amdgpu_bo_create(adev, size, alignment, initial_domain,
+                            flags, type, resv, &bo);
        if (r) {
-               if (r != -ERESTARTSYS) {
-                       if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) {
-                               flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
-                               goto retry;
-                       }
-
-                       if (initial_domain == AMDGPU_GEM_DOMAIN_VRAM) {
-                               initial_domain |= AMDGPU_GEM_DOMAIN_GTT;
-                               goto retry;
-                       }
-                       DRM_DEBUG("Failed to allocate GEM object (%ld, %d, %u, %d)\n",
-                                 size, initial_domain, alignment, r);
-               }
+               DRM_DEBUG("Failed to allocate GEM object (%ld, %d, %u, %d)\n",
+                         size, initial_domain, alignment, r);
                return r;
        }
        *obj = &bo->gem_base;
This page took 0.035534 seconds and 4 git commands to generate.