diff --git a/src/uapi/i915/mod.rs b/src/uapi/i915/mod.rs index 67c0ca4..61c4088 100644 --- a/src/uapi/i915/mod.rs +++ b/src/uapi/i915/mod.rs @@ -203,13 +203,13 @@ pub enum GemIoctlError { pub fn gem_has_tiling(fd: RawFd, handle: DrmGemHandle) -> Result { unsafe { - let mut tiling = native::drm_i915_gem_set_tiling { + let mut tiling = native::drm_i915_gem_get_tiling { handle: handle.handle, tiling_mode: 0, - stride: 0, swizzle_mode: 0, + phys_swizzle_mode: 0, }; - let res = libc::ioctl(fd, native::DRM_IOCTL_I915_GEM_SET_TILING, &mut tiling); + let res = libc::ioctl(fd, native::DRM_IOCTL_I915_GEM_GET_TILING, &mut tiling); match -res { 0 => Ok(true), libc::ENOENT => Err(GemIoctlError::InvalidHandle),