From 7d74a45bd9d75a85338b954c8c46f3785eb7cb2b Mon Sep 17 00:00:00 2001 From: itycodes Date: Tue, 5 Nov 2024 04:36:34 +0100 Subject: [PATCH] Fix of tiling checking after figuring out upstream had a typo See-mesa: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31974 --- src/uapi/i915/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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),