summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-06-22 13:00:22 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-06-22 13:00:22 +0100
commitaba3502190a5bd2203e71ae2b1b7dd5aeb223905 (patch)
treebab1eaa7c8849688cbcfd02dbde73c0871a9ce80
parentc7bbaca6a376f40d914d1ed33e119f2330701c9a (diff)
intel: Restore SET_TILING for non-flinked bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--intel/intel_bufmgr_gem.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 3931ec86..79a61244 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1701,7 +1701,8 @@ drm_intel_gem_bo_set_tiling_internal(drm_intel_bo *bo,
struct drm_i915_gem_set_tiling set_tiling;
int ret;
- if (tiling_mode == bo_gem->tiling_mode &&
+ if (bo_gem->global_name == 0 &&
+ tiling_mode == bo_gem->tiling_mode &&
stride == bo_gem->stride)
return 0;
@@ -1720,7 +1721,7 @@ drm_intel_gem_bo_set_tiling_internal(drm_intel_bo *bo,
bo_gem->tiling_mode = set_tiling.tiling_mode;
bo_gem->swizzle_mode = set_tiling.swizzle_mode;
- bo_gem->stride = stride;
+ bo_gem->stride = set_tiling.stride;
return 0;
}
@@ -1732,9 +1733,6 @@ drm_intel_gem_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
int ret;
- if (bo_gem->global_name == 0)
- return 0;
-
/* Linear buffers have no stride. By ensuring that we only ever use
* stride 0 with linear buffers, we simplify our code.
*/