[Mesa3d-dev] sizeof(RADEONDRIRec) does not match passed size from device driver

Bernardo Innocenti bernie at develer.com
Mon Aug 22 20:47:06 PDT 2005


Bernardo Innocenti wrote:

> Well, I've just found out that some directories such as
> lib/GL/glx and lib/XvMC/hw/i810 still fetch drm.h from
> $(DRMSRCDIR)/drm/shared instead of $(DRMSRCDIR)/drm/shared-core.
> 
> That's an old copy of drm.h with drm_handle_t still defined
> to unsigned long.  Is that right?

YES!!  OpenGL is back working again, accelerated.

These are all my tweaks with respect to CVS:


Index: extras/Mesa/src/mesa/drivers/dri/ffb/ffb_lock.h
===================================================================
RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/dri/ffb/ffb_lock.h,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 ffb_lock.h
--- extras/Mesa/src/mesa/drivers/dri/ffb/ffb_lock.h	16 Jun 2004 09:17:59 -0000	1.1.1.1
+++ extras/Mesa/src/mesa/drivers/dri/ffb/ffb_lock.h	23 Aug 2005 03:39:33 -0000
@@ -15,7 +15,7 @@ extern void ffbXMesaUpdateState(ffbConte
 #else
 #define LOCK_HARDWARE(fmesa)				\
   do {							\
-    int __ret=0;					\
+    DRM_CAS_RESULT(__ret);				\
     DRM_CAS(fmesa->driHwLock, fmesa->hHWContext,	\
 	    (DRM_LOCK_HELD | fmesa->hHWContext), __ret);\
     if (__ret) {					\
Index: extras/drm/libdrm/xf86drm.h
===================================================================
RCS file: /cvs/xorg/xc/extras/drm/libdrm/xf86drm.h,v
retrieving revision 1.1.1.2
diff -u -p -u -p -r1.1.1.2 xf86drm.h
--- extras/drm/libdrm/xf86drm.h	15 Jun 2005 18:31:52 -0000	1.1.1.2
+++ extras/drm/libdrm/xf86drm.h	23 Aug 2005 03:39:51 -0000
@@ -287,7 +287,7 @@ typedef struct _drmSetVersion {
 #define DRM_LOCK_CONT  0x40000000U /**< Hardware lock is contended */
 
 #if defined(__GNUC__) && (__GNUC__ >= 2)
-# if defined(__i386) || defined(__AMD64__)
+# if defined(__i386) || defined(__amd64__)
 				/* Reflect changes here to drmP.h */
 #define DRM_CAS(lock,old,new,__ret)                                    \
 	do {                                                           \
Index: lib/GL/dri/drm/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/lib/GL/dri/drm/Imakefile,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 Imakefile
--- lib/GL/dri/drm/Imakefile	27 Aug 2004 03:22:12 -0000	1.4
+++ lib/GL/dri/drm/Imakefile	23 Aug 2005 03:40:19 -0000
@@ -16,20 +16,20 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
 		-I$(XF86OSSRC)/$(OS_SUBDIR)/drm \
 		-I$(DRMSRCDIR)/$(OS_SUBDIR) \
 		-I$(DRMSRCDIR)/$(OS_SUBDIR2) \
-		-I$(XF86OSSRC) -I$(DRMSRCDIR)/shared
+		-I$(XF86OSSRC) -I$(DRMSRCDIR)/shared-core
          SRCS = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c
          OBJS = xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o
 
 #if defined(LinuxArchitecture)
 OS_SUBDIR = linux
 OS_SUBDIR2 = linux
-OS_SUBDIR3 = shared
+OS_SUBDIR3 = shared-core
 #endif
 #if defined(FreeBSDArchitecture) || defined(BSDOSArchitecture) || \
     defined(NetBSDArchitecture) || defined(OpenBSDArchitecture)
 OS_SUBDIR = bsd
 OS_SUBDIR2 = linux
-OS_SUBDIR3 = shared
+OS_SUBDIR3 = shared-core
 #endif
 
 LinkSourceFile(xf86drm.c,$(XF86OSSRC)/$(OS_SUBDIR2)/drm)
Index: lib/GL/glx/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/lib/GL/glx/Imakefile,v
retrieving revision 1.11
diff -u -p -u -p -r1.11 Imakefile
--- lib/GL/glx/Imakefile	1 Aug 2005 18:49:51 -0000	1.11
+++ lib/GL/glx/Imakefile	23 Aug 2005 03:40:20 -0000
@@ -212,7 +212,7 @@ ALIAS_DEFINES = -DGLX_ALIAS_UNSUPPORTED
 		-I$(MESASRCDIR)/src/mesa/drivers/x11 \
 		-I$(MESASRCDIR)/src/mesa/$(ASM_DIR) \
 		-I$(XF86OSSRC) \
-		-I$(DRMSRCDIR)/shared \
+		-I$(DRMSRCDIR)/shared-core \
 		$(DRI_INCS)
 
 #include <Library.tmpl>
Index: lib/XvMC/hw/i810/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/lib/XvMC/hw/i810/Imakefile,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 Imakefile
--- lib/XvMC/hw/i810/Imakefile	16 Jun 2004 19:16:54 -0000	1.3
+++ lib/XvMC/hw/i810/Imakefile	23 Aug 2005 03:40:31 -0000
@@ -19,7 +19,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
 
       DEFINES = $(ALLOC_DEFINES) -DTRUE=1 -DFALSE=0
      INCLUDES = -I$(XINCLUDESRC) -I$(INCLUDESRC) -I$(XLIBSRC) -I$(EXTINCSRC) \
-		-I$(XF86COMSRC) -I$(XF86OSSRC) -I$(DRMSRCDIR)/shared \
+		-I$(XF86COMSRC) -I$(XF86OSSRC) -I$(DRMSRCDIR)/shared-core \
 		-I$(XF86DRIVERSRC)/i810
          SRCS = I810XvMC.c
          OBJS = I810XvMC.o xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o
Index: lib/XvMC/hw/via/unichrome/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/lib/XvMC/hw/via/unichrome/Imakefile,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 Imakefile
--- lib/XvMC/hw/via/unichrome/Imakefile	28 Jun 2005 22:49:21 -0000	1.1
+++ lib/XvMC/hw/via/unichrome/Imakefile	23 Aug 2005 03:40:34 -0000
@@ -18,7 +18,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
 
       DEFINES = $(ALLOC_DEFINES) -DTRUE=1 -DFALSE=0
      INCLUDES = -I$(XINCLUDESRC) -I$(INCLUDESRC) -I$(XLIBSRC) -I$(EXTINCSRC) \
-		-I$(XF86COMSRC) -I$(XF86OSSRC) -I$(DRMSRCDIR)/shared \
+		-I$(XF86COMSRC) -I$(XF86OSSRC) -I$(DRMSRCDIR)/shared-core \
 		-I$(XF86OSSRC)/linux/drm/kernel -I$(XF86DRIVERSRC)/via
          SRCS = viaLowLevel.c 
          OBJS = viaXvMC.o viaLowLevel.o xf86drm.o xf86drmHash.o \
Index: lib/XvMC/hw/via/unichromeProA/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/lib/XvMC/hw/via/unichromeProA/Imakefile,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 Imakefile
--- lib/XvMC/hw/via/unichromeProA/Imakefile	28 Jun 2005 23:08:46 -0000	1.1
+++ lib/XvMC/hw/via/unichromeProA/Imakefile	23 Aug 2005 03:40:34 -0000
@@ -18,7 +18,7 @@ ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
 
       DEFINES = $(ALLOC_DEFINES) -DTRUE=1 -DFALSE=0
      INCLUDES = -I$(XINCLUDESRC) -I$(INCLUDESRC) -I$(XLIBSRC) -I$(EXTINCSRC) \
-		-I$(XF86COMSRC) -I$(XF86OSSRC) -I$(DRMSRCDIR)/shared \
+		-I$(XF86COMSRC) -I$(XF86OSSRC) -I$(DRMSRCDIR)/shared-core \
 		-I$(XF86OSSRC)/linux/drm/kernel -I$(XF86DRIVERSRC)/via
          SRCS = viaLowLevelPro.c 
          OBJS = viaXvMC.o viaLowLevelPro.o xf86drm.o xf86drmHash.o \
Index: programs/Xserver/GL/dri/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/GL/dri/Imakefile,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 Imakefile
--- programs/Xserver/GL/dri/Imakefile	19 Aug 2005 08:19:48 -0000	1.4
+++ programs/Xserver/GL/dri/Imakefile	23 Aug 2005 03:40:35 -0000
@@ -15,7 +15,7 @@ MOBJ = drimodule.o
 		-I$(EXTINCSRC) -I$(MESASRCDIR)/include \
 		-I$(XF86OSSRC) -I$(XF86COMSRC) \
 		-I../include -I../glx -I$(LIBSRC)/GL/include \
-		-I$(DRMSRCDIR)/shared \
+		-I$(DRMSRCDIR)/shared-core \
 		-I$(SERVERSRC)/mi -I$(FONTINCSRC)
       DEFINES = $(GLX_DEFINES)
 
Index: programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 ffb_dac.h
--- programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h	23 Apr 2004 19:48:16 -0000	1.2
+++ programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h	23 Aug 2005 03:40:58 -0000
@@ -26,6 +26,9 @@
 #ifndef _FFB_DAC_H
 #define _FFB_DAC_H
 
+/* bernie */
+#include <X11/Xdefs.h>
+
 /* FFB utilizes two different ramdac chips:
  *
  *	1) BT9068 "Pacifica1", used in all FFB1 and
Index: programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 xf86_ansic.h
--- programs/Xserver/hw/xfree86/os-support/xf86_ansic.h	3 Jul 2005 08:53:46 -0000	1.4
+++ programs/Xserver/hw/xfree86/os-support/xf86_ansic.h	23 Aug 2005 03:41:07 -0000
@@ -30,6 +30,9 @@
 #ifndef _XF86_ANSIC_H
 #define _XF86_ANSIC_H
 
+/* bernie */
+#include <Xdefs.h>
+
 /* Handle <stdarg.h> */
 
 #ifndef IN_MODULE
Index: programs/Xserver/hw/xfree86/os-support/xf86_libc.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 xf86_libc.h
--- programs/Xserver/hw/xfree86/os-support/xf86_libc.h	3 Jul 2005 07:01:29 -0000	1.8
+++ programs/Xserver/hw/xfree86/os-support/xf86_libc.h	23 Aug 2005 03:41:07 -0000
@@ -228,8 +228,10 @@ typedef int xf86jmp_buf[1024];
 
 #if defined(XFree86LOADER) && !defined(DONT_DEFINE_WRAPPERS)
 
+/*bernie: conflict with stdlib.h
 #undef abort
 #define abort()			xf86abort()
+*/
 #undef abs
 #define abs(i)			xf86abs(i)
 #undef acos
@@ -558,8 +560,10 @@ typedef int xf86jmp_buf[1024];
 #undef stat_t
 #define stat_t			struct xf86stat
 
+/*bernie
 #undef ulong
 #define ulong			unsigned long
+*/
 
 /*
  * There should be no need to #undef any of these.  If they are already
Index: programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 Imakefile
--- programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile	15 Jun 2005 20:03:58 -0000	1.5
+++ programs/Xserver/hw/xfree86/os-support/linux/drm/Imakefile	23 Aug 2005 03:41:10 -0000
@@ -27,7 +27,7 @@ MTRR_DEFINES = -DHAS_MTRR_SUPPORT
 
 INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) -I. -I$(SERVERSRC)/include \
            -I$(XINCLUDESRC) -I$(EXTINCSRC) -I../.. -I$(DRMSRCDIR)/linux \
-	   -I$(DRMSRCDIR)/shared
+	   -I$(DRMSRCDIR)/shared-core
 
 DEFINES = $(MTRR_DEFINES) $(GLX_DEFINES)
 



-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/




More information about the xorg mailing list