History

drm/amdgpu: revert "add new bo flag that indicates BOs don't need fallback (v2)"

This reverts commit 6f51d28bfe8e1a676de5cd877639245bed3cc818. Makes fallback handling to complicated. This is just a feature for the GEM interface and shouldn't leak into the core BO create function.

Christian König committed 8 years ago

Commit 1afd30e1 parent 63c2f7e3 files · +2 −8Browse files

Unified · Split

3 files
  1. drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 −2
  2. drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1 −4
  3. include/uapi/drm/amdgpu_drm.h +0 −2
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c+1−2
@@ -385,8 +385,7 @@ retry: · 384 unmodified lines
385385 amdgpu_bo_in_cpu_visible_vram(bo))
386386 p->bytes_moved_vis += ctx.bytes_moved;
387387
388− if (unlikely(r == -ENOMEM) && domain != bo->allowed_domains &&
389− !(bo->flags & AMDGPU_GEM_CREATE_NO_FALLBACK)) {
388+ if (unlikely(r == -ENOMEM) && domain != bo->allowed_domains) {
390389 domain = bo->allowed_domains;
391390 goto retry;
392391 }
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c+1−4
@@ -388,8 +388,6 @@ retry: · 387 unmodified lines
388388 drm_gem_private_object_init(adev->ddev, &bo->gem_base, size);
389389 INIT_LIST_HEAD(&bo->shadow_list);
390390 INIT_LIST_HEAD(&bo->va);
391− bo->preferred_domains = preferred_domains;
392− bo->allowed_domains = allowed_domains;
393391
394392 bo->flags = flags;
395393
@@ -426,8 +424,7 @@ retry: · 30 unmodified lines
426424 r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, type,
427425 &bo->placement, page_align, &ctx, acc_size,
428426 NULL, resv, &amdgpu_ttm_bo_destroy);
429− if (unlikely(r && r != -ERESTARTSYS) && type == ttm_bo_type_device &&
430− !(flags & AMDGPU_GEM_CREATE_NO_FALLBACK)) {
427+ if (unlikely(r && r != -ERESTARTSYS) && type == ttm_bo_type_device) {
431428 if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) {
432429 flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
433430 goto retry;
include/uapi/drm/amdgpu_drm.h+0−2
@@ -95,8 +95,6 @@ extern "C" { · 94 unmodified lines
9595 #define AMDGPU_GEM_CREATE_VM_ALWAYS_VALID (1 << 6)
9696 /* Flag that BO sharing will be explicitly synchronized */
9797 #define AMDGPU_GEM_CREATE_EXPLICIT_SYNC (1 << 7)
98−/* Flag that BO doesn't need fallback */
99−#define AMDGPU_GEM_CREATE_NO_FALLBACK (1 << 8)
10098
10199 struct drm_amdgpu_gem_create_in {
102100 /** the requested memory size */