aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drmP.h
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-08-28 09:49:09 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-08-28 09:49:09 +0200
commite181f594a4a75790ce1d2a8e907f9fcc5e88b419 (patch)
tree02465a6eb22dfe2271c0b345275275ebe9dff305 /linux-core/drmP.h
parent4ddabd15620e6e4638a6a37a3a2b5bced626fcf9 (diff)
Add a 64-bit drm unsigned type for 64-bit clean IOCTLS.
Conversion functions in drmP.h and xf86drm.c.
Diffstat (limited to 'linux-core/drmP.h')
-rw-r--r--linux-core/drmP.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 2997293b..81f08dfc 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -1359,26 +1359,29 @@ extern int drm_fence_ioctl(DRM_IOCTL_ARGS);
extern int drm_bo_ioctl(DRM_IOCTL_ARGS);
/*
- * Convenience 2*32-bit to 64-bit function
+ * Convenience drm_u64_t functions
*/
-static __inline__ unsigned long combine_64(uint32_t lo, uint32_t hi)
+static __inline__ unsigned long drm_ul(drm_u64_t val)
{
- unsigned long ret = lo;
+ unsigned long ret = val.lo;
#if (BITS_PER_LONG == 64)
- ret |= (hi << 32);
+ ret |= (val.hi << 32);
#endif
return ret;
}
-static __inline__ void split_32(unsigned long val, uint32_t *lo, uint32_t *hi)
+static __inline__ drm_u64_t drm_u64(unsigned long val)
{
- *lo = val & 0xFFFFFFFFUL;
+ drm_u64_t ret;
+
+ ret.lo = val & 0xFFFFFFFFUL;
#if (BITS_PER_LONG == 64)
- *hi = val >> 32;
+ ret.hi = val >> 32;
#else
- *hi = 0;
+ ret.hi = 0;
#endif
+ return ret;
}