xf86-video-intel: src/sna/kgem.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Nov 14 01:31:09 PST 2011
src/sna/kgem.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit 0c405595fb8739b22569f81f400100b5dfa472cf
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Nov 14 09:27:49 2011 +0000
sna: Downgrade tiling in order to fit within fence constraints
Fixes a later assert that the fenced size is valid for kgem_create_2d()
Reported-by: Clemens Eisserer <linuxhippy at gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42888
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index ef712e2..2d6760f 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1332,6 +1332,8 @@ struct kgem_bo *kgem_create_linear(struct kgem *kgem, int size)
int kgem_choose_tiling(struct kgem *kgem, int tiling, int width, int height, int bpp)
{
+ uint32_t pitch;
+
if (DBG_NO_TILING)
return I915_TILING_NONE;
@@ -1401,6 +1403,16 @@ int kgem_choose_tiling(struct kgem *kgem, int tiling, int width, int height, int
}
}
+ /* And finally check that we can fence the whole object */
+ if (tiling &&
+ kgem_surface_size(kgem, false,
+ width, height, bpp, tiling,
+ &pitch) >= kgem->max_object_size) {
+ DBG(("%s: too large (%dx%d) to be fenced, discarding tiling\n",
+ __FUNCTION__, width, height));
+ tiling = I915_TILING_NONE;
+ }
+
DBG(("%s: %dx%d -> %d\n", __FUNCTION__, width, height, tiling));
return tiling;
}
More information about the xorg-commit
mailing list