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;
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;
}
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.
*/