DRI2: Add DRI2AuthConnection().

DRI2 uses the same authentication scheme as XF86DRI, so implement this
entry point so DRI2 protocol code can access it.
This commit is contained in:
Kristian Høgsberg 2008-03-11 00:35:31 -04:00
parent b2657ec598
commit bc504ffbba
2 changed files with 13 additions and 0 deletions

View File

@ -342,6 +342,17 @@ DRI2Connect(ScreenPtr pScreen, int *fd, const char **driverName,
return TRUE;
}
Bool
DRI2AuthConnection(ScreenPtr pScreen, drm_magic_t magic)
{
DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
if (ds == NULL || drmAuthMagic(ds->fd, magic))
return FALSE;
return TRUE;
}
unsigned int
DRI2GetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags)
{

View File

@ -58,6 +58,8 @@ Bool DRI2Connect(ScreenPtr pScreen,
const char **driverName,
unsigned int *sareaHandle);
Bool DRI2AuthConnection(ScreenPtr pScreen, drm_magic_t magic);
unsigned int DRI2GetPixmapHandle(PixmapPtr pPixmap,
unsigned int *flags);