Mesa (master): radeong: Add helper to determine pipe driver.

Corbin Simpson csimpson at kemper.freedesktop.org
Wed Dec 2 21:11:14 UTC 2009


Module: Mesa
Branch: master
Commit: f79028bbd4398b1c0f5c34014d8283bd6352aca6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f79028bbd4398b1c0f5c34014d8283bd6352aca6

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Wed Dec  2 12:42:58 2009 -0800

radeong: Add helper to determine pipe driver.

---

 src/gallium/winsys/drm/radeon/core/radeon_drm.c |    8 ++++++++
 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 0488250..5241972 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,




More information about the mesa-commit mailing list