diff options
author | Marek Olšák <[email protected]> | 2017-06-29 17:09:04 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-07-04 15:40:37 +0200 |
commit | b09a22ad21a1a7b222aa67eb86aaf02bf8fd6d34 (patch) | |
tree | c122416718162cb2162859f354d58084605c5371 /src/gallium/winsys | |
parent | 03c5ef195df4972d864d84c0ffaf917505afc13d (diff) |
gallium/radeon: remove RADEON_FLAG_CPU_ACCESS
https://lists.freedesktop.org/archives/amd-gfx/2017-June/010591.html
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 9 | ||||
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 3 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 8 |
3 files changed, 3 insertions, 17 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index 5119d3f5525..9736f44a615 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c @@ -398,8 +398,6 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *ws, if (initial_domain & RADEON_DOMAIN_GTT) request.preferred_heap |= AMDGPU_GEM_DOMAIN_GTT; - if (flags & RADEON_FLAG_CPU_ACCESS) - request.flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; if (flags & RADEON_FLAG_NO_CPU_ACCESS) request.flags |= AMDGPU_GEM_CREATE_NO_CPU_ACCESS; if (flags & RADEON_FLAG_GTT_WC) @@ -506,8 +504,6 @@ struct pb_slab *amdgpu_bo_slab_alloc(void *priv, unsigned heap, if (heap & 1) flags |= RADEON_FLAG_GTT_WC; - if (heap & 2) - flags |= RADEON_FLAG_CPU_ACCESS; switch (heap >> 2) { case 0: @@ -1164,9 +1160,7 @@ amdgpu_bo_create(struct radeon_winsys *rws, if (flags & RADEON_FLAG_GTT_WC) heap |= 1; - if (flags & RADEON_FLAG_CPU_ACCESS) - heap |= 2; - if (flags & ~(RADEON_FLAG_GTT_WC | RADEON_FLAG_CPU_ACCESS)) + if (flags & ~RADEON_FLAG_GTT_WC) goto no_slab; switch (domain) { @@ -1204,7 +1198,6 @@ no_slab: if (flags & RADEON_FLAG_SPARSE) { assert(RADEON_SPARSE_PAGE_SIZE % alignment == 0); - assert(!(flags & RADEON_FLAG_CPU_ACCESS)); flags |= RADEON_FLAG_NO_CPU_ACCESS; diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index 1b3ca6546b8..a1fb0458e8b 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -581,8 +581,7 @@ static bool amdgpu_ib_new_buffer(struct amdgpu_winsys *ws, struct amdgpu_ib *ib) pb = ws->base.buffer_create(&ws->base, buffer_size, ws->info.gart_page_size, - RADEON_DOMAIN_GTT, - RADEON_FLAG_CPU_ACCESS); + RADEON_DOMAIN_GTT, 0); if (!pb) return false; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 0354e200ebf..283860d7a86 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -611,8 +611,6 @@ static struct radeon_bo *radeon_create_bo(struct radeon_drm_winsys *rws, if (flags & RADEON_FLAG_GTT_WC) args.flags |= RADEON_GEM_GTT_WC; - if (flags & RADEON_FLAG_CPU_ACCESS) - args.flags |= RADEON_GEM_CPU_ACCESS; if (flags & RADEON_FLAG_NO_CPU_ACCESS) args.flags |= RADEON_GEM_NO_CPU_ACCESS; @@ -740,8 +738,6 @@ struct pb_slab *radeon_bo_slab_alloc(void *priv, unsigned heap, if (heap & 1) flags |= RADEON_FLAG_GTT_WC; - if (heap & 2) - flags |= RADEON_FLAG_CPU_ACCESS; switch (heap >> 2) { case 0: @@ -952,9 +948,7 @@ radeon_winsys_bo_create(struct radeon_winsys *rws, if (flags & RADEON_FLAG_GTT_WC) heap |= 1; - if (flags & RADEON_FLAG_CPU_ACCESS) - heap |= 2; - if (flags & ~(RADEON_FLAG_GTT_WC | RADEON_FLAG_CPU_ACCESS)) + if (flags & ~RADEON_FLAG_GTT_WC) goto no_slab; switch (domain) { |