aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/dri
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/dri')
-rw-r--r--xorg-server/hw/xfree86/dri/Makefile.am4
-rw-r--r--xorg-server/hw/xfree86/dri/Makefile.in39
-rw-r--r--xorg-server/hw/xfree86/dri/dri.c16
-rw-r--r--xorg-server/hw/xfree86/dri/dri.h108
-rw-r--r--xorg-server/hw/xfree86/dri/xf86dri.c18
5 files changed, 101 insertions, 84 deletions
diff --git a/xorg-server/hw/xfree86/dri/Makefile.am b/xorg-server/hw/xfree86/dri/Makefile.am
index 3ec30beec..a7b491c6e 100644
--- a/xorg-server/hw/xfree86/dri/Makefile.am
+++ b/xorg-server/hw/xfree86/dri/Makefile.am
@@ -8,12 +8,10 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \
-I$(top_srcdir)/hw/xfree86/ramdac \
-I$(top_srcdir)/hw/xfree86/os-support/bus \
-I$(top_srcdir)/glx \
- -I$(top_srcdir)/GL/include \
- -I$(top_builddir)/GL/include \
-DHAVE_XORG_CONFIG_H \
@DIX_CFLAGS@ @XORG_CFLAGS@ @DRIPROTO_CFLAGS@ \
@LIBDRM_CFLAGS@ \
- @GL_CFLAGS@
+ @DRI_CFLAGS@
libdri_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@
libdri_ladir = $(moduledir)/extensions
libdri_la_SOURCES = \
diff --git a/xorg-server/hw/xfree86/dri/Makefile.in b/xorg-server/hw/xfree86/dri/Makefile.in
index cf445fecd..278a514ef 100644
--- a/xorg-server/hw/xfree86/dri/Makefile.in
+++ b/xorg-server/hw/xfree86/dri/Makefile.in
@@ -39,8 +39,11 @@ subdir = hw/xfree86/dri
DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
+ $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -50,7 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
$(top_builddir)/include/xorg-config.h \
$(top_builddir)/include/xkb-config.h \
$(top_builddir)/include/xwin-config.h \
- $(top_builddir)/include/kdrive-config.h
+ $(top_builddir)/include/kdrive-config.h \
+ $(top_builddir)/include/version-config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -104,6 +108,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_MAKEFLAGS = @AM_MAKEFLAGS@
APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@
APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
@@ -124,9 +129,12 @@ CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CXX = @CXX@
CYGPATH_W = @CYGPATH_W@
DARWIN_LIBS = @DARWIN_LIBS@
DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -155,7 +163,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@
DRIPROTO_LIBS = @DRIPROTO_LIBS@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+DRI_CFLAGS = @DRI_CFLAGS@
DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
+DRI_LIBS = @DRI_LIBS@
DSYMUTIL = @DSYMUTIL@
DTRACE = @DTRACE@
DUMPBIN = @DUMPBIN@
@@ -164,9 +174,13 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GL_CFLAGS = @GL_CFLAGS@
@@ -205,12 +219,13 @@ LTCOMPILE = @LTCOMPILE@
LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
+MAIN_LIB = @MAIN_LIB@
+MAKEFLAGS = @MAKEFLAGS@
MAKEINFO = @MAKEINFO@
MAKE_HTML = @MAKE_HTML@
MAKE_PDF = @MAKE_PDF@
MAKE_PS = @MAKE_PS@
MAKE_TEXT = @MAKE_TEXT@
-MESA_SOURCE = @MESA_SOURCE@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
@@ -230,7 +245,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
@@ -240,6 +254,7 @@ PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PROJECTROOT = @PROJECTROOT@
PS2PDF = @PS2PDF@
+Q = @Q@
RANLIB = @RANLIB@
RAWCPP = @RAWCPP@
RAWCPPFLAGS = @RAWCPPFLAGS@
@@ -253,11 +268,10 @@ STRIP = @STRIP@
TSLIB_CFLAGS = @TSLIB_CFLAGS@
TSLIB_LIBS = @TSLIB_LIBS@
UTILS_SYS_LIBS = @UTILS_SYS_LIBS@
-VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@
-VENDOR_NAME = @VENDOR_NAME@
+V = @V@
VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
-VENDOR_RELEASE = @VENDOR_RELEASE@
VERSION = @VERSION@
+WINDRES = @WINDRES@
X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
XDMCP_CFLAGS = @XDMCP_CFLAGS@
@@ -293,6 +307,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
XORG_SYS_LIBS = @XORG_SYS_LIBS@
XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
XPBPROXY_LIBS = @XPBPROXY_LIBS@
+XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@
XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
XSDL_INCS = @XSDL_INCS@
@@ -317,7 +332,6 @@ YFLAGS = @YFLAGS@
__XCONFIGFILE__ = @__XCONFIGFILE__@
abi_ansic = @abi_ansic@
abi_extension = @abi_extension@
-abi_font = @abi_font@
abi_videodrv = @abi_videodrv@
abi_xinput = @abi_xinput@
abs_builddir = @abs_builddir@
@@ -340,6 +354,7 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
+distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
@@ -371,7 +386,9 @@ psdir = @psdir@
sbindir = @sbindir@
sdkdir = @sdkdir@
sharedstatedir = @sharedstatedir@
+shavedir = @shavedir@
srcdir = @srcdir@
+symbol_visibility = @symbol_visibility@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
@@ -387,12 +404,10 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \
-I$(top_srcdir)/hw/xfree86/ramdac \
-I$(top_srcdir)/hw/xfree86/os-support/bus \
-I$(top_srcdir)/glx \
- -I$(top_srcdir)/GL/include \
- -I$(top_builddir)/GL/include \
-DHAVE_XORG_CONFIG_H \
@DIX_CFLAGS@ @XORG_CFLAGS@ @DRIPROTO_CFLAGS@ \
@LIBDRM_CFLAGS@ \
- @GL_CFLAGS@
+ @DRI_CFLAGS@
libdri_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@
libdri_ladir = $(moduledir)/extensions
diff --git a/xorg-server/hw/xfree86/dri/dri.c b/xorg-server/hw/xfree86/dri/dri.c
index bddb6510e..d32b284ed 100644
--- a/xorg-server/hw/xfree86/dri/dri.c
+++ b/xorg-server/hw/xfree86/dri/dri.c
@@ -45,8 +45,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <sys/ioctl.h>
#include <errno.h>
-#define NEED_REPLIES
-#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
#include "xf86drm.h"
@@ -71,6 +69,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "mipointer.h"
#include "xf86_OSproc.h"
#include "inputstr.h"
+#include "xf86VGAarbiter.h"
#define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu)
@@ -335,6 +334,12 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
return FALSE;
}
+ if (!xf86VGAarbiterAllowDRI(pScreen)) {
+ DRIDrvMsg(pScreen->myNum, X_WARNING,
+ "Direct rendering is not supported when VGA arb is necessary for the device\n");
+ return FALSE;
+ }
+
/*
* If Xinerama is on, don't allow DRI to initialise. It won't be usable
* anyway.
@@ -1365,11 +1370,12 @@ Bool
DRIDrawablePrivDelete(pointer pResource, XID id)
{
WindowPtr pWin;
+ int rc;
id = (XID)pResource;
- pWin = LookupIDByType(id, RT_WINDOW);
+ rc = dixLookupWindow(&pWin, id, serverClient, DixGetAttrAccess);
- if (pWin) {
+ if (rc == Success) {
DRIDrawablePrivPtr pDRIDrwPriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin);
if (!pDRIDrwPriv)
@@ -1835,7 +1841,7 @@ DRISwapContext(int drmFD, void *oldctx, void *newctx)
newContextStore);
}
-void*
+void*
DRIGetContextStore(DRIContextPrivPtr context)
{
return((void *)context->pContextStore);
diff --git a/xorg-server/hw/xfree86/dri/dri.h b/xorg-server/hw/xfree86/dri/dri.h
index 516da97a5..f690e234b 100644
--- a/xorg-server/hw/xfree86/dri/dri.h
+++ b/xorg-server/hw/xfree86/dri/dri.h
@@ -198,59 +198,59 @@ typedef struct {
} DRIInfoRec, *DRIInfoPtr;
-extern Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn, unsigned long sAreaSize,
+extern _X_EXPORT Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn, unsigned long sAreaSize,
const char *busID,
const char *drmDriverName);
-extern Bool DRIScreenInit(ScreenPtr pScreen,
+extern _X_EXPORT Bool DRIScreenInit(ScreenPtr pScreen,
DRIInfoPtr pDRIInfo,
int *pDRMFD);
-extern void DRICloseScreen(ScreenPtr pScreen);
+extern _X_EXPORT void DRICloseScreen(ScreenPtr pScreen);
-extern Bool DRIExtensionInit(void);
+extern _X_EXPORT Bool DRIExtensionInit(void);
-extern void DRIReset(void);
+extern _X_EXPORT void DRIReset(void);
-extern Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen,
+extern _X_EXPORT Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen,
Bool *isCapable);
-extern Bool DRIOpenConnection(ScreenPtr pScreen,
+extern _X_EXPORT Bool DRIOpenConnection(ScreenPtr pScreen,
drm_handle_t * hSAREA,
char **busIdString);
-extern Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic);
+extern _X_EXPORT Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic);
-extern Bool DRICloseConnection(ScreenPtr pScreen);
+extern _X_EXPORT Bool DRICloseConnection(ScreenPtr pScreen);
-extern Bool DRIGetClientDriverName(ScreenPtr pScreen,
+extern _X_EXPORT Bool DRIGetClientDriverName(ScreenPtr pScreen,
int* ddxDriverMajorVersion,
int* ddxDriverMinorVersion,
int* ddxDriverPatchVersion,
char** clientDriverName);
-extern Bool DRICreateContext(ScreenPtr pScreen,
+extern _X_EXPORT Bool DRICreateContext(ScreenPtr pScreen,
VisualPtr visual,
XID context,
drm_context_t * pHWContext);
-extern Bool DRIDestroyContext(ScreenPtr pScreen, XID context);
+extern _X_EXPORT Bool DRIDestroyContext(ScreenPtr pScreen, XID context);
-extern Bool DRIContextPrivDelete(pointer pResource, XID id);
+extern _X_EXPORT Bool DRIContextPrivDelete(pointer pResource, XID id);
-extern Bool DRICreateDrawable(ScreenPtr pScreen,
+extern _X_EXPORT Bool DRICreateDrawable(ScreenPtr pScreen,
ClientPtr client,
DrawablePtr pDrawable,
drm_drawable_t * hHWDrawable);
-extern Bool DRIDestroyDrawable(ScreenPtr pScreen,
+extern _X_EXPORT Bool DRIDestroyDrawable(ScreenPtr pScreen,
ClientPtr client,
DrawablePtr pDrawable);
-extern Bool DRIDrawablePrivDelete(pointer pResource,
+extern _X_EXPORT Bool DRIDrawablePrivDelete(pointer pResource,
XID id);
-extern Bool DRIGetDrawableInfo(ScreenPtr pScreen,
+extern _X_EXPORT Bool DRIGetDrawableInfo(ScreenPtr pScreen,
DrawablePtr pDrawable,
unsigned int* indx,
unsigned int* stamp,
@@ -265,7 +265,7 @@ extern Bool DRIGetDrawableInfo(ScreenPtr pScreen,
int* numBackClipRects,
drm_clip_rect_t ** pBackClipRects);
-extern Bool DRIGetDeviceInfo(ScreenPtr pScreen,
+extern _X_EXPORT Bool DRIGetDeviceInfo(ScreenPtr pScreen,
drm_handle_t * hFrameBuffer,
int* fbOrigin,
int* fbSize,
@@ -273,109 +273,109 @@ extern Bool DRIGetDeviceInfo(ScreenPtr pScreen,
int* devPrivateSize,
void** pDevPrivate);
-extern DRIInfoPtr DRICreateInfoRec(void);
+extern _X_EXPORT DRIInfoPtr DRICreateInfoRec(void);
-extern void DRIDestroyInfoRec(DRIInfoPtr DRIInfo);
+extern _X_EXPORT void DRIDestroyInfoRec(DRIInfoPtr DRIInfo);
-extern Bool DRIFinishScreenInit(ScreenPtr pScreen);
+extern _X_EXPORT Bool DRIFinishScreenInit(ScreenPtr pScreen);
-extern void DRIWakeupHandler(pointer wakeupData,
+extern _X_EXPORT void DRIWakeupHandler(pointer wakeupData,
int result,
pointer pReadmask);
-extern void DRIBlockHandler(pointer blockData,
+extern _X_EXPORT void DRIBlockHandler(pointer blockData,
OSTimePtr pTimeout,
pointer pReadmask);
-extern void DRIDoWakeupHandler(int screenNum,
+extern _X_EXPORT void DRIDoWakeupHandler(int screenNum,
pointer wakeupData,
unsigned long result,
pointer pReadmask);
-extern void DRIDoBlockHandler(int screenNum,
+extern _X_EXPORT void DRIDoBlockHandler(int screenNum,
pointer blockData,
pointer pTimeout,
pointer pReadmask);
-extern void DRISwapContext(int drmFD,
+extern _X_EXPORT void DRISwapContext(int drmFD,
void *oldctx,
void *newctx);
-extern void *DRIGetContextStore(DRIContextPrivPtr context);
+extern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context);
-extern void DRIWindowExposures(WindowPtr pWin,
+extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin,
RegionPtr prgn,
RegionPtr bsreg);
-extern Bool DRIDestroyWindow(WindowPtr pWin);
+extern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin);
-extern void DRICopyWindow(WindowPtr pWin,
+extern _X_EXPORT void DRICopyWindow(WindowPtr pWin,
DDXPointRec ptOldOrg,
RegionPtr prgnSrc);
-extern int DRIValidateTree(WindowPtr pParent,
+extern _X_EXPORT int DRIValidateTree(WindowPtr pParent,
WindowPtr pChild,
VTKind kind);
-extern void DRIPostValidateTree(WindowPtr pParent,
+extern _X_EXPORT void DRIPostValidateTree(WindowPtr pParent,
WindowPtr pChild,
VTKind kind);
-extern void DRIClipNotify(WindowPtr pWin,
+extern _X_EXPORT void DRIClipNotify(WindowPtr pWin,
int dx,
int dy);
-extern CARD32 DRIGetDrawableIndex(WindowPtr pWin);
+extern _X_EXPORT CARD32 DRIGetDrawableIndex(WindowPtr pWin);
-extern void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg);
+extern _X_EXPORT void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg);
-extern void DRILock(ScreenPtr pScreen, int flags);
+extern _X_EXPORT void DRILock(ScreenPtr pScreen, int flags);
-extern void DRIUnlock(ScreenPtr pScreen);
+extern _X_EXPORT void DRIUnlock(ScreenPtr pScreen);
-extern DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen);
+extern _X_EXPORT DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen);
-extern void *DRIGetSAREAPrivate(ScreenPtr pScreen);
+extern _X_EXPORT void *DRIGetSAREAPrivate(ScreenPtr pScreen);
-extern unsigned int DRIGetDrawableStamp(ScreenPtr pScreen,
+extern _X_EXPORT unsigned int DRIGetDrawableStamp(ScreenPtr pScreen,
CARD32 drawable_index);
-extern DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen,
+extern _X_EXPORT DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen,
drm_context_t * pHWContext,
DRIContextFlags flags);
-extern DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen,
+extern _X_EXPORT DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen,
drm_context_t hHWContext,
DRIContextFlags flags);
-extern Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv);
+extern _X_EXPORT Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv);
-extern drm_context_t DRIGetContext(ScreenPtr pScreen);
+extern _X_EXPORT drm_context_t DRIGetContext(ScreenPtr pScreen);
-extern void DRIQueryVersion(int *majorVersion,
+extern _X_EXPORT void DRIQueryVersion(int *majorVersion,
int *minorVersion,
int *patchVersion);
-extern void DRIAdjustFrame(int scrnIndex, int x, int y, int flags);
+extern _X_EXPORT void DRIAdjustFrame(int scrnIndex, int x, int y, int flags);
-extern void DRIMoveBuffersHelper(ScreenPtr pScreen,
+extern _X_EXPORT void DRIMoveBuffersHelper(ScreenPtr pScreen,
int dx,
int dy,
int *xdir,
int *ydir,
RegionPtr reg);
-extern char *DRICreatePCIBusID(const struct pci_device *PciInfo);
+extern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *PciInfo);
-extern int drmInstallSIGIOHandler(int fd, void (*f)(int, void *, void *));
-extern int drmRemoveSIGIOHandler(int fd);
-extern int DRIMasterFD(ScrnInfoPtr pScrn);
+extern _X_EXPORT int drmInstallSIGIOHandler(int fd, void (*f)(int, void *, void *));
+extern _X_EXPORT int drmRemoveSIGIOHandler(int fd);
+extern _X_EXPORT int DRIMasterFD(ScrnInfoPtr pScrn);
-extern void *DRIMasterSareaPointer(ScrnInfoPtr pScrn);
+extern _X_EXPORT void *DRIMasterSareaPointer(ScrnInfoPtr pScrn);
-extern drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn);
+extern _X_EXPORT drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn);
-extern void DRIGetTexOffsetFuncs(ScreenPtr pScreen,
+extern _X_EXPORT void DRIGetTexOffsetFuncs(ScreenPtr pScreen,
DRITexOffsetStartProcPtr *texOffsetStartFunc,
DRITexOffsetFinishProcPtr *texOffsetFinishFunc);
diff --git a/xorg-server/hw/xfree86/dri/xf86dri.c b/xorg-server/hw/xfree86/dri/xf86dri.c
index ea11b38ee..d3e5e688a 100644
--- a/xorg-server/hw/xfree86/dri/xf86dri.c
+++ b/xorg-server/hw/xfree86/dri/xf86dri.c
@@ -42,8 +42,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86.h"
-#define NEED_REPLIES
-#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
#include "misc.h"
@@ -216,8 +214,8 @@ ProcXF86DRIOpenConnection(
rep.busIdStringLength = 0;
if (busIdString)
rep.busIdStringLength = strlen(busIdString);
- rep.length = (SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) +
- ((rep.busIdStringLength + 3) & ~3)) >> 2;
+ rep.length = bytes_to_int32(SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) +
+ pad_to_int32(rep.busIdStringLength));
rep.hSAREALow = (CARD32)(hSAREA & 0xffffffff);
#if defined(LONG64) && !defined(__linux__)
@@ -302,9 +300,9 @@ ProcXF86DRIGetClientDriverName(
rep.clientDriverNameLength = 0;
if (clientDriverName)
rep.clientDriverNameLength = strlen(clientDriverName);
- rep.length = (SIZEOF(xXF86DRIGetClientDriverNameReply) -
+ rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetClientDriverNameReply) -
SIZEOF(xGenericReply) +
- ((rep.clientDriverNameLength + 3) & ~3)) >> 2;
+ pad_to_int32(rep.clientDriverNameLength));
WriteToClient(client,
sizeof(xXF86DRIGetClientDriverNameReply), (char *)&rep);
@@ -408,8 +406,8 @@ ProcXF86DRIDestroyDrawable(
{
REQUEST(xXF86DRIDestroyDrawableReq);
DrawablePtr pDrawable;
- REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq);
int rc;
+ REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq);
if (stuff->screen >= screenInfo.numScreens) {
client->errorValue = stuff->screen;
@@ -517,7 +515,7 @@ ProcXF86DRIGetDrawableInfo(
rep.length += sizeof(drm_clip_rect_t) * rep.numClipRects;
}
- rep.length = ((rep.length + 3) & ~3) >> 2;
+ rep.length = bytes_to_int32(rep.length);
WriteToClient(client, sizeof(xXF86DRIGetDrawableInfoReply), (char *)&rep);
@@ -576,9 +574,9 @@ ProcXF86DRIGetDeviceInfo(
rep.length = 0;
if (rep.devPrivateSize) {
- rep.length = (SIZEOF(xXF86DRIGetDeviceInfoReply) -
+ rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetDeviceInfoReply) -
SIZEOF(xGenericReply) +
- ((rep.devPrivateSize + 3) & ~3)) >> 2;
+ pad_to_int32(rep.devPrivateSize));
}
WriteToClient(client, sizeof(xXF86DRIGetDeviceInfoReply), (char *)&rep);