From ce4836b091bc10489ab876b2922ca3f004bc5bf4 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 31 May 2015 08:58:02 +0100 Subject: [PATCH] sna: Detect when SET_TILING fails to change tiling If the swizzling is unknown, the SET_TILING ioctl silently converts the request back to I915_TILING_NONE. In order to detect this, we need to double check the ioctl parameters. References: https://bugs.freedesktop.org/show_bug.cgi?id=90725#c21 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 463f65fc..a28f9596 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -454,7 +454,7 @@ restart: set_tiling.stride = stride; if (ioctl(fd, DRM_IOCTL_I915_GEM_SET_TILING, &set_tiling) == 0) - return true; + return set_tiling.tiling_mode == tiling; err = errno; if (err == EINTR)