Skip to content

Commit 42daecf

Browse files
Nirmoy Dasalexdeucher
authored andcommitted
drm/amdgpu: remove AMDGPU_GEM_CREATE_SHADOW flag
Remove unused AMDGPU_GEM_CREATE_SHADOW flag. Userspace is never allowed to use this. Signed-off-by: Nirmoy Das <nirmoy.das@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent cd2454d commit 42daecf

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

‎drivers/gpu/drm/amd/amdgpu/amdgpu_object.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,7 @@ int amdgpu_bo_create_shadow(struct amdgpu_device *adev,
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,
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)
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‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ extern "C" {
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 */

0 commit comments

Comments
 (0)