radeon-r300: Fix a bit of breakage.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 28 Apr 2009 10:28:57 +0000 (03:28 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 28 Apr 2009 10:28:57 +0000 (03:28 -0700)
Not really sure why reordering the ioctls makes them work again.

src/gallium/winsys/drm/radeon/core/radeon_r300.c
src/gallium/winsys/drm/radeon/dri/Makefile [new file with mode: 0644]
src/gallium/winsys/drm/radeon/dri/SConscript [new file with mode: 0644]
src/gallium/winsys/drm/radeon/dri2/Makefile [deleted file]
src/gallium/winsys/drm/radeon/dri2/SConscript [deleted file]

index 293b6c2d389cf49f1646d2293b3d231112e54b44..3302d623bf9c4abb6f95935b002fffc1bb74821e 100644 (file)
@@ -53,32 +53,31 @@ static void radeon_r300_flush_cs(struct radeon_cs* cs)
 static void do_ioctls(struct r300_winsys* winsys, int fd)
 {
     drm_radeon_getparam_t gp;
-    uint32_t target;
+    int target;
     int retval;
 
     /* XXX is this cast safe? */
     gp.value = (int*)&target;
 
-    /* First, get PCI ID */
-    gp.param = RADEON_PARAM_DEVICE_ID;
+    /* First, get the number of pixel pipes */
+    gp.param = RADEON_PARAM_NUM_GB_PIPES;
     retval = drmCommandWriteRead(fd, DRM_RADEON_GETPARAM, &gp, sizeof(gp));
     if (retval) {
-        fprintf(stderr, "%s: Failed to get PCI ID, error number %d",
+        fprintf(stderr, "%s: Failed to get GB pipe count, error number %d\n",
                 __FUNCTION__, retval);
         exit(1);
     }
-    winsys->pci_id = target;
+    winsys->gb_pipes = target;
 
-    /* Then, get the number of pixel pipes */
-    gp.param = RADEON_PARAM_NUM_GB_PIPES;
+    /* Then, get PCI ID */
+    gp.param = RADEON_PARAM_DEVICE_ID;
     retval = drmCommandWriteRead(fd, DRM_RADEON_GETPARAM, &gp, sizeof(gp));
     if (retval) {
-        fprintf(stderr, "%s: Failed to get GB pipe count, error number %d",
+        fprintf(stderr, "%s: Failed to get PCI ID, error number %d\n",
                 __FUNCTION__, retval);
         exit(1);
     }
-    winsys->gb_pipes = target;
-
+    winsys->pci_id = target;
 }
 
 struct r300_winsys*
diff --git a/src/gallium/winsys/drm/radeon/dri/Makefile b/src/gallium/winsys/drm/radeon/dri/Makefile
new file mode 100644 (file)
index 0000000..c218ee9
--- /dev/null
@@ -0,0 +1,25 @@
+
+TOP = ../../../../../..
+include $(TOP)/configs/current
+
+LIBNAME = radeon_dri.so
+
+MINIGLX_SOURCES =
+
+PIPE_DRIVERS = \
+       $(TOP)/src/gallium/state_trackers/dri/libdridrm.a \
+       $(TOP)/src/gallium/winsys/drm/radeon/core/libradeonwinsys.a \
+       $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
+       $(TOP)/src/gallium/drivers/r300/libr300.a
+
+C_SOURCES = \
+       $(COMMON_GALLIUM_SOURCES) \
+       $(DRIVER_SOURCES)
+
+ASM_SOURCES = 
+
+include ../../Makefile.template
+
+DRI_LIB_DEPS += -ldrm_radeon
+
+symlinks:
diff --git a/src/gallium/winsys/drm/radeon/dri/SConscript b/src/gallium/winsys/drm/radeon/dri/SConscript
new file mode 100644 (file)
index 0000000..f2cdee9
--- /dev/null
@@ -0,0 +1,14 @@
+Import('*')
+
+env = drienv.Clone()
+
+drivers = [
+    softpipe,
+    r300
+]
+
+env.SharedLibrary(
+    target ='radeon_dri.so',
+    source = COMMON_GALLIUM_SOURCES,
+    LIBS = drivers + mesa + auxiliaries + env['LIBS'],
+)
diff --git a/src/gallium/winsys/drm/radeon/dri2/Makefile b/src/gallium/winsys/drm/radeon/dri2/Makefile
deleted file mode 100644 (file)
index c218ee9..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-
-TOP = ../../../../../..
-include $(TOP)/configs/current
-
-LIBNAME = radeon_dri.so
-
-MINIGLX_SOURCES =
-
-PIPE_DRIVERS = \
-       $(TOP)/src/gallium/state_trackers/dri/libdridrm.a \
-       $(TOP)/src/gallium/winsys/drm/radeon/core/libradeonwinsys.a \
-       $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
-       $(TOP)/src/gallium/drivers/r300/libr300.a
-
-C_SOURCES = \
-       $(COMMON_GALLIUM_SOURCES) \
-       $(DRIVER_SOURCES)
-
-ASM_SOURCES = 
-
-include ../../Makefile.template
-
-DRI_LIB_DEPS += -ldrm_radeon
-
-symlinks:
diff --git a/src/gallium/winsys/drm/radeon/dri2/SConscript b/src/gallium/winsys/drm/radeon/dri2/SConscript
deleted file mode 100644 (file)
index f2cdee9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Import('*')
-
-env = drienv.Clone()
-
-drivers = [
-    softpipe,
-    r300
-]
-
-env.SharedLibrary(
-    target ='radeon_dri.so',
-    source = COMMON_GALLIUM_SOURCES,
-    LIBS = drivers + mesa + auxiliaries + env['LIBS'],
-)