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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-05-31 08:58:02 +01:00
parent 401b9deef0
commit ce4836b091
1 changed files with 1 additions and 1 deletions

View File

@ -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)