buf->magic = 0xDEAD1337;
buf->flinked = FALSE;
buf->flink = 0;
- buf->map_gtt = FALSE;
if (type == I915_NEW_TEXTURE) {
name = "gallium3d_texture";
} 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";
goto err;
drm_intel_bo_get_tiling(buf->bo, &tile, &swizzle);
- if (tile != I915_TILE_NONE)
- buf->map_gtt = TRUE;
*stride = whandle->stride;
if (tile != I915_TILE_NONE) {
assert(buf->map_count == 0);
- buf->map_gtt = TRUE;
}
return drm_intel_bo_set_tiling(buf->bo, &tile, stride);
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;
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