Hi, On Fri, Dec 31, 2010 at 12:28:30PM +0100, Mark Kettenis wrote: > > From: Adam Jackson <a...@redhat.com> > > > > dri.c: In function ‘DRIScreenInit’: > > dri.c:434: warning: cast from pointer to integer of different size > > Is just pacifying the compiler the right solution here? At least the > name of the variable that's being casted (frameBufferPhysicalAddress) > suggests that this may potentially be a true 64-bit address. Casting > to uintptr_t first makes the warning go away, but not the problem. > > The proper solution is to make drm_handle_t a type with the proper > width. On OpenBSD we have: > > typedef unsigned long drm_handle_t; /**< To mapped regions */ > > Since all OpenBSD architectures are either ILP32 or LP64, that works > just fine. Perhaps the same should be done on Linux? > > If the resulting ABI break is something that can't be handled (or > can't be handled right now), perhaps add a check that the address > realy fits into a drm_handle_t instead of silently truncating it?
Yep, that is the proper solution. Making it 64-bit makes sense at first, but then you realise you have no DRI for 32-bit clients, since they'd have a truncated handle. See this mail and the follow-on thread for more: http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg49393.html Cheers, Daniel
signature.asc
Description: Digital signature
_______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel