summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/i915/drm/i915_drm_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/i915/drm/i915_drm_buffer.c')
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_buffer.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/gallium/winsys/i915/drm/i915_drm_buffer.c b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
index 6b06e7ae995..b9fd436ed29 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_buffer.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
@@ -21,7 +21,6 @@ i915_drm_buffer_create(struct i915_winsys *iws,
buf->magic = 0xDEAD1337;
buf->flinked = FALSE;
buf->flink = 0;
- buf->map_gtt = FALSE;
if (type == I915_NEW_TEXTURE) {
name = "gallium3d_texture";
@@ -29,11 +28,9 @@ i915_drm_buffer_create(struct i915_winsys *iws,
} else if (type == I915_NEW_VERTEX) {
name = "gallium3d_vertex";
pool = idws->pools.gem;
- buf->map_gtt = TRUE;
} else if (type == I915_NEW_SCANOUT) {
name = "gallium3d_scanout";
pool = idws->pools.gem;
- buf->map_gtt = TRUE;
} else {
assert(0);
name = "gallium3d_unknown";
@@ -74,8 +71,6 @@ i915_drm_buffer_from_handle(struct i915_winsys *iws,
goto err;
drm_intel_bo_get_tiling(buf->bo, &tile, &swizzle);
- if (tile != I915_TILE_NONE)
- buf->map_gtt = TRUE;
*stride = whandle->stride;
@@ -126,7 +121,6 @@ i915_drm_buffer_set_fence_reg(struct i915_winsys *iws,
if (tile != I915_TILE_NONE) {
assert(buf->map_count == 0);
- buf->map_gtt = TRUE;
}
return drm_intel_bo_set_tiling(buf->bo, &tile, stride);
@@ -146,10 +140,7 @@ i915_drm_buffer_map(struct i915_winsys *iws,
if (buf->map_count)
goto out;
- if (buf->map_gtt)
- ret = drm_intel_gem_bo_map_gtt(bo);
- else
- ret = drm_intel_bo_map(bo, write);
+ ret = drm_intel_gem_bo_map_gtt(bo);
buf->ptr = bo->virtual;
@@ -171,10 +162,7 @@ i915_drm_buffer_unmap(struct i915_winsys *iws,
if (--buf->map_count)
return;
- if (buf->map_gtt)
- drm_intel_gem_bo_unmap_gtt(intel_bo(buffer));
- else
- drm_intel_bo_unmap(intel_bo(buffer));
+ drm_intel_gem_bo_unmap_gtt(intel_bo(buffer));
}
static int