History

drm/amdgpu: remove AMDGPU_GEM_CREATE_SHADOW flag

Remove unused AMDGPU_GEM_CREATE_SHADOW flag. Userspace is never allowed to use this.

Nirmoy Das committed 5 years ago

Commit 42daecf1 parent cd2454d2 files · +1 −6Browse files

Unified · Split

2 files
  1. drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1 −4
  2. include/uapi/drm/amdgpu_drm.h +0 −2
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c+1−4
@@ -649,8 +649,7 @@ int amdgpu_bo_create_shadow(struct amdgpu_device *adev, · 648 unmodified lines
649649 memset(&bp, 0, sizeof(bp));
650650 bp.size = size;
651651 bp.domain = AMDGPU_GEM_DOMAIN_GTT;
652− bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC |
653− AMDGPU_GEM_CREATE_SHADOW;
652+ bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC;
654653 bp.type = ttm_bo_type_kernel;
655654 bp.resv = bo->tbo.base.resv;
656655 bp.bo_ptr_size = sizeof(struct amdgpu_bo);
@@ -685,7 +684,6 @@ int amdgpu_bo_create_user(struct amdgpu_device *adev, · 28 unmodified lines
685684 struct amdgpu_bo *bo_ptr;
686685 int r;
687686
688− bp->flags = bp->flags & ~AMDGPU_GEM_CREATE_SHADOW;
689687 bp->bo_ptr_size = sizeof(struct amdgpu_bo_user);
690688 r = amdgpu_bo_create(adev, bp, &bo_ptr);
691689 if (r)
@@ -1559,7 +1557,6 @@ u64 amdgpu_bo_print_info(int id, struct amdgpu_bo *bo, struct seq_file *m) · 867 unmodified lines
15591557 amdgpu_bo_print_flag(m, bo, NO_CPU_ACCESS);
15601558 amdgpu_bo_print_flag(m, bo, CPU_GTT_USWC);
15611559 amdgpu_bo_print_flag(m, bo, VRAM_CLEARED);
1562− amdgpu_bo_print_flag(m, bo, SHADOW);
15631560 amdgpu_bo_print_flag(m, bo, VRAM_CONTIGUOUS);
15641561 amdgpu_bo_print_flag(m, bo, VM_ALWAYS_VALID);
15651562 amdgpu_bo_print_flag(m, bo, EXPLICIT_SYNC);
include/uapi/drm/amdgpu_drm.h+0−2
@@ -116,8 +116,6 @@ extern "C" { · 115 unmodified lines
116116 #define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2)
117117 /* Flag that the memory should be in VRAM and cleared */
118118 #define AMDGPU_GEM_CREATE_VRAM_CLEARED (1 << 3)
119−/* Flag that create shadow bo(GTT) while allocating vram bo */
120−#define AMDGPU_GEM_CREATE_SHADOW (1 << 4)
121119 /* Flag that allocating the BO should use linear VRAM */
122120 #define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5)
123121 /* Flag that BO is always valid in this VM */