summaryrefslogtreecommitdiffstats
path: root/src/glx/dri2_glx.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-03-17 14:42:12 -0400
committerIlia Mirkin <[email protected]>2014-03-19 18:17:40 -0400
commit51989817e6767d8ef469708c69d7ce38b87e9b6e (patch)
tree921fa2c336e3976b3336615f1981303921debc5b /src/glx/dri2_glx.c
parentc049dd4396d1639859810d6124faa863dae61d1b (diff)
loader: add special logic to distinguish nouveau from nouveau_vieux
There are a lot of different pci ids supported by nouveau, and more are added all the time. The relevant distinguisher between drivers is the chipset id. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: "10.1" <[email protected]>
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r--src/glx/dri2_glx.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index d4255599f31..79f6ecc9933 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1201,6 +1201,16 @@ dri2CreateScreen(int screen, struct glx_display * priv)
goto handle_error;
}
+ if (drmGetMagic(psc->fd, &magic)) {
+ ErrorMessageF("failed to get magic\n");
+ goto handle_error;
+ }
+
+ if (!DRI2Authenticate(priv->dpy, RootWindow(priv->dpy, screen), magic)) {
+ ErrorMessageF("failed to authenticate magic %d\n", magic);
+ goto handle_error;
+ }
+
/* If Mesa knows about the appropriate driver for this fd, then trust it.
* Otherwise, default to the server's value.
*/
@@ -1232,16 +1242,6 @@ dri2CreateScreen(int screen, struct glx_display * priv)
goto handle_error;
}
- if (drmGetMagic(psc->fd, &magic)) {
- ErrorMessageF("failed to get magic\n");
- goto handle_error;
- }
-
- if (!DRI2Authenticate(priv->dpy, RootWindow(priv->dpy, screen), magic)) {
- ErrorMessageF("failed to authenticate magic %d\n", magic);
- goto handle_error;
- }
-
if (psc->dri2->base.version >= 4) {
psc->driScreen =
psc->dri2->createNewScreen2(screen, psc->fd,