From: Corbin Simpson Date: Wed, 2 Dec 2009 20:42:58 +0000 (-0800) Subject: radeong: Add helper to determine pipe driver. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f79028bbd4398b1c0f5c34014d8283bd6352aca6;p=mesa.git radeong: Add helper to determine pipe driver. --- 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,