summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-03-24glamor: Create inline tests for small/large pixmapsKeith Packard9-96/+103
This will let us eliminate the pixmap types shortly Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: Eliminate separate 'large' pixmap private structureKeith Packard15-196/+176
Just embed the large elements in the regular pixmap private and collapse the union to a single struct. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: Remove unused glamor_pixmap_private_atlas_tKeith Packard1-12/+0
Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: Remove screen private and pixmap ptrs from pixmap private and fboKeith Packard11-297/+345
There's no reason to waste memory storing redundant copies of the same pointer all over the system; just pass in pointers as necessary to each function. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: Remove remaining support for FBOs not matching pixmap sizeKeith Packard5-122/+15
The core rendering code already requires that FBOs be allocated at exactly the pixmap size so that tiling and stippling work correctly. Remove the allocation support for that, along with the render code. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: Eliminate GLAMOR_TEXTURE_PACK pixmap typeKeith Packard1-2/+1
This is not used anywhere Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: Eliminate GLAMOR_SEPARATE_TEXTURE pixmap typeKeith Packard2-11/+0
This was only used to signal when we couldn't ask the DDX to draw to a pixmap; now that we have no DDX-based fallbacks, we don't need to have this type. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: Remove ddx fallback check functionsKeith Packard1-34/+0
With no DDX-based fallback support, we can remove these functions as they are no longer called. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: Remove _nf rendering functionsKeith Packard18-581/+29
These were used by the non-standard glamor implementation in the intel driver. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: Eliminate GLAMOR_USE_SCREEN and GLAMOR_USE_PICTURE_SCREENKeith Packard5-98/+55
Remove these defines as we start to remove support for non-standard glamor layering as used by the intel driver. v2: Rebase on the blockhandler change and the Xephyr init failure change (by anholt), fix stray NO_DRI3 addition to xwayland. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: Eliminate GLAMOR_CREATE_PIXMAP_MAP and GLAMOR_MEMORY_MAPKeith Packard3-18/+1
GLAMOR_MEMORY_MAP was only used with GLAMOR_CREATE_PIXMAP_MAP, and GLAMOR_CREATE_PIXMAP_MAP doesn't appear to be used anywhere, so just remove both of them. v2: Fix a stray whitespace bug that was introduced (change by anholt). Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: GL_TEXTURE_MAX_LEVEL is not available on GLES2Maarten Lankhorst3-3/+0
Remove the calls to GL_TEXTURE_MAX_LEVEL. Setting the filtering is a sufficient hint to the driver about texture mipmap allocation. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-03-24glamor: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFERMaarten Lankhorst2-2/+2
The latter might not be available on GLES2. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: do not check for gl errors in glamor_build_programMaarten Lankhorst1-3/+0
According to Eric Anholt the check for glGetError is not needed here. Because a opengl error might be set before this function is called keeping the check could result in glamor_build_program returning failure when building the shader succeeded. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24glamor: only use (un)pack_subimage when availableMaarten Lankhorst3-19/+46
Check for GL_EXT_unpack_subimage and GL_NV_pack_subimage to check if GL_(UN)PACK_ROW_LENGTH is available. Set the offsets manually to prevent calls to GL_(UN)PACK_SKIP_*. v2: Check support for GL_NV_pack_subimage as suggested by Matt Turner. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24xwayland: Add dependency on glamor libsOlivier Fourdan1-0/+1
So that Xwayland gets re-linked each time glamor is modified. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24ephyr: Fail if glamor is requested but not usableOlivier Fourdan1-3/+6
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-13int10: Fix error check for pci_device_map_legacyJürg Billeter2-2/+2
pci_device_map_legacy returns 0 on success. Signed-off-by: Jürg Billeter <j@bitron.ch> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-13symbols: Fix sdksyms.sh to cope with gcc5Egbert Eich1-1/+13
Gcc5 adds additional lines stating line numbers before and after __attribute__() which need to be skipped. Signed-off-by: Egbert Eich <eich@freedesktop.org> Tested-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-13Clear ListenTransConns entries in CloseWellKnownConnectionsAlan Coopersmith1-2/+7
Since _XSERVTransClose frees the connection pointer passed to it, remove that pointer from the array, so we don't try to double free it if we come back into CloseWellKnownConnections again. Should fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=6665 in which the shutdown section of the main() loop called CloseWellKnownConnections() and then moved on to ddxGiveUp(), which failed to release the VT and thus called AbortServer(), which called CloseWellKnownConnections() again. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-13autogen.sh: use quoted string variablesEmil Velikov1-4/+4
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent fall-outs, when they contain space. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-13Expose GetMaster to modules.Michal Srb1-1/+1
Add _X_EXPORT to GetMaster function. It is required by tigervnc's VNC module. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-03-13Drop valuator mask argument from GetKeyboardEventsPeter Hutterer14-107/+31
Nothing was using it and if anyone had they would've gotten a warning and noticed that it doesn't actually work. Drop this, it has been unused for years. Input ABI 22 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2015-03-13os/access: fix regression in server interpreted authDave Airlie1-1/+1
This was reported on irc on Fedora when rawhide went to 1.17.1. regression occured in: 2566835b4374edb3e5a8353d4f7c9e7ec4851c57 os: Eliminate uninitialized value warnings from access.c siAddrMatch doesn't need addr to be a useful value, it checks some things like localuser without having an address at all. Signed-off-by: Dave Airlie <airlied@redhat.com> Tested-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-10Mark development version for 1.18Keith Packard1-1/+1
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: include header for DMXExtensionInit() in dmx.cAlan Coopersmith1-0/+1
Gets rid of gcc 4.8 warning: dmx.c:1193:1: warning: no previous prototype for ‘DMXExtensionInit’ [-Wmissing-prototypes] DMXExtensionInit(void) ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: constify GCOps & GCFuncs pointersAlan Coopersmith2-4/+4
Gets rid of 16 instances of gcc 4.8 warnings: In file included from dmxgc.c:41:0: dmx.h:327:23: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] (_saved)->_entry = (_actual)->_entry; \ ^ dmxgc.h:80:5: note: in expansion of macro ‘DMX_WRAP’ DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC)); \ ^ dmxgc.c:192:5: note: in expansion of macro ‘DMX_GC_FUNC_EPILOGUE’ DMX_GC_FUNC_EPILOGUE(pGC); ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: Mark glxIsExtensionSupported as a const char *Alan Coopersmith2-2/+2
Gets rid of 9 instances of gcc 4.8 warning: glxcmds.c: In function ‘CreateContext’: glxcmds.c:378:13: warning: passing argument 1 of ‘glxIsExtensionSupported’ discards ‘const’ qualifier from pointer target type [enabled by default] else if (glxIsExtensionSupported("GLX_SGIX_fbconfig")) { ^ In file included from glxserver.h:49:0, from glxcmds.c:41: glxscreens.h:53:12: note: expected ‘char *’ but argument is of type ‘const char *’ extern int glxIsExtensionSupported(char *ext); Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: remove redundant redeclarations of variables from other headersAlan Coopersmith2-4/+0
Gets rid of these gcc 4.8 warnings: dmxcb.c:50:12: warning: redundant redeclaration of ‘PanoramiXPixWidth’ [-Wredundant-decls] extern int PanoramiXPixWidth; ^ In file included from dmxcb.c:49:0: ../../Xext/panoramiXsrv.h:12:22: note: previous declaration of ‘PanoramiXPixWidth’ was here extern _X_EXPORT int PanoramiXPixWidth; ^ dmxcb.c:51:12: warning: redundant redeclaration of ‘PanoramiXPixHeight’ [-Wredundant-decls] extern int PanoramiXPixHeight; ^ In file included from dmxcb.c:49:0: ../../Xext/panoramiXsrv.h:13:22: note: previous declaration of ‘PanoramiXPixHeight’ was here extern _X_EXPORT int PanoramiXPixHeight; ^ dmxcb.c:52:12: warning: redundant redeclaration of ‘PanoramiXNumScreens’ [-Wredundant-decls] extern int PanoramiXNumScreens; ^ In file included from dmxcb.c:49:0: ../../Xext/panoramiXsrv.h:11:22: note: previous declaration of ‘PanoramiXNumScreens’ was here extern _X_EXPORT int PanoramiXNumScreens; ^ dmxpict.c:60:12: warning: redundant redeclaration of ‘RenderErrBase’ [-Wredundant-decls] extern int RenderErrBase; ^ In file included from ../../render/glyphstr.h:29:0, from ../../render/picturestr.h:28, from dmx.h:65, from dmxpict.c:42: ../../render/picture.h:176:22: note: previous declaration of ‘RenderErrBase’ was here extern _X_EXPORT int RenderErrBase; ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: remove redundant declaration of dmxFontPrivateIndex from dmxfont.hAlan Coopersmith1-2/+0
Gets rid of 8 instances of gcc 4.8 warning: In file included from glxcmds.c:38:0: ../../../hw/dmx/dmxfont.h:57:12: warning: redundant redeclaration of ‘dmxFontPrivateIndex’ [-Wredundant-decls] extern int dmxFontPrivateIndex; ^ In file included from glxcmds.c:35:0: ../../../hw/dmx/dmx.h:388:12: note: previous declaration of ‘dmxFontPrivateIndex’ was here extern int dmxFontPrivateIndex; /**< Private index for Fonts */ ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: glxproxy prototype cleanupAlan Coopersmith12-27/+41
Gets rid of 107 -Wmissing-prototypes & -Wredundant-decls warnings from gcc 4.8 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: more unshadowing of variablesAlan Coopersmith3-10/+10
Gets rid of gcc 4.8 warnings: dmxinputinit.c: In function ‘dmxInputScanForExtensions’: dmxinputinit.c:877:14: warning: declaration of ‘display’ shadows a global declaration [-Wshadow] Display *display; ^ In file included from ../../../include/windowstr.h:60:0, from dmxinputinit.c:72: ../../../include/opaque.h:52:30: warning: shadowed declaration is here [-Wshadow] extern _X_EXPORT const char *display; ^ glxcmds.c: In function ‘__glXCreatePbuffer’: glxcmds.c:3397:21: warning: declaration of ‘pc’ shadows a parameter [-Wshadow] CARD32 *pc = (CARD32 *) (be_req + 1); ^ glxcmds.c:3314:52: warning: shadowed declaration is here [-Wshadow] __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc) ^ glxscreens.c: In function ‘CalcServerVersionAndExtensions’: glxscreens.c:139:35: warning: declaration of ‘req’ shadows a previous local [-Wshadow] xGLXQueryServerStringReq *req; ^ glxscreens.c:68:26: warning: shadowed declaration is here [-Wshadow] xGLXQueryVersionReq *req; ^ glxscreens.c:140:36: warning: declaration of ‘reply’ shadows a previous local [-Wshadow] xGLXQueryServerStringReply reply; ^ glxscreens.c:69:27: warning: shadowed declaration is here [-Wshadow] xGLXQueryVersionReply reply; ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: attempt to untangle nested loops using same index variableAlan Coopersmith1-15/+15
This doesn't just make gcc sad, it makes my brain sad. Change from: for (i = 0; i < dmxNumScreens; i++) { int i; for (i = 0; i < nconfigs; i++) { for (j = 0; j < dmxScreen->beNumVisuals; j++) { to the easier to follow: for (i = 0; i < dmxNumScreens; i++) { for (j = 0; j < nconfigs; j++) { for (k = 0; k < dmxScreen->beNumVisuals; k++) { Gets rid of gcc 4.8 warning: dmxinit.c: In function ‘InitOutput’: dmxinit.c:765:17: warning: declaration of ‘i’ shadows a previous local [-Wshadow] int i; ^ dmxinit.c:608:9: warning: shadowed declaration is here [-Wshadow] int i; ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: remove unused variablesAlan Coopersmith2-5/+0
Gets rid of gcc 4.8 warnings: dmxscrinit.c: In function ‘dmxBEScreenInit’: dmxscrinit.c:83:15: warning: unused variable ‘gcvals’ [-Wunused-variable] XGCValues gcvals; ^ dmxwindow.c: In function ‘dmxResizeWindow’: dmxwindow.c:860:19: warning: variable ‘pSibPriv’ set but not used [-Wunused-but-set-variable] dmxWinPrivPtr pSibPriv; ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: fix printf format argument warningsAlan Coopersmith2-9/+9
Gets rid of these gcc 4.8 warnings: dmxinit.c: In function ‘dmxErrorHandler’: dmxinit.c:167:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:171:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:175:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:181:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] ev->serial); ^ dmxinit.c:183:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] dpy->request); ^ dmxinit.c: In function ‘InitOutput’: dmxinit.c:637:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] dmxLog(dmxInfo, "Generation: %d\n", dmxGeneration); ^ dmxprop.c: In function ‘dmxPropertyCheckOtherWindows’: dmxprop.c:223:24: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘Window’ [-Wformat=] dmxScreen->name, win, tp.value); ^ dmxprop.c: In function ‘dmxPropertyWindow’: dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘Window’ [-Wformat=] other->index, other->name, other->scrnWin); ^ dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘Window’ [-Wformat=] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: move format strings inline so gcc can checkAlan Coopersmith1-15/+3
Gets rid of gcc 4.8 warnings: dmxprint.c: In function ‘dmxConfigPrintPair’: dmxprint.c:284:25: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] p->ysign < 0 ? '-' : '+', p->y); ^ dmxprint.c:289:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y); ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10dmx: Add _X_ATTRIBUTE_PRINTF to dmxConfigLog() & dmxConfigOutput()Alan Coopersmith2-2/+3
Gets rid of gcc 4.8 warnings: dmxparse.c: In function ‘dmxConfigLog’: dmxparse.c:61:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] vprintf(format, args); /* RATS: All calls to dmxConfigLog from ^ dmxprint.c: In function ‘dmxConfigOutput’: dmxprint.c:149:9: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] pos += vfprintf(str, format, args); /* assumes no newlines! */ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10Get rid of const warnings in XSERVER_INPUT_EVENT dtrace probe callsAlan Coopersmith8-31/+53
Use typedefs to work around dtrace dropping const qualifiers from probe arguments when generating Xserver-dtrace.h. Add new probes.h header to avoid having to replicate these typedefs in every file with dtrace probes. Gets rid of these warnings from gcc 4.8: getevents.c:1096:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' discards 'const' qualifier from pointer target type [enabled by default] getevents.c:1096:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1651:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1651:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1791:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1791:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1921:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1921:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-10xkb: Check strings length against request sizeOlivier Fourdan1-25/+40
Ensure that the given strings length in an XkbSetGeometry request remain within the limits of the size of the request. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-10xkb: Don't swap XkbSetGeometry data in the input bufferOlivier Fourdan1-16/+19
The XkbSetGeometry request embeds data which needs to be swapped when the server and the client have different endianess. _XkbSetGeometry() invokes functions that swap these data directly in the input buffer. However, ProcXkbSetGeometry() may call _XkbSetGeometry() more than once (if there is more than one keyboard), thus causing on swapped clients the same data to be swapped twice in memory, further causing a server crash because the strings lengths on the second time are way off bounds. To allow _XkbSetGeometry() to run reliably more than once with swapped clients, do not swap the data in the buffer, use variables instead. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-02-02Update to version 1.17.0Keith Packard1-3/+3
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-01-30config/udev: Respect seat assignments when assigned devicesDave Airlie1-9/+21
Jonathan Dieter posted a few patches to do this inside the Xorg server but it makes no sense to do it there, just have the code we use to probe the device list at startup check seat assignments using the same code we check at hotplug time. Bugilla: https://bugzilla.redhat.com/show_bug.cgi?id=1183654 Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Jonathan Dieter <jdieter@lesbg.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-01-26randr: attempt to fix primary on slave output (v2)Dave Airlie3-7/+33
If the user wants to set one of the slave devices as the primary output, we shouldn't fail to do so, we were returning BadMatch which was tripping up gnome-settings-daemon and bad things ensues. Fix all the places we use primaryOutput to work out primaryCrtc and take it into a/c when slave gpus are in use. v2: review from Aaron, fix indent, unhide has_primary from macro. I left the int vs Bool alone to be consistent with code below, a future patch could fix both. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-01-26dri2: Set vdpau driver name if ddx does not provide any driver nameAdel Gadllah1-3/+3
Currently when the ddx does not set any driver name we set DRI2 driver but not the VDPAU driver name. The result is that VDPAU drivers will not get found by libvdpau when the modesetting driver is being used. Just assume that the VDPAU driver matches the DRI2 driver name, this is true for nouveau, r300, r600 and radeonsi i.e all VDPAU drivers currently supported by mesa. Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-01-26os: Fix timer race conditionsNikhil Mahale1-15/+26
Fixing following kind of race-conditions - WaitForSomething() | ----> // timers -> timer-1 -> timer-2 -> null while (timers && (int) (timers->expires - now) <= 0) // prototype - DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev) DoTimer(timers, now, &timers) | | ----> OsBlockSignals(); .... OS Signal comes just before blocking it, .... timer-1 handler gets called. // timer-1 gets served and scheduled again; // timers -> timer-2 -> timer-1 -> null .... *prev = timer->next; timer->next = NULL; // timers -> null // timers list gets corrupted here and timer-2 gets removed from list. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=86288 Signed-off-by: Nikhil Mahale <nmahale@nvidia.com> Reviewed-by: Julien Cristau <jcristau@debian.org> v2: Apply warning fixes from Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-01-23Update to version 1.16.99.902Keith Packard1-3/+3
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-01-23modesetting: Return the crtc for a drawable even if it's rotatedJason Ekstrand1-8/+1
All of our checks for what crtc we are on take rotation into account so we select the correct crtc. The only problem is that we weren't returning it we were rotated. This caused X to think DRI3 apps were not on any crtc and limit them to 1 FPS. Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-01-23modesetting: Add support for using RandR shadow buffersJason Ekstrand2-3/+115
This replaces the stubs for shadow buffer creation/allocation with actual functions and adds a shadow_destroy function. With this, we actually get shadow buffers and RandR now works properly. Most of this is copied from the xf86-video-intel driver and modified for modesetting. v2 Jason Ekstrand <jason.ekstrand@intel.com>: - Fix build with --disable-glamor - Set the pixel data pointer in the pixmap header for dumb shadow bo's - Call drmmode_create_bo with the right bpp v2 Jason Ekstrand <jason.ekstrand@intel.com>: - Make shadow buffers per-crtc and leave shadow_enable alone Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-01-23modesetting: Add drmmode_bo_has_bo and drmmode_bo_map helper functionJason Ekstrand1-11/+32
Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-01-23modesetting: Refactor drmmode_glamor_new_screen_pixmapJason Ekstrand1-12/+27
The original drmmode_glamor_new_screen_pixmap function was specific to the primary screen pixmap. This commit pulls the guts out into a new, more general, drmmode_set_pixmap_bo function for setting a buffer on a pixmap. The new function also properly tears down the glamor bits if the buffer being set is NULL. The drmmode_glamor_new_screen_pixmap function is now just a 3-line wrapper around drmmode_set_pixmap_bo. v2 Jason Ekstrand <jason.ekstrand@intel.com>: - Re-arranged code in drmmode_set_pixmap_bo and drmmode_glamor_handle_new_screen_pixmap so that glamor_set_screen_pixmap only gets called for the screen pixmap - Guard the call to glamor_set_screen_pixmapa with a drmmode->glamor check Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>