|
|
|
@ -203,13 +203,13 @@ pub enum GemIoctlError {
|
|
|
|
|
|
|
|
|
|
pub fn gem_has_tiling(fd: RawFd, handle: DrmGemHandle) -> Result<bool, GemIoctlError> {
|
|
|
|
|
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),
|
|
|
|
|