diff options
author | Corbin Simpson <[email protected]> | 2009-08-18 11:44:53 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-08-18 21:25:53 -0700 |
commit | c63bd15f81cecfb421ff798a3e2d0f82b90331db (patch) | |
tree | 3dd5d5e48516f63dfcecec166e965562dbde44f9 /src/gallium/winsys/drm/radeon | |
parent | 73fc09a7bf5c63b595251dc10997891c72ecb119 (diff) |
Revert "r300-gallium, radeon-gallium: Nuke gb_pipes from orbit."
This reverts commit 6a40d1e9d96f8e8c57bc3bbd6f567cacd4471f59.
Turns out that we *do* need these for OQ after all. Go figure.
Conflicts:
src/gallium/winsys/drm/radeon/core/radeon_r300.h
Diffstat (limited to 'src/gallium/winsys/drm/radeon')
-rw-r--r-- | src/gallium/winsys/drm/radeon/core/radeon_r300.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_r300.c b/src/gallium/winsys/drm/radeon/core/radeon_r300.c index 4e9a2ddd161..d6bb77dc7e8 100644 --- a/src/gallium/winsys/drm/radeon/core/radeon_r300.c +++ b/src/gallium/winsys/drm/radeon/core/radeon_r300.c @@ -139,7 +139,25 @@ static void do_ioctls(struct r300_winsys* winsys, int fd) info.value = ⌖ - /* First, get PCI ID */ + /* First, get the number of pixel pipes */ + info.request = RADEON_INFO_NUM_GB_PIPES; + retval = drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)); + if (retval) { + fprintf(stderr, "%s: New ioctl for GB pipe count failed " + "(error number %d), trying classic ioctl...\n", + __FUNCTION__, retval); + gp.param = RADEON_PARAM_NUM_GB_PIPES; + retval = drmCommandWriteRead(fd, DRM_RADEON_GETPARAM, &gp, + sizeof(gp)); + if (retval) { + fprintf(stderr, "%s: Failed to get GB pipe count, " + "error number %d\n", __FUNCTION__, retval); + exit(1); + } + } + winsys->gb_pipes = target; + + /* Then, get PCI ID */ info.request = RADEON_INFO_DEVICE_ID; retval = drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)); if (retval) { @@ -149,7 +167,7 @@ static void do_ioctls(struct r300_winsys* winsys, int fd) } winsys->pci_id = target; - /* Then, retrieve MM info */ + /* Finally, retrieve MM info */ retval = drmCommandWriteRead(fd, DRM_RADEON_GEM_INFO, &gem_info, sizeof(gem_info)); if (retval) { |