diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 55a840ae6d68..46b9ea4e6103 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -36,8 +36,6 @@ void amdgpu_gem_object_free(struct drm_gem_object *gobj) | |||
36 | struct amdgpu_bo *robj = gem_to_amdgpu_bo(gobj); | 36 | struct amdgpu_bo *robj = gem_to_amdgpu_bo(gobj); |
37 | 37 | ||
38 | if (robj) { | 38 | if (robj) { |
39 | if (robj->gem_base.import_attach) | ||
40 | drm_prime_gem_destroy(&robj->gem_base, robj->tbo.sg); | ||
41 | amdgpu_mn_unregister(robj); | 39 | amdgpu_mn_unregister(robj); |
42 | amdgpu_bo_unref(&robj); | 40 | amdgpu_bo_unref(&robj); |
43 | } | 41 | } |
@@ -45,7 +43,7 @@ void amdgpu_gem_object_free(struct drm_gem_object *gobj) | |||
45 | 43 | ||
46 | int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, | 44 | int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, |
47 | int alignment, u32 initial_domain, | 45 | int alignment, u32 initial_domain, |
48 | u64 flags, bool kernel, | 46 | u64 flags, enum ttm_bo_type type, |
49 | struct reservation_object *resv, | 47 | struct reservation_object *resv, |
50 | struct drm_gem_object **obj) | 48 | struct drm_gem_object **obj) |
51 | { | 49 | { |
@@ -59,8 +57,8 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, | |||
59 | } | 57 | } |
60 | 58 | ||
61 | retry: | 59 | retry: |
62 | r = amdgpu_bo_create(adev, size, alignment, kernel, initial_domain, | 60 | r = amdgpu_bo_create(adev, size, alignment, initial_domain, |
63 | flags, NULL, resv, &bo); | 61 | flags, type, resv, &bo); |
64 | if (r) { | 62 | if (r) { |
65 | if (r != -ERESTARTSYS) { | 63 | if (r != -ERESTARTSYS) { |
66 | if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) { | 64 | if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) { |