summaryrefslogtreecommitdiff
path: root/src/sna/kgem.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-10-07 11:36:09 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-10-07 11:37:25 +0100
commitcebb756f3dc2ba104080000edf1cf24b971e475c (patch)
treebd9f8ccbe6fd1d9acbc4bb769daac400be42a247 /src/sna/kgem.c
parenta33a96a3533bef4dd6276d980632cfa5a2069813 (diff)
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 <promarbler14@gmail.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=103025#c9 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.c')
-rw-r--r--src/sna/kgem.c2
1 files changed, 1 insertions, 1 deletions
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;