aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw')
-rw-r--r--xorg-server/hw/dmx/config/dmxparse.h3
-rw-r--r--xorg-server/hw/dmx/config/dmxprint.c20
-rw-r--r--xorg-server/hw/dmx/dmx.c1
-rw-r--r--xorg-server/hw/dmx/dmxcb.c3
-rw-r--r--xorg-server/hw/dmx/dmxfont.h2
-rw-r--r--xorg-server/hw/dmx/dmxgc.c4
-rw-r--r--xorg-server/hw/dmx/dmxgc.h4
-rw-r--r--xorg-server/hw/dmx/dmxinit.c42
-rw-r--r--xorg-server/hw/dmx/dmxpict.c1
-rw-r--r--xorg-server/hw/dmx/dmxprop.c6
-rw-r--r--xorg-server/hw/dmx/dmxscrinit.c1
-rw-r--r--xorg-server/hw/dmx/dmxwindow.c4
-rw-r--r--xorg-server/hw/dmx/glxProxy/compsize.h7
-rw-r--r--xorg-server/hw/dmx/glxProxy/g_disptab.h21
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxcmds.c7
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxcmds.h6
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxcmdsswap.c2
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxext.h1
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxscreens.c6
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxscreens.h2
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxserver.h8
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxsingle.c6
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxsingle.h4
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxswap.c4
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxvendor.c6
-rw-r--r--xorg-server/hw/dmx/input/dmxinputinit.c10
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.c8
-rw-r--r--xorg-server/hw/xfree86/Makefile.am2
-rw-r--r--xorg-server/hw/xfree86/Xorg.sh.in4
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c9
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/driver.c2
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.c196
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.h4
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/vblank.c9
-rw-r--r--xorg-server/hw/xfree86/man/Xorg.wrap.man2
-rw-r--r--xorg-server/hw/xfree86/xorg-wrapper.c10
-rw-r--r--xorg-server/hw/xnest/Keyboard.c9
-rw-r--r--xorg-server/hw/xwayland/Makefile.am1
-rw-r--r--xorg-server/hw/xwayland/xwayland-glamor.c3
-rw-r--r--xorg-server/hw/xwayland/xwayland.c2
40 files changed, 298 insertions, 144 deletions
diff --git a/xorg-server/hw/dmx/config/dmxparse.h b/xorg-server/hw/dmx/config/dmxparse.h
index 7d31b6309..cc2f0eb71 100644
--- a/xorg-server/hw/dmx/config/dmxparse.h
+++ b/xorg-server/hw/dmx/config/dmxparse.h
@@ -38,6 +38,7 @@
#define _DMXPARSE_H_
#include <stdio.h> /* For FILE */
+#include <X11/Xfuncproto.h> /* For _X_ATTRIBUTE_PRINTF */
/** Stores tokens not stored in other structures (e.g., keywords and ;) */
typedef struct _DMXConfigToken {
@@ -203,7 +204,7 @@ extern int yylex(void);
extern int yydebug;
extern void yyerror(const char *message);
-extern void dmxConfigLog(const char *format, ...);
+extern void dmxConfigLog(const char *format, ...) _X_ATTRIBUTE_PRINTF(1,0);
extern void *dmxConfigAlloc(unsigned long bytes);
extern void *dmxConfigRealloc(void *orig,
unsigned long orig_bytes, unsigned long bytes);
diff --git a/xorg-server/hw/dmx/config/dmxprint.c b/xorg-server/hw/dmx/config/dmxprint.c
index 9dec52b5c..c80e830e4 100644
--- a/xorg-server/hw/dmx/config/dmxprint.c
+++ b/xorg-server/hw/dmx/config/dmxprint.c
@@ -130,7 +130,7 @@ dmxConfigPopState(void)
dmxConfigNewline();
}
-static void
+static void _X_ATTRIBUTE_PRINTF(4, 5)
dmxConfigOutput(int addSpace, int doNewline, const char *comment,
const char *format, ...)
{
@@ -261,32 +261,20 @@ dmxConfigPrintString(DMXConfigStringPtr p, int quote)
static int
dmxConfigPrintPair(DMXConfigPairPtr p, int addSpace)
{
- const char *format = NULL;
-
if (!p)
return 0;
- switch (p->token) {
- case T_ORIGIN:
- format = "@%dx%d";
- break;
- case T_DIMENSION:
- format = "%dx%d";
- break;
- case T_OFFSET:
- format = "%c%d%c%d";
- break;
- }
if (p->token == T_OFFSET) {
if (!p->comment && !p->x && !p->y && p->xsign >= 0 && p->ysign >= 0)
return 0;
- dmxConfigOutput(addSpace, 0, p->comment, format,
+ dmxConfigOutput(addSpace, 0, p->comment, "%c%d%c%d",
p->xsign < 0 ? '-' : '+', p->x,
p->ysign < 0 ? '-' : '+', p->y);
}
else {
if (!p->comment && !p->x && !p->y)
return 0;
- dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y);
+ dmxConfigOutput(addSpace, 0, p->comment, "%s%dx%d",
+ (p->token == T_ORIGIN) ? "@" : "", p->x, p->y);
}
return 1;
}
diff --git a/xorg-server/hw/dmx/dmx.c b/xorg-server/hw/dmx/dmx.c
index 99e970cb9..2988df33a 100644
--- a/xorg-server/hw/dmx/dmx.c
+++ b/xorg-server/hw/dmx/dmx.c
@@ -55,6 +55,7 @@
#include "extinit.h"
#include "opaque.h"
+#include "dmx.h"
#include "dmxextension.h"
#include <X11/extensions/dmxproto.h>
#include <X11/extensions/dmx.h>
diff --git a/xorg-server/hw/dmx/dmxcb.c b/xorg-server/hw/dmx/dmxcb.c
index 86015f395..cca5702ee 100644
--- a/xorg-server/hw/dmx/dmxcb.c
+++ b/xorg-server/hw/dmx/dmxcb.c
@@ -47,9 +47,6 @@ extern int connBlockScreenStart;
#ifdef PANORAMIX
#include "panoramiXsrv.h"
-extern int PanoramiXPixWidth;
-extern int PanoramiXPixHeight;
-extern int PanoramiXNumScreens;
#endif
int dmxGlobalWidth, dmxGlobalHeight;
diff --git a/xorg-server/hw/dmx/dmxfont.h b/xorg-server/hw/dmx/dmxfont.h
index 8575ca953..66c663377 100644
--- a/xorg-server/hw/dmx/dmxfont.h
+++ b/xorg-server/hw/dmx/dmxfont.h
@@ -54,6 +54,4 @@ extern Bool dmxUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
extern Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont);
extern Bool dmxBEFreeFont(ScreenPtr pScreen, FontPtr pFont);
-extern int dmxFontPrivateIndex;
-
#endif /* DMXFONT_H */
diff --git a/xorg-server/hw/dmx/dmxgc.c b/xorg-server/hw/dmx/dmxgc.c
index 234316797..ec15d27aa 100644
--- a/xorg-server/hw/dmx/dmxgc.c
+++ b/xorg-server/hw/dmx/dmxgc.c
@@ -49,7 +49,7 @@
#include "pixmapstr.h"
#include "migc.h"
-static GCFuncs dmxGCFuncs = {
+static const GCFuncs dmxGCFuncs = {
dmxValidateGC,
dmxChangeGC,
dmxCopyGC,
@@ -59,7 +59,7 @@ static GCFuncs dmxGCFuncs = {
dmxCopyClip,
};
-static GCOps dmxGCOps = {
+static const GCOps dmxGCOps = {
dmxFillSpans,
dmxSetSpans,
dmxPutImage,
diff --git a/xorg-server/hw/dmx/dmxgc.h b/xorg-server/hw/dmx/dmxgc.h
index c8ecb53a0..c5c6b7732 100644
--- a/xorg-server/hw/dmx/dmxgc.h
+++ b/xorg-server/hw/dmx/dmxgc.h
@@ -41,8 +41,8 @@
/** GC private area. */
typedef struct _dmxGCPriv {
- GCOps *ops;
- GCFuncs *funcs;
+ const GCOps *ops;
+ const GCFuncs *funcs;
XlibGC gc;
Bool msc;
} dmxGCPrivRec, *dmxGCPrivPtr;
diff --git a/xorg-server/hw/dmx/dmxinit.c b/xorg-server/hw/dmx/dmxinit.c
index fd2ade0ef..025dc8637 100644
--- a/xorg-server/hw/dmx/dmxinit.c
+++ b/xorg-server/hw/dmx/dmxinit.c
@@ -164,23 +164,23 @@ dmxErrorHandler(Display * dpy, XErrorEvent * ev)
switch (ev->error_code) {
case BadValue:
dmxLog(dmxWarning, " Value: 0x%x\n",
- ev->resourceid);
+ (unsigned int) ev->resourceid);
break;
case BadAtom:
dmxLog(dmxWarning, " AtomID: 0x%x\n",
- ev->resourceid);
+ (unsigned int) ev->resourceid);
break;
default:
dmxLog(dmxWarning, " ResourceID: 0x%x\n",
- ev->resourceid);
+ (unsigned int) ev->resourceid);
break;
}
/* Provide serial number information */
dmxLog(dmxWarning, " Failed serial number: %d\n",
- ev->serial);
+ (unsigned int) ev->serial);
dmxLog(dmxWarning, " Current serial number: %d\n",
- dpy->request);
+ (unsigned int) dpy->request);
return 0;
}
@@ -634,7 +634,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
if (major > 0 && minor > 0)
year += 2000;
- dmxLog(dmxInfo, "Generation: %d\n", dmxGeneration);
+ dmxLog(dmxInfo, "Generation: %lu\n", dmxGeneration);
dmxLog(dmxInfo, "DMX version: %d.%d.%02d%02d%02d (%s)\n",
major, minor, year, month, day, VENDOR_STRING);
@@ -762,7 +762,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
dmxGlxVisualPrivate **configprivs = NULL;
int nconfigs = 0;
int (*oldErrorHandler) (Display *, XErrorEvent *);
- int i;
/* Catch errors if when using an older GLX w/o FBconfigs */
oldErrorHandler = XSetErrorHandler(dmxNOPErrorHandler);
@@ -797,28 +796,29 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
configprivs = malloc(nconfigs * sizeof(dmxGlxVisualPrivate *));
if (configs != NULL && configprivs != NULL) {
+ int j;
/* Initialize our private info for each visual
* (currently only x_visual_depth and x_visual_class)
*/
- for (i = 0; i < nconfigs; i++) {
+ for (j = 0; j < nconfigs; j++) {
- configprivs[i] = (dmxGlxVisualPrivate *)
+ configprivs[j] = (dmxGlxVisualPrivate *)
malloc(sizeof(dmxGlxVisualPrivate));
- configprivs[i]->x_visual_depth = 0;
- configprivs[i]->x_visual_class = 0;
+ configprivs[j]->x_visual_depth = 0;
+ configprivs[j]->x_visual_class = 0;
/* Find the visual depth */
- if (configs[i].vid > 0) {
- int j;
-
- for (j = 0; j < dmxScreen->beNumVisuals; j++) {
- if (dmxScreen->beVisuals[j].visualid ==
- configs[i].vid) {
- configprivs[i]->x_visual_depth =
- dmxScreen->beVisuals[j].depth;
- configprivs[i]->x_visual_class =
- dmxScreen->beVisuals[j].class;
+ if (configs[j].vid > 0) {
+ int k;
+
+ for (k = 0; k < dmxScreen->beNumVisuals; k++) {
+ if (dmxScreen->beVisuals[k].visualid ==
+ configs[j].vid) {
+ configprivs[j]->x_visual_depth =
+ dmxScreen->beVisuals[k].depth;
+ configprivs[j]->x_visual_class =
+ dmxScreen->beVisuals[k].class;
break;
}
}
diff --git a/xorg-server/hw/dmx/dmxpict.c b/xorg-server/hw/dmx/dmxpict.c
index 64d0ae150..aaca178b9 100644
--- a/xorg-server/hw/dmx/dmxpict.c
+++ b/xorg-server/hw/dmx/dmxpict.c
@@ -57,7 +57,6 @@
#include "mipict.h"
#include "fbpict.h"
-extern int RenderErrBase;
extern int (*ProcRenderVector[RenderNumberRequests]) (ClientPtr);
static int (*dmxSaveRenderVector[RenderNumberRequests]) (ClientPtr);
diff --git a/xorg-server/hw/dmx/dmxprop.c b/xorg-server/hw/dmx/dmxprop.c
index 4be2dbd4c..5e306d286 100644
--- a/xorg-server/hw/dmx/dmxprop.c
+++ b/xorg-server/hw/dmx/dmxprop.c
@@ -220,7 +220,7 @@ dmxPropertyCheckOtherWindows(DMXScreenInfo * dmxScreen, Atom atom)
if (XGetTextProperty(dpy, win, &tp, atom) && tp.nitems) {
dmxLog(dmxDebug, "On %s/%lu: %s\n",
- dmxScreen->name, win, tp.value);
+ dmxScreen->name, (unsigned long) win, tp.value);
if (!strncmp((char *) tp.value, (char *) id,
strlen((char *) id))) {
int idx;
@@ -360,8 +360,8 @@ dmxPropertyWindow(DMXScreenInfo * dmxScreen)
dmxScreen->next = (other->next ? other->next : other);
other->next = (tmp ? tmp : dmxScreen);
dmxLog(dmxDebug, "%d/%s/%lu and %d/%s/%lu are on the same backend\n",
- dmxScreen->index, dmxScreen->name, dmxScreen->scrnWin,
- other->index, other->name, other->scrnWin);
+ dmxScreen->index, dmxScreen->name, (unsigned long) dmxScreen->scrnWin,
+ other->index, other->name, (unsigned long) other->scrnWin);
}
snprintf(buf, sizeof(buf), ".%d,%lu", dmxScreen->index,
diff --git a/xorg-server/hw/dmx/dmxscrinit.c b/xorg-server/hw/dmx/dmxscrinit.c
index 963d3a9de..097418d05 100644
--- a/xorg-server/hw/dmx/dmxscrinit.c
+++ b/xorg-server/hw/dmx/dmxscrinit.c
@@ -80,7 +80,6 @@ dmxBEScreenInit(ScreenPtr pScreen)
{
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
XSetWindowAttributes attribs;
- XGCValues gcvals;
unsigned long mask;
int i, j;
diff --git a/xorg-server/hw/dmx/dmxwindow.c b/xorg-server/hw/dmx/dmxwindow.c
index c75373534..c157e1099 100644
--- a/xorg-server/hw/dmx/dmxwindow.c
+++ b/xorg-server/hw/dmx/dmxwindow.c
@@ -857,13 +857,9 @@ dmxResizeWindow(WindowPtr pWindow, int x, int y,
ScreenPtr pScreen = pWindow->drawable.pScreen;
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
- dmxWinPrivPtr pSibPriv;
unsigned int m;
XWindowChanges c;
- if (pSib)
- pSibPriv = DMX_GET_WINDOW_PRIV(pSib);
-
DMX_UNWRAP(ResizeWindow, dmxScreen, pScreen);
#if 1
if (pScreen->ResizeWindow)
diff --git a/xorg-server/hw/dmx/glxProxy/compsize.h b/xorg-server/hw/dmx/glxProxy/compsize.h
index 360966233..5e759b0a0 100644
--- a/xorg-server/hw/dmx/glxProxy/compsize.h
+++ b/xorg-server/hw/dmx/glxProxy/compsize.h
@@ -48,4 +48,11 @@ extern GLint __glTexGeniv_size(GLenum e);
extern GLint __glTexParameterfv_size(GLenum e);
extern GLint __glTexParameteriv_size(GLenum e);
+extern GLint __glCallLists_size(GLsizei n, GLenum type);
+extern GLint __glDrawPixels_size(GLenum format, GLenum type, GLsizei w, GLsizei h);
+extern GLint __glBitmap_size(GLsizei w, GLsizei h);
+extern GLint __glTexImage1D_size(GLenum format, GLenum type, GLsizei w);
+extern GLint __glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h);
+extern GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h, GLsizei d);
+
#endif /* !__compsize_h__ */
diff --git a/xorg-server/hw/dmx/glxProxy/g_disptab.h b/xorg-server/hw/dmx/glxProxy/g_disptab.h
index 530338798..783f87a54 100644
--- a/xorg-server/hw/dmx/glxProxy/g_disptab.h
+++ b/xorg-server/hw/dmx/glxProxy/g_disptab.h
@@ -655,7 +655,6 @@ extern void __glXDispSwap_CopyConvolutionFilter2D(GLbyte *);
extern void __glXDispSwap_SeparableFilter2D(GLbyte *);
extern void __glXDispSwap_TexImage3D(GLbyte *);
extern void __glXDispSwap_TexSubImage3D(GLbyte *);
-extern void __glXDispSwap_DrawArrays(GLbyte *);
extern void __glXDispSwap_PrioritizeTextures(GLbyte *);
extern void __glXDispSwap_CopyTexImage1D(GLbyte *);
extern void __glXDispSwap_CopyTexImage2D(GLbyte *);
@@ -663,6 +662,26 @@ extern void __glXDispSwap_CopyTexSubImage1D(GLbyte *);
extern void __glXDispSwap_CopyTexSubImage2D(GLbyte *);
extern void __glXDispSwap_CopyTexSubImage3D(GLbyte *);
+extern void __glXDispSwap_BindTexture(GLbyte *);
+extern void __glXDispSwap_BlendColor(GLbyte *);
+extern void __glXDispSwap_BlendEquation(GLbyte *);
+extern void __glXDispSwap_ColorTable(GLbyte *);
+extern void __glXDispSwap_ColorTableParameterfv(GLbyte *);
+extern void __glXDispSwap_ColorTableParameteriv(GLbyte *);
+extern void __glXDispSwap_CopyColorTable(GLbyte *);
+extern void __glXDispSwap_ConvolutionParameterf(GLbyte *);
+extern void __glXDispSwap_ConvolutionParameteri(GLbyte *);
+extern void __glXDispSwap_Histogram(GLbyte *);
+extern void __glXDispSwap_Minmax(GLbyte *);
+extern void __glXDispSwap_ResetHistogram(GLbyte *);
+extern void __glXDispSwap_ResetMinmax(GLbyte *);
+
+extern int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *, GLbyte *);
+extern int __glXSwapBindSwapBarrierSGIX(__GLXclientState *, GLbyte *);
+extern int __glXSwapJoinSwapGroupSGIX(__GLXclientState *, GLbyte *);
+extern int __glXSwapQueryMaxSwapBarriersSGIX(__GLXclientState *, GLbyte *);
+extern int __glXSwapMakeCurrentReadSGI(__GLXclientState *, GLbyte *);
+
#define __GLX_MIN_GLXCMD_OPCODE 1
#define __GLX_MAX_GLXCMD_OPCODE 20
#define __GLX_MIN_RENDER_OPCODE 1
diff --git a/xorg-server/hw/dmx/glxProxy/glxcmds.c b/xorg-server/hw/dmx/glxProxy/glxcmds.c
index fb4d5acce..4c500c93d 100644
--- a/xorg-server/hw/dmx/glxProxy/glxcmds.c
+++ b/xorg-server/hw/dmx/glxProxy/glxcmds.c
@@ -61,7 +61,6 @@
extern __GLXFBConfig **__glXFBConfigs;
extern int __glXNumFBConfigs;
-extern int glxIsExtensionSupported(char *ext);
extern int __glXGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc);
#define BE_TO_CLIENT_ERROR(x) \
@@ -3394,11 +3393,11 @@ __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
/* Send attributes */
if (attr != NULL) {
- CARD32 *pc = (CARD32 *) (be_req + 1);
+ CARD32 *pca = (CARD32 *) (be_req + 1);
while (numAttribs-- > 0) {
- *pc++ = *attr++; /* token */
- *pc++ = *attr++; /* value */
+ *pca++ = *attr++; /* token */
+ *pca++ = *attr++; /* value */
}
}
diff --git a/xorg-server/hw/dmx/glxProxy/glxcmds.h b/xorg-server/hw/dmx/glxProxy/glxcmds.h
index b0745927e..689e33485 100644
--- a/xorg-server/hw/dmx/glxProxy/glxcmds.h
+++ b/xorg-server/hw/dmx/glxProxy/glxcmds.h
@@ -33,5 +33,11 @@ extern int __glXCreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc);
extern int __glXJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc);
extern int __glXMakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc);
extern int __glXQueryMaxSwapBarriersSGIX(__GLXclientState * cl, GLbyte * pc);
+extern int __glXDoSwapBuffers(__GLXclientState * cl, XID drawId,
+ GLXContextTag tag);
+
+extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
+extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
+ int s);
#endif /* !__GLX_cmds_h__ */
diff --git a/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c b/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c
index ab3e7edc1..600a6e1cb 100644
--- a/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c
+++ b/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c
@@ -39,8 +39,6 @@
#include "glxext.h"
#include "glxvendor.h"
-extern int glxIsExtensionSupported(char *ext);
-
int __glXSwapGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc);
/************************************************************************/
diff --git a/xorg-server/hw/dmx/glxProxy/glxext.h b/xorg-server/hw/dmx/glxProxy/glxext.h
index 47cec15cf..b96ebc1f4 100644
--- a/xorg-server/hw/dmx/glxProxy/glxext.h
+++ b/xorg-server/hw/dmx/glxProxy/glxext.h
@@ -53,6 +53,7 @@ extern void __glXFlushContextCache(void);
extern void __glXFreeGLXWindow(__glXWindow * pGlxWindow);
extern void __glXFreeGLXPixmap(__GLXpixmap * pGlxPixmap);
+extern void __glXFreeGLXPbuffer(__glXPbuffer * pGlxPbuffer);
extern void __glXNoSuchRenderOpcode(GLbyte *);
extern int __glXNoSuchSingleOpcode(__GLXclientState *, GLbyte *);
diff --git a/xorg-server/hw/dmx/glxProxy/glxscreens.c b/xorg-server/hw/dmx/glxProxy/glxscreens.c
index 138afedf2..15bb1e862 100644
--- a/xorg-server/hw/dmx/glxProxy/glxscreens.c
+++ b/xorg-server/hw/dmx/glxProxy/glxscreens.c
@@ -65,8 +65,6 @@ static void
CalcServerVersionAndExtensions(void)
{
int s;
- xGLXQueryVersionReq *req;
- xGLXQueryVersionReply reply;
char **be_extensions;
char *ext;
char *denied_extensions;
@@ -80,6 +78,8 @@ CalcServerVersionAndExtensions(void)
for (s = 0; s < __glXNumActiveScreens; s++) {
DMXScreenInfo *dmxScreen = &dmxScreens[s];
Display *dpy = dmxScreen->beDisplay;
+ xGLXQueryVersionReq *req;
+ xGLXQueryVersionReply reply;
/* Send the glXQueryVersion request */
LockDisplay(dpy);
@@ -335,7 +335,7 @@ __glXGetServerString(unsigned int name)
}
int
-glxIsExtensionSupported(char *ext)
+glxIsExtensionSupported(const char *ext)
{
return (strstr(ExtensionsString, ext) != NULL);
}
diff --git a/xorg-server/hw/dmx/glxProxy/glxscreens.h b/xorg-server/hw/dmx/glxProxy/glxscreens.h
index a9fe2a9db..bb7477bc7 100644
--- a/xorg-server/hw/dmx/glxProxy/glxscreens.h
+++ b/xorg-server/hw/dmx/glxProxy/glxscreens.h
@@ -50,4 +50,6 @@ extern void __glXScreenReset(void);
extern char *__glXGetServerString(unsigned int name);
+extern int glxIsExtensionSupported(const char *ext);
+
#endif /* !__GLX_screens_h__ */
diff --git a/xorg-server/hw/dmx/glxProxy/glxserver.h b/xorg-server/hw/dmx/glxProxy/glxserver.h
index 754ad30a0..7aa5ad2f2 100644
--- a/xorg-server/hw/dmx/glxProxy/glxserver.h
+++ b/xorg-server/hw/dmx/glxProxy/glxserver.h
@@ -149,9 +149,7 @@ extern __GLXclientState *__glXClients[];
typedef void (*__GLXdispatchRenderProcPtr) (GLbyte *);
typedef int (*__GLXdispatchSingleProcPtr) (__GLXclientState *, GLbyte *);
typedef int (*__GLXdispatchVendorPrivProcPtr) (__GLXclientState *, GLbyte *);
-extern __GLXdispatchSingleProcPtr __glXSingleTable[];
extern __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[];
-extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[];
extern __GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[];
extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[];
@@ -193,9 +191,6 @@ extern RESTYPE __glXPbufferRes;
extern char *__glXcombine_strings(const char *, const char *);
-extern void __glXDisp_DrawArrays(GLbyte *);
-extern void __glXDispSwap_DrawArrays(GLbyte *);
-
/*
** Routines for sending swapped replies.
*/
@@ -287,9 +282,6 @@ extern int __glXConvolutionParameterfvSize(GLenum pname);
extern int __glXColorTableParameterfvSize(GLenum pname);
extern int __glXColorTableParameterivSize(GLenum pname);
-extern void __glXFreeGLXWindow(__glXWindow * pGlxWindow);
-extern void __glXFreeGLXPbuffer(__glXPbuffer * pGlxPbuffer);
-
extern int __glXVersionMajor;
extern int __glXVersionMinor;
diff --git a/xorg-server/hw/dmx/glxProxy/glxsingle.c b/xorg-server/hw/dmx/glxProxy/glxsingle.c
index 034497315..79d426bbf 100644
--- a/xorg-server/hw/dmx/glxProxy/glxsingle.c
+++ b/xorg-server/hw/dmx/glxProxy/glxsingle.c
@@ -45,6 +45,8 @@
/* #include "g_disptab_EXT.h" */
#include "unpack.h"
#include "glxutil.h"
+#include "glxcmds.h"
+#include "glxsingle.h"
#include "GL/glxproto.h"
@@ -81,10 +83,6 @@
#define X_GLXSingle 0 /* needed by GetReqExtra */
-extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
-extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
- int s);
-
static int swap_vec_element_size = 0;
static void
diff --git a/xorg-server/hw/dmx/glxProxy/glxsingle.h b/xorg-server/hw/dmx/glxProxy/glxsingle.h
index 32a9d4921..6126177fa 100644
--- a/xorg-server/hw/dmx/glxProxy/glxsingle.h
+++ b/xorg-server/hw/dmx/glxProxy/glxsingle.h
@@ -47,8 +47,4 @@ extern int __glXForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc);
extern int __glXForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc);
extern int __glXForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDispSwap_GetColorTable(__GLXclientState * cl, GLbyte * pc);
-
#endif
diff --git a/xorg-server/hw/dmx/glxProxy/glxswap.c b/xorg-server/hw/dmx/glxProxy/glxswap.c
index 5f565010d..bc18e5518 100644
--- a/xorg-server/hw/dmx/glxProxy/glxswap.c
+++ b/xorg-server/hw/dmx/glxProxy/glxswap.c
@@ -39,9 +39,7 @@
#include "dmxwindow.h"
#include "glxserver.h"
#include "glxswap.h"
-
-extern int __glXDoSwapBuffers(__GLXclientState * cl, XID drawId,
- GLXContextTag tag);
+#include "glxcmds.h"
typedef struct _SwapGroup *SwapGroupPtr;
diff --git a/xorg-server/hw/dmx/glxProxy/glxvendor.c b/xorg-server/hw/dmx/glxProxy/glxvendor.c
index fc8aff0cc..52d70eb70 100644
--- a/xorg-server/hw/dmx/glxProxy/glxvendor.c
+++ b/xorg-server/hw/dmx/glxProxy/glxvendor.c
@@ -44,6 +44,8 @@
/* #include "g_disptab_EXT.h" */
#include "unpack.h"
#include "glxutil.h"
+#include "glxcmds.h"
+#include "glxvendor.h"
#include "GL/glxproto.h"
@@ -78,10 +80,6 @@
dpy->request++
#endif
-extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
-extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
- int s);
-
static int swap_vec_element_size = 0;
static void
diff --git a/xorg-server/hw/dmx/input/dmxinputinit.c b/xorg-server/hw/dmx/input/dmxinputinit.c
index abb6a8551..56a39df8c 100644
--- a/xorg-server/hw/dmx/input/dmxinputinit.c
+++ b/xorg-server/hw/dmx/input/dmxinputinit.c
@@ -874,17 +874,17 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
{
XExtensionVersion *ext;
XDeviceInfo *devices;
- Display *display;
+ Display *dsp;
int num;
int i, j;
XextErrorHandler handler;
- if (!(display = XOpenDisplay(dmxInput->name)))
+ if (!(dsp = XOpenDisplay(dmxInput->name)))
return;
/* Print out information about the XInput Extension. */
handler = XSetExtensionErrorHandler(dmxInputExtensionErrorHandler);
- ext = XGetExtensionVersion(display, INAME);
+ ext = XGetExtensionVersion(dsp, INAME);
XSetExtensionErrorHandler(handler);
if (!ext || ext == (XExtensionVersion *) NoSuchExtension) {
@@ -894,7 +894,7 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
dmxLogInput(dmxInput, "Locating devices on %s (%s version %d.%d)\n",
dmxInput->name, INAME,
ext->major_version, ext->minor_version);
- devices = XListInputDevices(display, &num);
+ devices = XListInputDevices(dsp, &num);
XFree(ext);
ext = NULL;
@@ -956,7 +956,7 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
}
XFreeDeviceList(devices);
}
- XCloseDisplay(display);
+ XCloseDisplay(dsp);
}
/** Re-initialize all the devices described in \a dmxInput. Called from
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c
index 907bbebae..164ebdcba 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.c
@@ -806,7 +806,11 @@ ephyrUpdateModifierState(unsigned int state)
for (key = 0; key < MAP_LENGTH; key++)
if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
- if (key_is_down(pDev, key, KEY_PROCESSED))
+ if (mask == XCB_MOD_MASK_LOCK) {
+ KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE);
+ KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE);
+ }
+ else if (key_is_down(pDev, key, KEY_PROCESSED))
KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE);
if (--count == 0)
@@ -820,6 +824,8 @@ ephyrUpdateModifierState(unsigned int state)
for (key = 0; key < MAP_LENGTH; key++)
if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE);
+ if (mask == XCB_MOD_MASK_LOCK)
+ KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE);
break;
}
}
diff --git a/xorg-server/hw/xfree86/Makefile.am b/xorg-server/hw/xfree86/Makefile.am
index d46bf0a86..27f2cc6cb 100644
--- a/xorg-server/hw/xfree86/Makefile.am
+++ b/xorg-server/hw/xfree86/Makefile.am
@@ -106,7 +106,7 @@ if INSTALL_SETUID
endif
if SUID_WRAPPER
$(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR)
- mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.bin
+ mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg
${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg
-chown root $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap
endif
diff --git a/xorg-server/hw/xfree86/Xorg.sh.in b/xorg-server/hw/xfree86/Xorg.sh.in
index cef4859c8..481413523 100644
--- a/xorg-server/hw/xfree86/Xorg.sh.in
+++ b/xorg-server/hw/xfree86/Xorg.sh.in
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# Execute Xorg.wrap if it exists otherwise execute Xorg.bin directly.
+# Execute Xorg.wrap if it exists otherwise execute Xorg directly.
# This allows distros to put the suid wrapper in a separate package.
basedir=@SUID_WRAPPER_DIR@
if [ -x "$basedir"/Xorg.wrap ]; then
exec "$basedir"/Xorg.wrap "$@"
else
- exec "$basedir"/Xorg.bin "$@"
+ exec "$basedir"/Xorg "$@"
fi
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index c8fcd6220..0c038b3d1 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -156,6 +156,9 @@ GetScreenPrime(ScreenPtr master, int prime_id)
DRI2ScreenPtr ds;
ds = DRI2GetScreen(slave);
+ if (ds == NULL)
+ continue;
+
if (ds->prime_id == prime_id)
return slave;
}
@@ -1573,15 +1576,15 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
if (info->version == 3 || info->numDrivers == 0) {
/* Driver too old: use the old-style driverName field */
- ds->numDrivers = 1;
- ds->driverNames = malloc(sizeof(*ds->driverNames));
+ ds->numDrivers = info->driverName ? 1 : 2;
+ ds->driverNames = malloc(ds->numDrivers * sizeof(*ds->driverNames));
if (!ds->driverNames)
goto err_out;
if (info->driverName) {
ds->driverNames[0] = info->driverName;
} else {
- ds->driverNames[0] = dri2_probe_driver_name(pScreen, info);
+ ds->driverNames[0] = ds->driverNames[1] = dri2_probe_driver_name(pScreen, info);
if (!ds->driverNames[0])
return FALSE;
}
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/driver.c b/xorg-server/hw/xfree86/drivers/modesetting/driver.c
index 1ebf807e5..d52517d1a 100644
--- a/xorg-server/hw/xfree86/drivers/modesetting/driver.c
+++ b/xorg-server/hw/xfree86/drivers/modesetting/driver.c
@@ -538,6 +538,7 @@ msBlockHandler(ScreenPtr pScreen, void *pTimeout, void *pReadmask)
pScreen->BlockHandler = ms->BlockHandler;
pScreen->BlockHandler(pScreen, pTimeout, pReadmask);
+ ms->BlockHandler = pScreen->BlockHandler;
pScreen->BlockHandler = msBlockHandler;
if (pScreen->isGPU)
dispatch_slave_dirty(pScreen);
@@ -1077,6 +1078,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
if (!ms->drmmode.sw_cursor)
xf86_cursors_init(pScreen, ms->cursor_width, ms->cursor_height,
HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 |
+ HARDWARE_CURSOR_UPDATE_UNHIDDEN |
HARDWARE_CURSOR_ARGB);
/* Must force it before EnterVT, so we are in control of VT and
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.c b/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.c
index 824500bae..1ea799b3a 100644
--- a/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -82,6 +82,17 @@ drmmode_bo_get_pitch(drmmode_bo *bo)
return bo->dumb->pitch;
}
+static Bool
+drmmode_bo_has_bo(drmmode_bo *bo)
+{
+#ifdef GLAMOR_HAS_GBM
+ if (bo->gbm)
+ return TRUE;
+#endif
+
+ return bo->dumb != NULL;
+}
+
uint32_t
drmmode_bo_get_handle(drmmode_bo *bo)
{
@@ -93,6 +104,26 @@ drmmode_bo_get_handle(drmmode_bo *bo)
return bo->dumb->handle;
}
+static void *
+drmmode_bo_map(drmmode_ptr drmmode, drmmode_bo *bo)
+{
+ int ret;
+
+#ifdef GLAMOR_HAS_GBM
+ if (bo->gbm)
+ return NULL;
+#endif
+
+ if (bo->dumb->ptr)
+ return bo->dumb->ptr;
+
+ ret = dumb_bo_map(drmmode->fd, bo->dumb);
+ if (ret)
+ return NULL;
+
+ return bo->dumb->ptr;
+}
+
static Bool
drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
unsigned width, unsigned height, unsigned bpp)
@@ -509,13 +540,122 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
static void *
drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
{
- return NULL;
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ drmmode_ptr drmmode = drmmode_crtc->drmmode;
+ int ret;
+
+ if (!drmmode_create_bo(drmmode, &drmmode_crtc->rotate_bo,
+ width, height, crtc->scrn->bitsPerPixel)) {
+ xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
+ "Couldn't allocate shadow memory for rotated CRTC\n");
+ return NULL;
+ }
+
+ ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth,
+ crtc->scrn->bitsPerPixel,
+ drmmode_bo_get_pitch(&drmmode_crtc->rotate_bo),
+ drmmode_bo_get_handle(&drmmode_crtc->rotate_bo),
+ &drmmode_crtc->rotate_fb_id);
+
+ if (ret) {
+ ErrorF("failed to add rotate fb\n");
+ drmmode_bo_destroy(drmmode, &drmmode_crtc->rotate_bo);
+ return NULL;
+ }
+
+#ifdef GLAMOR_HAS_GBM
+ if (drmmode->gbm)
+ return drmmode_crtc->rotate_bo.gbm;
+#endif
+ return drmmode_crtc->rotate_bo.dumb;
+}
+
+static PixmapPtr
+drmmode_create_pixmap_header(ScreenPtr pScreen, int width, int height,
+ int depth, int bitsPerPixel, int devKind,
+ void *pPixData)
+{
+ PixmapPtr pixmap;
+
+ /* width and height of 0 means don't allocate any pixmap data */
+ pixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth, 0);
+
+ if (pixmap) {
+ if ((*pScreen->ModifyPixmapHeader)(pixmap, width, height, depth,
+ bitsPerPixel, devKind, pPixData))
+ return pixmap;
+ (*pScreen->DestroyPixmap)(pixmap);
+ }
+ return NullPixmap;
}
+static Bool
+drmmode_set_pixmap_bo(drmmode_ptr drmmode, PixmapPtr pixmap, drmmode_bo *bo);
+
static PixmapPtr
drmmode_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
{
- return NULL;
+ ScrnInfoPtr scrn = crtc->scrn;
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ drmmode_ptr drmmode = drmmode_crtc->drmmode;
+ uint32_t rotate_pitch;
+ PixmapPtr rotate_pixmap;
+ void *pPixData = NULL;
+
+ if (!data) {
+ data = drmmode_shadow_allocate(crtc, width, height);
+ if (!data) {
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+ "Couldn't allocate shadow pixmap for rotated CRTC\n");
+ return NULL;
+ }
+ }
+
+ if (!drmmode_bo_has_bo(&drmmode_crtc->rotate_bo)) {
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+ "Couldn't allocate shadow pixmap for rotated CRTC\n");
+ return NULL;
+ }
+
+ pPixData = drmmode_bo_map(drmmode, &drmmode_crtc->rotate_bo);
+ rotate_pitch = drmmode_bo_get_pitch(&drmmode_crtc->rotate_bo),
+
+ rotate_pixmap = drmmode_create_pixmap_header(scrn->pScreen,
+ width, height,
+ scrn->depth,
+ scrn->bitsPerPixel,
+ rotate_pitch,
+ pPixData);
+
+ if (rotate_pixmap == NULL) {
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+ "Couldn't allocate shadow pixmap for rotated CRTC\n");
+ return NULL;
+ }
+
+ drmmode_set_pixmap_bo(drmmode, rotate_pixmap, &drmmode_crtc->rotate_bo);
+
+ return rotate_pixmap;
+}
+
+static void
+drmmode_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
+{
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ drmmode_ptr drmmode = drmmode_crtc->drmmode;
+
+ if (rotate_pixmap) {
+ drmmode_set_pixmap_bo(drmmode, rotate_pixmap, NULL);
+ rotate_pixmap->drawable.pScreen->DestroyPixmap(rotate_pixmap);
+ }
+
+ if (data) {
+ drmModeRmFB(drmmode->fd, drmmode_crtc->rotate_fb_id);
+ drmmode_crtc->rotate_fb_id = 0;
+
+ drmmode_bo_destroy(drmmode, &drmmode_crtc->rotate_bo);
+ memset(&drmmode_crtc->rotate_bo, 0, sizeof drmmode_crtc->rotate_bo);
+ }
}
static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
@@ -532,6 +672,7 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
.set_scanout_pixmap = drmmode_set_scanout_pixmap,
.shadow_allocate = drmmode_shadow_allocate,
.shadow_create = drmmode_shadow_create,
+ .shadow_destroy = drmmode_shadow_destroy,
};
static uint32_t
@@ -1123,34 +1264,32 @@ drmmode_clones_init(ScrnInfoPtr scrn, drmmode_ptr drmmode)
}
}
-Bool
-drmmode_glamor_handle_new_screen_pixmap(drmmode_ptr drmmode)
+static Bool
+drmmode_set_pixmap_bo(drmmode_ptr drmmode, PixmapPtr pixmap, drmmode_bo *bo)
{
#ifdef GLAMOR
ScrnInfoPtr scrn = drmmode->scrn;
- ScreenPtr screen = xf86ScrnToScreen(drmmode->scrn);
- PixmapPtr screen_pixmap;
- void *gbm_bo;
if (!drmmode->glamor)
return TRUE;
-#ifdef GLAMOR_HAS_GBM
- gbm_bo = drmmode->front_bo.gbm;
- screen_pixmap = screen->GetScreenPixmap(screen);
+ if (bo == NULL) {
+ glamor_egl_destroy_textured_pixmap(pixmap);
+ return TRUE;
+ }
- if (!glamor_egl_create_textured_pixmap_from_gbm_bo(screen_pixmap, gbm_bo)) {
+#ifdef GLAMOR_HAS_GBM
+ if (!glamor_egl_create_textured_pixmap_from_gbm_bo(pixmap, bo->gbm)) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed");
return FALSE;
}
- glamor_set_screen_pixmap(screen_pixmap, NULL);
#else
- if (!glamor_egl_create_textured_screen(screen,
+ if (!glamor_egl_create_textured_pixmap(pixmap,
drmmode_bo_get_handle(&drmmode->front_bo),
scrn->displayWidth *
scrn->bitsPerPixel / 8)) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
- "glamor_egl_create_textured_screen() failed\n");
+ "glamor_egl_create_textured_pixmap() failed\n");
return FALSE;
}
#endif
@@ -1159,6 +1298,23 @@ drmmode_glamor_handle_new_screen_pixmap(drmmode_ptr drmmode)
return TRUE;
}
+Bool
+drmmode_glamor_handle_new_screen_pixmap(drmmode_ptr drmmode)
+{
+ ScreenPtr screen = xf86ScrnToScreen(drmmode->scrn);
+ PixmapPtr screen_pixmap = screen->GetScreenPixmap(screen);
+
+ if (!drmmode_set_pixmap_bo(drmmode, screen_pixmap, &drmmode->front_bo))
+ return FALSE;
+
+#ifdef GLAMOR
+ if (drmmode->glamor)
+ glamor_set_screen_pixmap(screen_pixmap, NULL);
+#endif
+
+ return TRUE;
+}
+
static Bool
drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
{
@@ -1555,17 +1711,7 @@ drmmode_create_initial_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
void *
drmmode_map_front_bo(drmmode_ptr drmmode)
{
- int ret;
-
- if (drmmode->front_bo.dumb->ptr)
- return drmmode->front_bo.dumb->ptr;
-
- ret = dumb_bo_map(drmmode->fd, drmmode->front_bo.dumb);
- if (ret)
- return NULL;
-
- return drmmode->front_bo.dumb->ptr;
-
+ return drmmode_bo_map(drmmode, &drmmode->front_bo);
}
void *
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.h b/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.h
index 66d0ca260..3a8959ac3 100644
--- a/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.h
+++ b/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.h
@@ -89,10 +89,12 @@ typedef struct {
int dpms_mode;
struct dumb_bo *cursor_bo;
Bool cursor_up;
- unsigned rotate_fb_id;
uint16_t lut_r[256], lut_g[256], lut_b[256];
DamagePtr slave_damage;
+ drmmode_bo rotate_bo;
+ unsigned rotate_fb_id;
+
/**
* @{ MSC (vblank count) handling for the PRESENT extension.
*
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/vblank.c b/xorg-server/hw/xfree86/drivers/modesetting/vblank.c
index 711f6edb3..a342662a7 100644
--- a/xorg-server/hw/xfree86/drivers/modesetting/vblank.c
+++ b/xorg-server/hw/xfree86/drivers/modesetting/vblank.c
@@ -147,20 +147,13 @@ ms_dri2_crtc_covering_drawable(DrawablePtr pDraw)
ScreenPtr pScreen = pDraw->pScreen;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
BoxRec box, crtcbox;
- xf86CrtcPtr crtc;
box.x1 = pDraw->x;
box.y1 = pDraw->y;
box.x2 = box.x1 + pDraw->width;
box.y2 = box.y1 + pDraw->height;
- crtc = ms_covering_crtc(pScrn, &box, NULL, &crtcbox);
-
- /* Make sure the CRTC is valid and this is the real front buffer */
- if (crtc != NULL && !crtc->rotatedData)
- return crtc;
-
- return NULL;
+ return ms_covering_crtc(pScrn, &box, NULL, &crtcbox);
}
static Bool
diff --git a/xorg-server/hw/xfree86/man/Xorg.wrap.man b/xorg-server/hw/xfree86/man/Xorg.wrap.man
index 58937c74b..11090f1f4 100644
--- a/xorg-server/hw/xfree86/man/Xorg.wrap.man
+++ b/xorg-server/hw/xfree86/man/Xorg.wrap.man
@@ -33,7 +33,7 @@ Xorg.wrap \- Xorg X server binary wrapper
The Xorg X server may need root rights to function properly. To start the
Xorg X server with these rights your system is using a suid root wrapper
installed as __suid_wrapper_dir__/Xorg.wrap which will execute the real
-X server which is installed as __suid_wrapper_dir__/Xorg.bin .
+X server which is installed as __suid_wrapper_dir__/Xorg.
.PP
By default Xorg.wrap will autodetect if root rights are necessary, and
if not it will drop its elevated rights before starting the real X server.
diff --git a/xorg-server/hw/xfree86/xorg-wrapper.c b/xorg-server/hw/xfree86/xorg-wrapper.c
index 4ea47331b..22e97ad5d 100644
--- a/xorg-server/hw/xfree86/xorg-wrapper.c
+++ b/xorg-server/hw/xfree86/xorg-wrapper.c
@@ -255,18 +255,18 @@ int main(int argc, char *argv[])
}
}
- snprintf(buf, sizeof(buf), "%s/Xorg.bin", SUID_WRAPPER_DIR);
+ snprintf(buf, sizeof(buf), "%s/Xorg", SUID_WRAPPER_DIR);
/* Check if the server is executable by our real uid */
if (access(buf, X_OK) != 0) {
- fprintf(stderr, "%s: Missing execute permissions for %s/Xorg.bin: %s\n",
- progname, SUID_WRAPPER_DIR, strerror(errno));
+ fprintf(stderr, "%s: Missing execute permissions for %s: %s\n",
+ progname, buf, strerror(errno));
exit(1);
}
argv[0] = buf;
(void) execv(argv[0], argv);
- fprintf(stderr, "%s: Failed to execute %s/Xorg.bin: %s\n",
- progname, SUID_WRAPPER_DIR, strerror(errno));
+ fprintf(stderr, "%s: Failed to execute %s: %s\n",
+ progname, buf, strerror(errno));
exit(1);
}
diff --git a/xorg-server/hw/xnest/Keyboard.c b/xorg-server/hw/xnest/Keyboard.c
index 2cf16246b..ee3f68e3f 100644
--- a/xorg-server/hw/xnest/Keyboard.c
+++ b/xorg-server/hw/xnest/Keyboard.c
@@ -18,6 +18,7 @@ is" without express or implied warranty.
#include <X11/X.h>
#include <X11/Xproto.h>
+#include <xcb/xcb_keysyms.h>
#include <X11/keysym.h>
#include "screenint.h"
#include "inputstr.h"
@@ -247,7 +248,11 @@ xnestUpdateModifierState(unsigned int state)
for (key = 0; key < MAP_LENGTH; key++)
if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
- if (key_is_down(pDev, key, KEY_PROCESSED))
+ if (mask == XCB_MOD_MASK_LOCK) {
+ xnestQueueKeyEvent(KeyPress, key);
+ xnestQueueKeyEvent(KeyRelease, key);
+ }
+ else if (key_is_down(pDev, key, KEY_PROCESSED))
xnestQueueKeyEvent(KeyRelease, key);
if (--count == 0)
@@ -261,6 +266,8 @@ xnestUpdateModifierState(unsigned int state)
for (key = 0; key < MAP_LENGTH; key++)
if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
xnestQueueKeyEvent(KeyPress, key);
+ if (mask == XCB_MOD_MASK_LOCK)
+ xnestQueueKeyEvent(KeyRelease, key);
break;
}
}
diff --git a/xorg-server/hw/xwayland/Makefile.am b/xorg-server/hw/xwayland/Makefile.am
index 4e0e1bb00..994554088 100644
--- a/xorg-server/hw/xwayland/Makefile.am
+++ b/xorg-server/hw/xwayland/Makefile.am
@@ -26,7 +26,6 @@ Xwayland_LDADD = \
$(XWAYLAND_LIBS) \
$(XWAYLAND_SYS_LIBS) \
$(XSERVER_SYS_LIBS)
-Xwayland_DEPENDENCIES = $(XWAYLAND_LIBS)
Xwayland_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
diff --git a/xorg-server/hw/xwayland/xwayland-glamor.c b/xorg-server/hw/xwayland/xwayland-glamor.c
index 09b454f8a..dd8551840 100644
--- a/xorg-server/hw/xwayland/xwayland-glamor.c
+++ b/xorg-server/hw/xwayland/xwayland-glamor.c
@@ -137,6 +137,9 @@ xwl_glamor_create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo, int depth)
glGenTextures(1, &xwl_pixmap->texture);
glBindTexture(GL_TEXTURE_2D, xwl_pixmap->texture);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+
glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, xwl_pixmap->image);
glBindTexture(GL_TEXTURE_2D, 0);
diff --git a/xorg-server/hw/xwayland/xwayland.c b/xorg-server/hw/xwayland/xwayland.c
index 37d6d8270..7e8d667d6 100644
--- a/xorg-server/hw/xwayland/xwayland.c
+++ b/xorg-server/hw/xwayland/xwayland.c
@@ -513,9 +513,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
int ret, bpc, green_bpc, i;
xwl_screen = calloc(sizeof *xwl_screen, 1);
- xwl_screen->wm_fd = -1;
if (xwl_screen == NULL)
return FALSE;
+ xwl_screen->wm_fd = -1;
if (!dixRegisterPrivateKey(&xwl_screen_private_key, PRIVATE_SCREEN, 0))
return FALSE;