Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233649
b: refs/heads/master
c: c2e0eb1
h: refs/heads/master
i:
  233647: 31034df
v: v3
  • Loading branch information
Daniel Vetter authored and Chris Wilson committed Feb 24, 2011
1 parent 3341866 commit 6c0349b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 011b9910bdaf2e52c48c012490ab444fceea1959
refs/heads/master: c2e0eb167070a6e9dcb49c84c13c79a30d672431
16 changes: 15 additions & 1 deletion trunk/drivers/gpu/drm/i915/i915_gem_tiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
static bool
i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)
{
int tile_width;
int tile_width, tile_height;

/* Linear is always fine */
if (tiling_mode == I915_TILING_NONE)
Expand Down Expand Up @@ -215,6 +215,20 @@ i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)
}
}

if (IS_GEN2(dev) ||
(tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev)))
tile_height = 32;
else
tile_height = 8;
/* i8xx is strange: It has 2 interleaved rows of tiles, so needs an even
* number of tile rows. */
if (IS_GEN2(dev))
tile_height *= 2;

/* Size needs to be aligned to a full tile row */
if (size & (tile_height * stride - 1))
return false;

/* 965+ just needs multiples of tile width */
if (INTEL_INFO(dev)->gen >= 4) {
if (stride & (tile_width - 1))
Expand Down

0 comments on commit 6c0349b

Please sign in to comment.