summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-04-19HACK-but-turning-less-crap-than-before: dix: fix logging orderclient-loggingTiago Vignatti1-11/+5
if we are not interested on the time spent for each protocol call, then we can fix the ordering issue. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2011-04-19HACK: dix: log X events and replies workload from the serverTiago Vignatti1-0/+28
Co-authored-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2011-04-19HACK: dix: log the server incoming workloadTiago Vignatti3-3/+55
It logs X11 requests and their time spent being processed, writing in a file (xserver-requests.txt). Also the input processing is recorded and tagged as INPUTPROCESSING. So basically everything that generates some workload within the server is logged and this can be used for getting statistics, characterization and other fruitful information. X registry code is used to get the name, parsing protocol.txt. TODO: record extension provides the framework for logging (they like to call "recording") protocol requests and other things on the server. I was lazy to check whether it actually could be used here and went quickly hack the server instead. Also cnee seems currently tied with the core protocol only and doesn't record extensions. Co-authored-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2011-04-19dix: remove dead extensions to protocol.txtTiago Vignatti1-59/+0
lbx and mbe. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2011-04-19dix: update DRI2 requests and events to protocol.txtTiago Vignatti1-0/+7
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2011-04-14dri2: Pass out_count by value to update_dri2_drawable_buffers()Ville Syrjälä1-4/+4
update_dri2_drawable_buffers() doesn't modify out_count, so pass it by value. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-04-14dri2: Handle calloc() failureVille Syrjälä1-5/+9
Don't access invalid memory if calloc() fails to allocate the buffers array. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-04-13Send events that were missing from RRSelectInputJeremy Huddleston1-2/+30
The RANDR spec (randrproto.txt) specifies that RRSelectInput will send out events corresponding to the event mask, if there have been changes to CRTCs or outputs. Only screen events were being generated, however. Fixes http://bugs.freedesktop.org/21760 Signed-off-by: Federico Mena Quintero <federico@novell.com> Reviewd-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-04-13damage: use DamageReportDamage for the initial borderClip damage reportErkki Seppälä3-51/+56
Instead of using DamageDamageRegion for reporting the first (virtual) damage in ProcDamageCreate that covers the borderClip of the drawable window, use a function DamageReportDamage directly (previously called damageReportDamage). This avoids sending all other damage listeners a full window update when a new damage object is created. As this patch makes DamageReportDamage a public interface, the function has been moved into the part of the file that contains all the other public functions. The function has not been otherwise modified. Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-04-07dix: don't free stranger pointers inside AllocARGBCursorTiago Vignatti3-10/+19
This seems a good convention to follow: if pointers are allocate outside a given function, then free there as well when a failure occurs. AllocARGBCursor and its callers were mixing up the freeing of resources and causing a particular double free inside TileScreenSaver (srcbits and mskbits). Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
2011-04-07os: fix use after free in EstablishNewConnectionsTiago Vignatti1-4/+3
In the case of failure on AllocNewConnection, new_trans_conn cannot be dereferenced because it's already freed. Swapping the order of this logic fix the changes introduced in 04956b80431169e0ae713a3e6ba4cdc157ce3a66. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> CC: Jeremy Huddleston <jeremyhu@freedesktop.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-07xfree86: xv: set pointers to NULL in xf86XVFreeAdaptorTiago Vignatti1-0/+6
As a good practice and for eventual double frees. The reason of this patch is due the resilience of xf86XVInitAdaptors, where for any adaptor failure it's able to keep trying registering the following ones. I discussed briefly with Pauli and Ville about a bigger refactoring of such function, doing it in a way to return instantly when a failure happens; after all that's how mostly of the other driver functions work. Instead, we just thought that xf86XVInitAdaptors is wise and cool, and eventually other driver functions should be even following the main idea of resilience. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-07xfree86: xv: fix double free in xf86XVFreeAdaptorTiago Vignatti1-1/+2
When xf86XVFreeAdaptor is called more than once in xf86XVInitAdaptors (it may, but not often), the conditional being changed in this patch will always take true path and will keep freeing pAdaptor->pAttributes, thus letting the system error-prone. This patch fix such problem checking for a pointer instead the number of attributes. Such pointer will be deallocated when xf86XVFreeAdaptor is called first and will not let the code re-run in the following calls. This is a bit similar how the surroundings code is already doing. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-07xfree86: loader: use one exit code only for readabilityTiago Vignatti1-20/+12
No functional changes. Spaghetti code for the win! \o/ Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-04-07Xext: use EXT_MASK macro instead of manual & 0x7fHEADmasterPeter Hutterer1-4/+5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-07Fix unset valuator handling for XI 1.x valuator events againChase Douglas2-9/+9
Set the valuator values for unset masked absolute valuators in the internal device event. This ensures the values will always be correct in getValuatorEvents even if the device has been removed. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-06Merge remote-tracking branch 'jturney/master'Keith Packard1-1/+1
2011-04-04Merge remote-tracking branch 'vignatti/for-keith'Keith Packard23-89/+92
2011-04-04render: fix memory leaks in ProcRenderCompositeGlyphsTiago Vignatti1-13/+12
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Soren Sandmann <ssp@redhat.com>
2011-04-04xkb: fix fd leak in XkbDDXListComponentTiago Vignatti1-1/+3
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-04-04dix: fix memory leak in ProcListExtensionsTiago Vignatti1-3/+2
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-04-04mi: fix memory leak in miZeroLineTiago Vignatti1-2/+4
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-04-04xi: fix memory leak in AddExtensionClientTiago Vignatti1-2/+6
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-04-04dix: fix memory leak in AllocSharedTiago Vignatti1-0/+1
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-04-04dix: fix memory leak in AllocPseudoTiago Vignatti1-0/+1
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-04-04os: fix memory and fd leaks in PopenTiago Vignatti1-0/+3
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-04-04os: use DebugF for debuggingTiago Vignatti1-14/+4
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-04-04xfree86: fix memory leak in xf86LoadModulesTiago Vignatti1-1/+3
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04xfree86: fix bad free configInputDevicesTiago Vignatti1-1/+2
introduced in 93ca526892c0d22afa05cce6496198c652043a19. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04xfree86: fix memory leaks in configLayoutTiago Vignatti1-6/+19
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04xfree86: fix memory leak in xf86ConfigFbEntityTiago Vignatti1-0/+1
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04fb: fix memory leak in fbOverlayFinishScreenInitTiago Vignatti1-2/+6
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04Xi: fix memory leak in ProcXGetSelectedExtensionEventsTiago Vignatti1-1/+1
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04dix: fix memory leak in SetDefaultFontPathTiago Vignatti1-1/+3
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04mi: fix memory leak in miFillUniqueSpanGroupTiago Vignatti1-0/+2
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04xi: fix memory leak in ProcXIQueryDeviceTiago Vignatti1-1/+3
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04mi: fix memory leak in miInitVisualsTiago Vignatti2-4/+2
Free the pointers inside miInitVisuals, so the callers of this function (fboverlay.c and fbscreen.c) don't need to worry with deallocation in the case of failure. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04xfree86: dri2: fix memory leak and free resources properlyTiago Vignatti1-2/+7
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04xorg: remove unused pointer values all over the serverTiago Vignatti7-21/+7
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04dix: remove unused macroTiago Vignatti1-2/+0
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04dix: remove unused debug codeTiago Vignatti1-12/+0
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04Merge branch 'master' of git://people.freedesktop.org/~herrb/xserver into ↵Peter Hutterer64-7948/+259
for-keith
2011-04-04xfree86: loader: fix memory leaks in LoaderListDirsTiago Vignatti1-0/+6
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04xkb: Prevent leaking of XKB geometry information on copy.Rami Ylimäki1-5/+3
Currently shapes, sections and doodads may leak on copy. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04xkb: Introduce helper function to handle similar reallocations.Rami Ylimäki3-94/+111
This is preparation for a memory leak fix and doesn't contain any functional changes. Note that two variables are generally used for reallocation and clearing of arrays: geom->sz_elems (reallocation) and geom->num_elems (clearing). The interface of XkbGeomRealloc is deliberately kept simple and it only accepts geom->sz_elems as argument, because that is needed to determine whether the array needs to be resized. When the array is cleared, we just assume that either geom->sz_elems and geom->num_elems are synchronized to be equal or that unused elements are cleared whenever geom->num_elems is set to be less than geom->sz_elems without reallocation. Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04Don't report old relative values in getValuatorEventsChase Douglas1-1/+3
Relative valuator values should not be reported in any future events. If a relative valuator value is not set in an internal event, set the value to 0 for XI 1.x valuator events sent over the wire. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04Handle non continuous valuator data in getValuatorEventsChase Douglas1-4/+7
This allows for masked valuators to be handled properly in XI 1.x events. Any unset valuators in the device event are set to the last known value when transmitted on the wire through XI 1.x valuator events. Fixes https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/736500 Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-02Xi: fix querydevice request swappingMatthieu Herrb1-1/+2
WriteReplyToClient() swaps rep.length, so it can't be used on return of WriteReplyToClient(). So save it's value for later use. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-04-02Xext: fix test on extension number for the swapped case.Matthieu Herrb1-1/+1
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-04-02Xi: add XI_Focus{In,Out} to swapped events.Matthieu Herrb1-0/+2
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org>