diff options
author | Eric Anholt <eric@anholt.net> | 2009-01-27 15:43:58 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-02-24 12:21:01 -0800 |
commit | 7949b712bd996c71dd8c1c2627fe8b3e011a9a9f (patch) | |
tree | 09afaf5e85fe57d46f75f426f5d6a7d98b3d4033 | |
parent | ae9bbf4c3b9147ea6bce17df6f2482e27d03e407 (diff) |
dri2: Use modesetting's master fd instead of opening our own non-master.
This fixes failure to auth DRI2 clients under KMS.
(cherry picked from commit 66bc44e8f9a0505c0b11b8042243ca74079da85f)
-rw-r--r-- | src/i830_dri.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c index 90a00a34..0b156569 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -1991,7 +1991,17 @@ Bool I830DRI2ScreenInit(ScreenPtr pScreen) pI830->PciInfo->dev, pI830->PciInfo->func); - info.fd = drmOpen("i915", buf); + info.fd = -1; + +#ifdef XF86DRM_MODE + /* Use the already opened (master) fd from modesetting */ + if (pI830->use_drm_mode) + info.fd = pI830->drmSubFD; +#endif + + if (info.fd < 0) + info.fd = drmOpen("i915", buf); + if (info.fd < 0) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Failed to open DRM device\n"); return FALSE; |