radeong: Add helper to determine pipe driver.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 2 Dec 2009 20:42:58 +0000 (12:42 -0800)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 2 Dec 2009 20:58:15 +0000 (12:58 -0800)
src/gallium/winsys/drm/radeon/core/radeon_drm.c

index 04882507a78047e5191839598dc5f35cdb34cc77..52419725337db6afb303ee94bb996f0a84074c2a 100644 (file)
@@ -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,