From cebb756f3dc2ba104080000edf1cf24b971e475c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 7 Oct 2017 11:36:09 +0100 Subject: [PATCH] sna: Check if the kernel reports a tiling-stride less than our request Looks like a bug has snuck in somewhere in our set-tiling path. Since it exists, try to workaround it whilst it is root caused. Reported-by: Adric Blake References: https://bugs.freedesktop.org/show_bug.cgi?id=103025#c9 Signed-off-by: Chris Wilson --- src/sna/kgem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 122dda71..29e09e33 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -488,7 +488,7 @@ restart: bo->tiling, tiling, bo->pitch, stride, set_tiling.tiling_mode == tiling)); - return set_tiling.tiling_mode == tiling; + return set_tiling.tiling_mode == tiling && bo->pitch >= stride; } err = errno;