Remove unused AMDGPU_GEM_CREATE_SHADOW flag. Userspace is never allowed to use this.
Unified · Split
| @@ -649,8 +649,7 @@ int amdgpu_bo_create_shadow(struct amdgpu_device *adev, · 648 unmodified lines | |||
| 649 | memset(&bp, 0, sizeof(bp)); | 649 | memset(&bp, 0, sizeof(bp)); |
| 650 | bp.size = size; | 650 | bp.size = size; |
| 651 | bp.domain = AMDGPU_GEM_DOMAIN_GTT; | 651 | bp.domain = AMDGPU_GEM_DOMAIN_GTT; |
| 652 | bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC | | 652 | bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC; |
| 653 | AMDGPU_GEM_CREATE_SHADOW; | ||
| 654 | bp.type = ttm_bo_type_kernel; | 653 | bp.type = ttm_bo_type_kernel; |
| 655 | bp.resv = bo->tbo.base.resv; | 654 | bp.resv = bo->tbo.base.resv; |
| 656 | bp.bo_ptr_size = sizeof(struct amdgpu_bo); | 655 | bp.bo_ptr_size = sizeof(struct amdgpu_bo); |
| @@ -685,7 +684,6 @@ int amdgpu_bo_create_user(struct amdgpu_device *adev, · 28 unmodified lines | |||
| 685 | struct amdgpu_bo *bo_ptr; | 684 | struct amdgpu_bo *bo_ptr; |
| 686 | int r; | 685 | int r; |
| 687 | 686 | ||
| 688 | bp->flags = bp->flags & ~AMDGPU_GEM_CREATE_SHADOW; | ||
| 689 | bp->bo_ptr_size = sizeof(struct amdgpu_bo_user); | 687 | bp->bo_ptr_size = sizeof(struct amdgpu_bo_user); |
| 690 | r = amdgpu_bo_create(adev, bp, &bo_ptr); | 688 | r = amdgpu_bo_create(adev, bp, &bo_ptr); |
| 691 | if (r) | 689 | if (r) |
| @@ -1559,7 +1557,6 @@ u64 amdgpu_bo_print_info(int id, struct amdgpu_bo *bo, struct seq_file *m) · 867 unmodified lines | |||
| 1559 | amdgpu_bo_print_flag(m, bo, NO_CPU_ACCESS); | 1557 | amdgpu_bo_print_flag(m, bo, NO_CPU_ACCESS); |
| 1560 | amdgpu_bo_print_flag(m, bo, CPU_GTT_USWC); | 1558 | amdgpu_bo_print_flag(m, bo, CPU_GTT_USWC); |
| 1561 | amdgpu_bo_print_flag(m, bo, VRAM_CLEARED); | 1559 | amdgpu_bo_print_flag(m, bo, VRAM_CLEARED); |
| 1562 | amdgpu_bo_print_flag(m, bo, SHADOW); | ||
| 1563 | amdgpu_bo_print_flag(m, bo, VRAM_CONTIGUOUS); | 1560 | amdgpu_bo_print_flag(m, bo, VRAM_CONTIGUOUS); |
| 1564 | amdgpu_bo_print_flag(m, bo, VM_ALWAYS_VALID); | 1561 | amdgpu_bo_print_flag(m, bo, VM_ALWAYS_VALID); |
| 1565 | amdgpu_bo_print_flag(m, bo, EXPLICIT_SYNC); | 1562 | amdgpu_bo_print_flag(m, bo, EXPLICIT_SYNC); |
| @@ -116,8 +116,6 @@ extern "C" { · 115 unmodified lines | |||
| 116 | #define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2) | 116 | #define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2) |
| 117 | /* Flag that the memory should be in VRAM and cleared */ | 117 | /* Flag that the memory should be in VRAM and cleared */ |
| 118 | #define AMDGPU_GEM_CREATE_VRAM_CLEARED (1 << 3) | 118 | #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) | ||
| 121 | /* Flag that allocating the BO should use linear VRAM */ | 119 | /* Flag that allocating the BO should use linear VRAM */ |
| 122 | #define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5) | 120 | #define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5) |
| 123 | /* Flag that BO is always valid in this VM */ | 121 | /* Flag that BO is always valid in this VM */ |