From 340b563375e001e87a504973581ab48d399ff64b Mon Sep 17 00:00:00 2001
From: Robert Noland <[email protected]>
Date: Sun, 15 Mar 2009 13:52:58 -0500
Subject: [PATCH] libdrm_nouveau: The handle that is passed to mmap needs to be 
drm_handle_t

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 <[email protected]>
---
 libdrm/nouveau/nouveau_private.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libdrm/nouveau/nouveau_private.h b/libdrm/nouveau/nouveau_private.h
index 9dc1b44..32a9052 100644
--- a/libdrm/nouveau/nouveau_private.h
+++ b/libdrm/nouveau/nouveau_private.h
@@ -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 */
-- 
1.6.1.3


-- 
Robert Noland <[email protected]>
2 Hip Networks

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to