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*)⌖
- /* 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*
--- /dev/null
+
+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:
+++ /dev/null
-
-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: