libdrm_nouveau: The handle that is passed to mmap needs to be drm_handle_t
authorRobert Noland <rnoland@2hip.net>
Sun, 15 Mar 2009 18:52:58 +0000 (13:52 -0500)
committerRobert Noland <rnoland@2hip.net>
Mon, 16 Mar 2009 06:20:08 +0000 (01:20 -0500)
drm_handle_t is defined to be a u32 on linux and a u64 on everything
else.  This addresses an issue on FreeBSD amd64 where the map offsets
may be greater than 32bits.  When the handle is cast to 32bit, mmap
cannot match the requested map and causes X to crash.

This should be a NOOP on linux since drm_handle_t is always 32bit.

Signed-off-by: Robert Noland <rnoland@2hip.net>
libdrm/nouveau/nouveau_private.h

index 9dc1b44..32a9052 100644 (file)
@@ -173,7 +173,7 @@ struct nouveau_bo_priv {
 
        /* Kernel object */
        uint32_t global_handle;
-       unsigned handle;
+       drm_handle_t handle;
        void *map;
 
        /* Last known information from kernel on buffer status */