Some drivers use DRI2 protocol but implement their own kernel rendering mananger. For these drivers, libdrm becomes useless.
The only inconvenient right now to put libdrm optional to X server is concerning DRI2Authenticate. Such function uses drm_magic_t and drmAuthMagic symbols from libdrm. So I thought two alternatives. 1. wrap with some macros and set at compilation time: #ifndef WITH_DRM typedef unsigned int drm_magic_t; #endif Bool DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic) { #ifdef WITH_DRM DRI2ScreenPtr ds = DRI2GetScreen(pScreen); if (ds == NULL || drmAuthMagic(ds->fd, magic)) return FALSE; return TRUE; #else return FALSE; #endif } 2. hide all trickery inside xorg driver, adding a new field to DRI2InfoRec: Bool DRI2Authenticate(ScreenPtr pScreen, unsigned int magic) { DRI2ScreenPtr ds = DRI2GetScreen(pScreen); if (ds == NULL || (*ds->AuthMagic)(ds->fd, magic)) return FALSE; return TRUE; } In the first alternative the implementation is straightforward but should be adjusted at build time. It's ugly. Also, one would want to implement his own way of clients authentication, or not (sigh) - note though dri2proto states that this is not mandatory: "A kernel rendering manager can choose not to implement any authentication and just allow access to all buffers." Alternative 2. seems more complete but requires code changes all over the drivers. I'm more inclined for this alternative... Moreover, for both alternatives we need to do something with drm_magic_t type - can we just use unsigned int instead declare such new type? So what you guys think about this all? Thanks, Tiago ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel