45e9809aff7304721fddb95654901b32195c9c7avboxsync/**************************************************************************
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCopyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncAll Rights Reserved.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncPermission is hereby granted, free of charge, to any person obtaining a
45e9809aff7304721fddb95654901b32195c9c7avboxsynccopy of this software and associated documentation files (the
45e9809aff7304721fddb95654901b32195c9c7avboxsync"Software"), to deal in the Software without restriction, including
45e9809aff7304721fddb95654901b32195c9c7avboxsyncwithout limitation the rights to use, copy, modify, merge, publish,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdistribute, sub license, and/or sell copies of the Software, and to
45e9809aff7304721fddb95654901b32195c9c7avboxsyncpermit persons to whom the Software is furnished to do so, subject to
45e9809aff7304721fddb95654901b32195c9c7avboxsyncthe following conditions:
45e9809aff7304721fddb95654901b32195c9c7avboxsyncThe above copyright notice and this permission notice (including the
45e9809aff7304721fddb95654901b32195c9c7avboxsyncnext paragraph) shall be included in all copies or substantial portions
45e9809aff7304721fddb95654901b32195c9c7avboxsyncof the Software.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
45e9809aff7304721fddb95654901b32195c9c7avboxsyncOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
45e9809aff7304721fddb95654901b32195c9c7avboxsyncMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncIN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
45e9809aff7304721fddb95654901b32195c9c7avboxsyncANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
45e9809aff7304721fddb95654901b32195c9c7avboxsyncSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync**************************************************************************/
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Jens Owen <jens@tungstengraphics.com>
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Prototypes for DRI functions */
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _DRIContextPrivRec DRIContextPrivRec, *DRIContextPrivPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRI_CONTEXT_RESERVED = 0x04 /* DRI Only -- no kernel equivalent */
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*ClipNotifyPtr)( WindowPtr, int, int );
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*AdjustFramePtr)(int scrnIndex, int x, int y, int flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsync * These functions can be wrapped by the DRI. Each of these have
45e9809aff7304721fddb95654901b32195c9c7avboxsync * generic default funcs (initialized in DRICreateInfoRec) and can be
45e9809aff7304721fddb95654901b32195c9c7avboxsync * overridden by the driver in its [driver]DRIScreenInit function.
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Prior to Xorg 6.8.99.8, the DRIInfoRec structure was implicitly versioned
45e9809aff7304721fddb95654901b32195c9c7avboxsync * by the XF86DRI_*_VERSION defines in xf86dristr.h. These numbers were also
45e9809aff7304721fddb95654901b32195c9c7avboxsync * being used to version the XFree86-DRI protocol. Bugs #3066 and #3163
45e9809aff7304721fddb95654901b32195c9c7avboxsync * showed that this was inadequate. The DRIInfoRec structure is now versioned
45e9809aff7304721fddb95654901b32195c9c7avboxsync * by the DRIINFO_*_VERSION defines in this file. - ajax, 2005-05-18.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Revision history:
45e9809aff7304721fddb95654901b32195c9c7avboxsync * 4.1.0 and earlier: DRIQueryVersion returns XF86DRI_*_VERSION.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * 4.2.0: DRIQueryVersion begins returning DRIINFO_*_VERSION.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * 5.0.0: frameBufferPhysicalAddress changed from CARD32 to pointer.
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef unsigned long long (*DRITexOffsetStartProcPtr)(PixmapPtr pPix);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*DRITexOffsetFinishProcPtr)(PixmapPtr pPix);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* driver call back functions
45e9809aff7304721fddb95654901b32195c9c7avboxsync * New fields should be added at the end for backwards compatibility.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Bump the DRIINFO patch number to indicate bugfixes.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Bump the DRIINFO minor number to indicate new fields.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Bump the DRIINFO major number to indicate binary-incompatible changes.
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*SetDrawableIndex)(WindowPtr pWin, CARD32 indx);
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* wrapped functions */
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* device info */
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* New with DRI version 4.1.0 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*TransitionSingleToMulti3D)(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*TransitionMultiToSingle3D)(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* New with DRI version 5.1.0 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*ClipNotify)(ScreenPtr pScreen, WindowPtr *ppWin, int num);
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* New with DRI version 5.2.0 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* New with DRI version 5.3.0 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* New with DRI version 5.4.0 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_handle_t hFrameBuffer; /* Handle to framebuffer, either
45e9809aff7304721fddb95654901b32195c9c7avboxsync * mapped by DDX driver or DRI */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn, unsigned long sAreaSize,
45e9809aff7304721fddb95654901b32195c9c7avboxsync const char *busID,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIScreenInit(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRICloseScreen(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIOpenConnection(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRICloseConnection(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIGetClientDriverName(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRICreateContext(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIDestroyContext(ScreenPtr pScreen, XID context);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIContextPrivDelete(pointer pResource, XID id);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRICreateDrawable(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIDestroyDrawable(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIDrawablePrivDelete(pointer pResource,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIGetDrawableInfo(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned int* indx,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned int* stamp,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIGetDeviceInfo(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIDestroyInfoRec(DRIInfoPtr DRIInfo);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIFinishScreenInit(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIWakeupHandler(pointer wakeupData,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIBlockHandler(pointer blockData,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIDoWakeupHandler(int screenNum,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned long result,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIDoBlockHandler(int screenNum,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIWindowExposures(WindowPtr pWin,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT int DRIValidateTree(WindowPtr pParent,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIPostValidateTree(WindowPtr pParent,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT CARD32 DRIGetDrawableIndex(WindowPtr pWin);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRILock(ScreenPtr pScreen, int flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void *DRIGetSAREAPrivate(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT unsigned int DRIGetDrawableStamp(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT drm_context_t DRIGetContext(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIQueryVersion(int *majorVersion,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIAdjustFrame(int scrnIndex, int x, int y, int flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIMoveBuffersHelper(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *PciInfo);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT int drmInstallSIGIOHandler(int fd, void (*f)(int, void *, void *));
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT int DRIMasterFD(ScrnInfoPtr pScrn);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void *DRIMasterSareaPointer(ScrnInfoPtr pScrn);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn);