summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-12-02 12:42:58 -0800
committerCorbin Simpson <[email protected]>2009-12-02 12:58:15 -0800
commitf79028bbd4398b1c0f5c34014d8283bd6352aca6 (patch)
treea30eee8c83c0278d43db4d2c72223637ad1a3aca
parent4395d35c8a9f56d5e5614db583e700668933bfd3 (diff)
radeong: Add helper to determine pipe driver.
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_drm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_drm.c b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
index 04882507a78..52419725337 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_drm.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_drm.c
@@ -94,6 +94,14 @@ static void do_ioctls(int fd, struct radeon_winsys* winsys)
winsys->vram_size = gem_info.vram_visible;
}
+/* Guess at whether this chipset should use r300g.
+ *
+ * I believe that this check is valid, but I haven't been exhaustive. */
+static boolean is_r3xx(int pciid)
+{
+ return (pciid > 0x3150) && (pciid < 0x796f);
+}
+
/* Create a pipe_screen. */
struct pipe_screen* radeon_create_screen(struct drm_api* api,
int drmFB,