diff options
-rw-r--r-- | src/gallium/winsys/i915/drm/i915_drm_buffer.c | 16 | ||||
-rw-r--r-- | src/gallium/winsys/i915/drm/i915_drm_winsys.h | 1 |
2 files changed, 2 insertions, 15 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 diff --git a/src/gallium/winsys/i915/drm/i915_drm_winsys.h b/src/gallium/winsys/i915/drm/i915_drm_winsys.h index 88a71f2424d..496c88de5a9 100644 --- a/src/gallium/winsys/i915/drm/i915_drm_winsys.h +++ b/src/gallium/winsys/i915/drm/i915_drm_winsys.h @@ -54,7 +54,6 @@ struct i915_drm_buffer { void *ptr; unsigned map_count; - boolean map_gtt; boolean flinked; unsigned flink; |