[PULL 1.12] logging and XIQueryPointer fixes

2012-05-14 Thread Peter Hutterer
As Julien pointed out, Daniel's logging fixes fix CVE-2012-2118. The other two fixes are for the XIQueryPointer return values to be protocol-correct (i.e. send logical, not physical button state). The following changes since commit 90299556db24543bb7365e8c2897deca3aa219e7: dix: when disabling

[PATCH xinput] Add --enable/--disable support

2012-05-14 Thread Peter Hutterer
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- I got sick of typing 'xinput set-prop foo Device Enabled 0' src/property.c | 14 ++ src/xinput.c | 10 ++ src/xinput.h |2 ++ 3 files changed, 26 insertions(+) diff --git a/src/property.c b/src/property.c

[PATCH] xfree86: use udev to provide device enumeration for kms devices (v4

2012-05-14 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com On Linux in order for future hotplug work, we are required to interface to udev to detect device creation/removal. In order to try and get some earlier testing on this, this patch adds the ability to use udev for device enumeration on Linux. At startup the

Re: [PATCH 1/4] Fix redundant declaration of RRTransformCompute()

2012-05-14 Thread Dave Airlie
On Fri, Jan 27, 2012 at 3:55 PM, Jon TURNEY jon.tur...@dronecode.org.uk wrote: randrstr.h:612:1: warning: redundant redeclaration of 'RRTransformCompute' [-Wredundant-decls] rrtransform.h:63:1: note: previous declaration of 'RRTransformCompute' was here randrstr.h includes rrtransform.h,

[PATCHES] resent - xserver -remove redundant declarations

2012-05-14 Thread Michal Suchanek
Hello, since I cannot send bulk email you can review the following patches in this branch: http://repo.or.cz/w/xserver/hramrach.git/shortlog/refs/heads/noredecl branch noredecl of git://repo.or.cz/xserver/hramrach.git 0001-Xext-remove-redundant-declarations.patch

Re: first set of new APIs + convert server to use them

2012-05-14 Thread Dave Airlie
On Sat, May 5, 2012 at 9:49 AM, Dave Airlie airl...@gmail.com wrote: This set of patches provides new APIs for converting scrn-screen and vice versa, and converts most of the low-hanging fruit in the X server to use them. Further changes are needed, but it would be good to get started, and we

[PATCH 1/4] xf86/modes: drop two uses of screenInfo

2012-05-14 Thread Dave Airlie
Just use new macros to access scrn-screen. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/modes/xf86RandR12.c |2 +- hw/xfree86/modes/xf86Rotate.c |4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/modes/xf86RandR12.c

[PATCH 3/4] xf86/modes: drop more pScrn-pScreen usages

2012-05-14 Thread Dave Airlie
Just simple conversion to use the lookup function. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/modes/xf86Rotate.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index 7fdff91..26eefc8

convert some more users to the screen conversion functions.

2012-05-14 Thread Dave Airlie
These are just some more simple patches to move to using the Screen-Scrn and Scrn-Screen conversion functions in various parts of the server. The last is an API change but should be fine from ABI pov. These are last set of patches before major ABI breakage set. Dave.

[PATCH 2/4] xaa: convert pScrn-pScreen to use accessor.

2012-05-14 Thread Dave Airlie
This uses a standard conversion function to do the conversion. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/xaa/xaaInit.c |2 +- hw/xfree86/xaa/xaaPCache.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/xaa/xaaInit.c

[PATCH 4/4] xf86: reimplement XF86SCRNINFO macro using new functions.

2012-05-14 Thread Dave Airlie
This macro did lookups via privates but we can just use the ScreenToScrn conversion instead. This patch drops all in-server uses, we should drop the macro later, once drivers have been converted to not use it. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86.h |

Re: [PATCHES] resent - xserver -remove redundant declarations

2012-05-14 Thread Dave Airlie
On Mon, May 14, 2012 at 10:34 AM, Michal Suchanek hramr...@gmail.com wrote: Hello, since I cannot send bulk email you can review the following patches in this branch: http://repo.or.cz/w/xserver/hramrach.git/shortlog/refs/heads/noredecl branch noredecl of

pull request for airlied/redunant-cleanups-1

2012-05-14 Thread Dave Airlie
Hi Keith, I've pulled some of Michal's patches from his repo, reviewed them and stuck them in a tree, he has quite a few more, but these were the lower hanging fruit, Dave. The following changes since commit 3a94b338aaa48b656aae1bb3a5a9d64300c0a093: Merge remote-tracking branch

Re: [PATCHES] resent - xserver -remove redundant declarations

2012-05-14 Thread Michal Suchanek
On 14 May 2012 14:37, Dave Airlie airl...@gmail.com wrote: On Mon, May 14, 2012 at 10:34 AM, Michal Suchanek hramr...@gmail.com wrote: Hello, since I cannot send bulk email you can review the following patches in this branch:

Re: [PATCHES] resent - xserver -remove redundant declarations

2012-05-14 Thread Dave Airlie
On Mon, May 14, 2012 at 4:07 PM, Michal Suchanek hramr...@gmail.com wrote: On 14 May 2012 14:37, Dave Airlie airl...@gmail.com wrote: On Mon, May 14, 2012 at 10:34 AM, Michal Suchanek hramr...@gmail.com wrote: Hello, since I cannot send bulk email you can review the following patches in this

Re: [PATCH xinput] Add --enable/--disable support

2012-05-14 Thread Chase Douglas
On 05/14/2012 12:29 AM, Peter Hutterer wrote: Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- I got sick of typing 'xinput set-prop foo Device Enabled 0' src/property.c | 14 ++ src/xinput.c | 10 ++ src/xinput.h |2 ++ 3 files changed, 26

Re: [PATCH 02/02] dri2: Add DRI2GetParam request

2012-05-14 Thread Kristian Høgsberg
On Thu, May 10, 2012 at 3:04 AM, Chad Versace chad.vers...@linux.intel.com wrote: Bump dri2proto dependency to 2.7. Bump DRI2INFOREC_VERSION to 7. This new protocol request effectively allows clients to perform feature detection on the DDX. The request was added in DRI2 protocol 1.4. If I

Re: [PATCH] xfree86: use udev to provide device enumeration for kms devices (v4

2012-05-14 Thread James Cloos
Has anyone tested to determine whether this Does The Right Thing on systems which use mdev (from busybox) instead of udev? I don't have the resources to test it here. -JimC -- James Cloos cl...@jhcloos.com OpenPGP: 1024D/ED7DAEA6 ___

no more indexes - clean up API

2012-05-14 Thread Dave Airlie
The screen/scrninfo APIs are very into passing index values, that are then immediately used to lookup a global array, this is not an API, its whatever the opposite is. This set of patches changes all the API passing of screen indices (apart from the logging functions). It seriously breaks the

[PATCH 01/19] xserver: remove index from CloseScreen (API/ABI breakage)

2012-05-14 Thread Dave Airlie
This drops the index from the CloseScreen callback, its always been useless really, since the pScreen contains it. Signed-off-by: Dave Airlie airl...@redhat.com --- Xext/panoramiX.c |4 ++-- Xext/shm.c |4 ++-- Xext/xvdix.h

[PATCH 02/19] xserver: convert block/wakeup handlers to passing ScreenPtr (ABI/API break)

2012-05-14 Thread Dave Airlie
Instead of passing an index, pass the actual ScreenPtr. This allows more moving towards not abusing xf86Screens + screenInfo. Signed-off-by: Dave Airlie airl...@redhat.com --- composite/compalloc.c |5 ++--- dix/dixutils.c |4 ++-- exa/exa.c

[PATCH 04/19] xf86: modify FreeScreen callback to take pScrn instead of index. (ABI/API)

2012-05-14 Thread Dave Airlie
Another index-pScrn conversion. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86Helper.c |2 +- hw/xfree86/common/xf86VGAarbiter.c |6 +++--- hw/xfree86/common/xf86VGAarbiterPriv.h |4 ++-- hw/xfree86/common/xf86str.h|2 +- 4 files

[PATCH 03/19] xf86: change EnterVT/LeaveVT to take a ScrnInfoPtr (ABI/API break)

2012-05-14 Thread Dave Airlie
This modifies the EnterVT/LeaveVT interfaces to take a ScrnInfoPtr instead of an index into xf86Screens. This allows dropping more public dereferences of the xf86Screens and screenInfo. Signed-off-by: Dave Airlie airl...@redhat.com --- glx/glxdri.c | 14 ++

[PATCH 07/19] xf86: migrate ValidMode callback to ScrnInfoPtr (ABI/API)

2012-05-14 Thread Dave Airlie
This migrates the ValidMode to passing a ScrnInfoPtr instead of an index. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86Mode.c |4 ++-- hw/xfree86/common/xf86str.h |2 +- hw/xfree86/doc/ddxDesign.xml |2 +- hw/xfree86/fbdevhw/fbdevhw.c |

[PATCH 05/19] xf86: move AdjustFrame to passing ScrnInfoPtr (ABI/API)

2012-05-14 Thread Dave Airlie
This converts AdjustFrame code paths to passing a ScrnInfoPtr instead of an integer index. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86Cursor.c |4 ++-- hw/xfree86/common/xf86VGAarbiter.c |6 +++--- hw/xfree86/common/xf86VGAarbiterPriv.h |4

[PATCH 06/19] xf86: migrate SwitchMode to taking ScrnInfoPtr (ABI/API)

2012-05-14 Thread Dave Airlie
This migrate the SwitchMode interface to take a ScrnInfoPtr instead of an index. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86Cursor.c |2 +- hw/xfree86/common/xf86VGAarbiter.c |6 +++--- hw/xfree86/common/xf86VGAarbiterPriv.h |4 ++--

[PATCH 09/19] xf86: migrate ChangeGamma from index to ScrnInfoPtr (ABI/API) (v2)

2012-05-14 Thread Dave Airlie
This migrates the ChangeGamma interface to avoid passing a index. v2: fix xf86RandR12.c + xf86cmap.c call Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86cmap.c |9 - hw/xfree86/common/xf86str.h|2 +- hw/xfree86/modes/xf86RandR12.c |3 +-- 3

[PATCH 11/19] xf86: migrate PMEvent to a ScrnInfoPtr (ABI/API)

2012-05-14 Thread Dave Airlie
This migrates the PMEvent from index to ScrnInfoPtr. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86PM.c |6 +++--- hw/xfree86/common/xf86str.h |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/common/xf86PM.c

[PATCH 08/19] xf86/exa: migrate index to screen types for EnableDisableFBAccess (ABI/API)

2012-05-14 Thread Dave Airlie
The EXA interface migrates to ScreenPtr, and the xf86 interface migrated to ScrnInfoPtr. Signed-off-by: Dave Airlie airl...@redhat.com --- exa/exa.h |2 +- exa/exa_offscreen.c|4 +--- exa/exa_priv.h |2 +- hw/xfree86/common/xf86.h

[PATCH 12/19] xf86: migrate PointerMoved from index to ScrnInfoPtr (ABI/API)

2012-05-14 Thread Dave Airlie
This migrates PointerMoved from an index to ScrnInfoPtr. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86Cursor.c |7 +++ hw/xfree86/common/xf86str.h|2 +- hw/xfree86/modes/xf86RandR12.c |5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff

[PATCH 10/19] xf86: migrate SetDGAMode from index to ScrnInfoPtr (ABI/API)

2012-05-14 Thread Dave Airlie
This migrates the SetDGAMode callback from an index to ScrnInfoPtr. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86DGA.c | 10 -- hw/xfree86/common/xf86cmap.c | 12 ++-- hw/xfree86/common/xf86str.h |2 +- hw/xfree86/xaa/xaaInit.c |8

[PATCH 14/19] int10: cleanup one unnecessary use of xf86Screens

2012-05-14 Thread Dave Airlie
Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/int10/generic.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c index 8614e0b..4b97520 100644 --- a/hw/xfree86/int10/generic.c +++

[PATCH 13/19] xserver: drop index argument to ScreenInit (ABI/API)

2012-05-14 Thread Dave Airlie
This drops the index argument, its the same as pScreen-myNum, and its the last major index abuse I can find. Signed-off-by: Dave Airlie airl...@redhat.com --- dix/dispatch.c |5 ++--- hw/dmx/dmxextension.c|2 +- hw/dmx/dmxscrinit.c | 16

[PATCH 16/19] vbe: don't use index for VBEInterpretPanelID (API)

2012-05-14 Thread Dave Airlie
Remove use of xf86screens from vbe module. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/vbe/vbe.c |7 +++ hw/xfree86/vbe/vbe.h |2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c index d3c9d36..97a9bcf

[PATCH 17/19] int10/linux: drop use of xf86Screens from linux specific int10 code

2012-05-14 Thread Dave Airlie
No idea if this code is used but this drops the xf86Screens usage in it. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/os-support/linux/int10/linux.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/os-support/linux/int10/linux.c

[PATCH 15/19] int10/vbe: don't use xf86Screens. (ABI)

2012-05-14 Thread Dave Airlie
Pass the ScrnInfoPtr instead of the index in the int10 struct. This saves us using it to dereference xf86Screens. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/int10/generic.c |2 +- hw/xfree86/int10/helper_exec.c | 18 hw/xfree86/int10/helper_mem.c |

[PATCH 19/19] xf86/common: remove some more pScrn-pScreen uses

2012-05-14 Thread Dave Airlie
remove some more conversions that appeared after api cleanups. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86cmap.c |2 +- hw/xfree86/common/xf86xv.c |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/common/xf86cmap.c

[PATCH 18/19] ddc: change API to take ScrnInfoPtr

2012-05-14 Thread Dave Airlie
This removes all xf86Screens usage from ddc code, it modifies the API for some functions to avoid taking indices. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/ddc/ddc.c| 23 ++- hw/xfree86/ddc/xf86DDC.h|8 hw/xfree86/modes/xf86Crtc.c

Re: [PATCH] xfree86: use udev to provide device enumeration for kms devices (v4

2012-05-14 Thread Dave Airlie
On Mon, May 14, 2012 at 4:49 PM, James Cloos cl...@jhcloos.com wrote: Has anyone tested to determine whether this Does The Right Thing on systems which use mdev (from busybox) instead of udev? Does mdev claim to be udev, i.e. will the configure checks fail properly? then it should work fine.

Re: [PATCH synaptics] Avoid out-of-bounds access by running num_active_touches 0 (#49439)

2012-05-14 Thread Chase Douglas
On 05/10/2012 07:30 PM, Peter Hutterer wrote: If a touch is active during driver init, the slot will be set to SLOTSTATE_CLOSE when it finishes. That could decrease num_active_touches to less than 0, causing out-of-bounds access. X.Org Bug 49439

[PATCH xf86-input-synaptics] Ignore pre-existing touches

2012-05-14 Thread Chase Douglas
If a touch is physically active when the device is enabled, then all events for that touch must be ignored. In particular, we cannot close the touch or we will decrement touch count counters below zero. If these counters go below zero memory corruption can occur. Note that a device is disabled

Re: pull request for airlied/redunant-cleanups-1

2012-05-14 Thread Keith Packard
On Mon, 14 May 2012 13:39:00 +0100, Dave Airlie airl...@gmail.com wrote: Michal Suchanek (14): xfixes: remove redundant declaration. xkb: Remove redundant declarations. randr: Remove redundant declaration. exa: Remove redundant declaration. mi: Remove redundant

lack of reviewers (Re: first set of new APIs + convert server to use them)

2012-05-14 Thread Alan Coopersmith
On 05/14/12 04:28 AM, Dave Airlie wrote: nobody? ping? Like Keith the glyph picture API patch is like 2 lines long :) /me wonders how I'm going to get the next 50 patches in at this rate some time this year. It's not just you, we seem to be having a harder time getting reviews done all

[PATCH 0/4] Resend lingering patches

2012-05-14 Thread Alan Coopersmith
These patches have each been sent to xorg-devel before, but are still awaiting review, despite being fairly simple. If no one chimes in after this round, I'll just ask Keith to pull as unreviewed. Alan Coopersmith (4): Convert sbusPaletteKey to latest DevPrivate API Provide prototypes for

[PATCH 1/4] Convert sbusPaletteKey to latest DevPrivate API

2012-05-14 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- Already being used in the Xorg 1.12 packages for Solaris, since we can't build on SPARC without it. hw/xfree86/common/xf86sbusBus.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git

[PATCH 2/4] Provide prototypes for Mmio functions for Solaris Studio on SPARC

2012-05-14 Thread Alan Coopersmith
Actual inline implementations are provided via external *.il files generated from *.S files in hw/xfree86/os-support/solaris Fixes missing prototype warnings that xorg-macros has recently elevated to build-breaking errors. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- Already

[PATCH 3/4] Undocument mandatory loadable modules

2012-05-14 Thread Alan Coopersmith
The code to implement was deleted when BaseModules[] was emptied by the replacement of the pcidata module with libpciaccess calls in commit 46f55f5dead5d70cdff30531d80a72f6be042315. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- hw/xfree86/doc/ddxDesign.xml |5 - 1 file

[PATCH 4/4] Undocument Font Module loading

2012-05-14 Thread Alan Coopersmith
Code was deleted in commit affec10635343668839994ea2bac16c1d4524200 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- hw/xfree86/doc/ddxDesign.xml | 20 1 file changed, 20 deletions(-) diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml

Re: lack of reviewers (Re: first set of new APIs + convert server to use them)

2012-05-14 Thread Dave Airlie
On Mon, May 14, 2012 at 7:04 PM, Alan Coopersmith alan.coopersm...@oracle.com wrote: On 05/14/12 04:28 AM, Dave Airlie wrote: nobody? ping? Like Keith the glyph picture API patch is like 2 lines long :) /me wonders how I'm going to get the next 50 patches in at this rate some time this

Re: [PATCH 0/4] Resend lingering patches

2012-05-14 Thread Dave Airlie
On Mon, May 14, 2012 at 7:19 PM, Alan Coopersmith alan.coopersm...@oracle.com wrote: These patches have each been sent to xorg-devel before, but are still awaiting review, despite being fairly simple.   If no one chimes in after this round, I'll just ask Keith to pull as unreviewed. All seem

Re: [PATCH] xfree86: use udev to provide device enumeration for kms devices (v4

2012-05-14 Thread Mark Kettenis
From: Dave Airlie airl...@gmail.com Date: Mon, 14 May 2012 08:42:50 +0100 So the bit below is what effectively defines the interface for the new platform bus probe? You basically pass the a list of attributes to the driver probe routine and which then gets to decide whether it wants to attach

Re: [PATCH 1/4] Convert sbusPaletteKey to latest DevPrivate API

2012-05-14 Thread Mark Kettenis
From: Alan Coopersmith alan.coopersm...@oracle.com Date: Mon, 14 May 2012 11:19:08 -0700 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com Reviewed-by: Mark Kettenis kette...@openbsd.org --- Already being used in the Xorg 1.12 packages for Solaris, since we can't build on

Re: [PATCH 3/4] Undocument mandatory loadable modules

2012-05-14 Thread Adam Jackson
On Mon, 2012-05-14 at 11:19 -0700, Alan Coopersmith wrote: The code to implement was deleted when BaseModules[] was emptied by the replacement of the pcidata module with libpciaccess calls in commit 46f55f5dead5d70cdff30531d80a72f6be042315. Reviewed-by: Adam Jackson a...@redhat.com - ajax

Re: [PATCH 4/4] Undocument Font Module loading

2012-05-14 Thread Adam Jackson
On Mon, 2012-05-14 at 11:19 -0700, Alan Coopersmith wrote: Code was deleted in commit affec10635343668839994ea2bac16c1d4524200 Reviewed-by: Adam Jackson a...@redhat.com - ajax signature.asc Description: This is a digitally signed message part ___

Re: [PATCH v3 05/16] Add LogMessageVerbSigSafe() for logging messages while in signal context

2012-05-14 Thread Chase Douglas
On 05/10/2012 11:23 PM, Peter Hutterer wrote: On Mon, Apr 16, 2012 at 11:14:22AM -0700, Chase Douglas wrote: [snip] void +LogWriteSigSafe(int verb, const char *f, log_param_t *args, int num_args) +{ +static char tmpBuffer[1024]; +int len = 0; +char number[20]; +static

Re: [PATCH v3 08/16] Warn when attempting to log in a signal unsafe manner from signal context

2012-05-14 Thread Chase Douglas
On 05/10/2012 11:23 PM, Peter Hutterer wrote: On Mon, Apr 16, 2012 at 11:30:22AM -0700, Chase Douglas wrote: On 04/16/2012 11:14 AM, Chase Douglas wrote: Also, print out the offending message format. This will hopefully help developers track down unsafe logging. Signed-off-by: Chase Douglas

Re: [PATCH v3 11/16] Print backtrace in a signal-safe manner

2012-05-14 Thread Chase Douglas
On 05/10/2012 11:24 PM, Peter Hutterer wrote: On Mon, Apr 16, 2012 at 11:14:28AM -0700, Chase Douglas wrote: Backtraces are often printed in signal context, such as when a segfault occurs. Signed-off-by: Chase Douglas chase.doug...@canonical.com --- os/backtrace.c | 49

Re: [PATCH 02/02] dri2: Add DRI2GetParam request

2012-05-14 Thread Chad Versace
On 05/14/2012 08:51 AM, Kristian Høgsberg wrote: On Thu, May 10, 2012 at 3:04 AM, Chad Versace chad.vers...@linux.intel.com wrote: Bump dri2proto dependency to 2.7. Bump DRI2INFOREC_VERSION to 7. This new protocol request effectively allows clients to perform feature detection on the DDX.

Re: lack of reviewers (Re: first set of new APIs + convert server to use them)

2012-05-14 Thread Keith Packard
On Mon, 14 May 2012 19:22:48 +0100, Dave Airlie airl...@gmail.com wrote: I've pretty much no idea how to deal with it sanely. We've moved to larger scale development model without a larger set of developers. The kernel isn't even as stringent wrt to reviews as xorg-devel is. Small changes

Re: [PATCH 13/19] xserver: drop index argument to ScreenInit (ABI/API)

2012-05-14 Thread Alan Coopersmith
On 05/14/12 09:41 AM, Dave Airlie wrote: This drops the index argument, its the same as pScreen-myNum, and its the last major index abuse I can find. Signed-off-by: Dave Airlie airl...@redhat.com --- dix/dispatch.c |5 ++--- hw/dmx/dmxextension.c|2 +-

[PATCH v4 00/16] Fix signal-unsafe logging

2012-05-14 Thread Chase Douglas
This new patchset adds some tests for the number format functions, fixes a crash in those functions, rebases the logging changes on top of master, and removes the unsafe timestamp printing when in signal context. The backtrace has been left even though it may not be explicitly signal safe in all

[PATCH v4 01/16] test/touch: Initialize device name

2012-05-14 Thread Chase Douglas
Without this change, the test will segfault when we switch to signal- safe logging. Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- test/touch.c |5 + 1 file changed, 5 insertions(+) diff --git a/test/touch.c

[PATCH v4 02/16] Add global variable inSignalContext

2012-05-14 Thread Chase Douglas
This will be used for checking for proper logging when in signal context. Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- hw/xfree86/os-support/shared/sigio.c |4 include/globals.h|3 +++

[PATCH v4 03/16] Save log file file descriptor for signal context logging

2012-05-14 Thread Chase Douglas
None of the FILE based functions are signal safe, including fileno(), so we need to save the file descriptor for when we are in signal context. Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- os/log.c |4 1 file changed,

[PATCH v4 04/16] Add FormatUInt64{,Hex}() for formatting numbers in a signal safe manner

2012-05-14 Thread Chase Douglas
Signed-off-by: Chase Douglas chase.doug...@canonical.com --- Changes since v3: * Update comment for decimal format: you actually need 21 characters * Fix FPE on 60-bit and larger numbers * Add tests checking for proper conversions include/misc.h|2 + os/utils.c| 44

[PATCH v4 05/16] Add LogMessageVerbSigSafe() for logging messages while in signal context

2012-05-14 Thread Chase Douglas
Signed-off-by: Chase Douglas chase.doug...@canonical.com --- Changes since v3: * Rebased onto master - Log writing now occurs in LogSWrite, which is now signal-safe * Removed timestamp logging, it's not safe to get the current timestamp * Updated pnprintf to use 21 character string for number

[PATCH v4 06/16] Add ErrorSigSafe() alternative to ErrorF()

2012-05-14 Thread Chase Douglas
ErrorF() is not signal safe. Use ErrorSigSafe() whenever an error message may be logged in signal context. Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- include/os.h |3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v4 07/16] Print backtrace in a signal-safe manner

2012-05-14 Thread Chase Douglas
Backtraces are often printed in signal context, such as when a segfault occurs. Signed-off-by: Chase Douglas chase.doug...@canonical.com --- os/backtrace.c | 49 + 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/os/backtrace.c

[PATCH v4 08/16] Make BUG_WARN* signal safe

2012-05-14 Thread Chase Douglas
Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- include/misc.h |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/misc.h b/include/misc.h index 3f7d07e..4ea8781 100644 --- a/include/misc.h +++

[PATCH v4 09/16] Warn when attempting to log in a signal unsafe manner from signal context

2012-05-14 Thread Chase Douglas
Also, print out the offending message format. This will hopefully help developers track down unsafe logging. Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- os/log.c | 19 +++ 1 file changed, 19 insertions(+)

[PATCH v4 10/16] Log messages in GetTouchEvents() in a signal safe manner

2012-05-14 Thread Chase Douglas
Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- dix/getevents.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index c960d44..9d482d1 100644 --- a/dix/getevents.c +++

[PATCH v4 11/16] Log messages in TouchBeginDDXTouch() in a signal-safe manner

2012-05-14 Thread Chase Douglas
Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- dix/touch.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dix/touch.c b/dix/touch.c index 401cb98..9c4f74b 100644 --- a/dix/touch.c +++ b/dix/touch.c @@

[PATCH v4 12/16] Log mieq enqueue overflow in a signal safe manner

2012-05-14 Thread Chase Douglas
Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- mi/mieq.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index e117a8d..b121eba 100644 --- a/mi/mieq.c +++

[PATCH v4 13/16] Log safely in fatal signal handler

2012-05-14 Thread Chase Douglas
While we probably don't need to be signal safe here since we will never return to the normal context, the logging signal context check will cause unsafe logging to be unhandled. Using signal safe logging here resolves the issue. Signed-off-by: Chase Douglas chase.doug...@canonical.com

[PATCH v4 14/16] Log in UnloadModuleOrDriver() in a signal safe manner

2012-05-14 Thread Chase Douglas
The function may be called from a fatal signal handler. Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- hw/xfree86/loader/loadmod.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v4 15/16] Log in LoaderUnload() in a signal safe manner

2012-05-14 Thread Chase Douglas
The function may be called from a fatal signal handler. Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- hw/xfree86/loader/loader.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/loader/loader.c

[PATCH v4 16/16] Log in OsVendorFatalError() in a signal safe manner

2012-05-14 Thread Chase Douglas
The function can be called from a fatal signal handler. Signed-off-by: Chase Douglas chase.doug...@canonical.com Reviewed-by: Peter Hutterer peter.hutte...@who-t.net --- hw/xfree86/common/xf86Init.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

Re: [PATCH 15/19] int10/vbe: don't use xf86Screens. (ABI)

2012-05-14 Thread Alan Coopersmith
On 05/14/12 09:41 AM, Dave Airlie wrote: diff --git a/hw/xfree86/int10/xf86int10.h b/hw/xfree86/int10/xf86int10.h index 36b659f..443285b 100644 --- a/hw/xfree86/int10/xf86int10.h +++ b/hw/xfree86/int10/xf86int10.h @@ -21,7 +21,7 @@ /* int10 info structure */ typedef struct { int

Re: [PATCH 18/19] ddc: change API to take ScrnInfoPtr

2012-05-14 Thread Alan Coopersmith
On 05/14/12 09:41 AM, Dave Airlie wrote: This removes all xf86Screens usage from ddc code, it modifies the API for some functions to avoid taking indices. -if (!(dev = DDC2Init(scrnIndex, pBus))) +if (!(dev = DDC2Init(pScrn-scrnIndex, pBus))) It looks like DDC2Init never uses the

Re: no more indexes - clean up API

2012-05-14 Thread Alan Coopersmith
On 05/14/12 09:40 AM, Dave Airlie wrote: The screen/scrninfo APIs are very into passing index values, that are then immediately used to lookup a global array, this is not an API, its whatever the opposite is. This set of patches changes all the API passing of screen indices (apart from the

Re: [PATCH v3 05/16] Add LogMessageVerbSigSafe() for logging messages while in signal context

2012-05-14 Thread Alan Coopersmith
On 05/14/12 12:32 PM, Chase Douglas wrote: On 05/10/2012 11:23 PM, Peter Hutterer wrote: On Mon, Apr 16, 2012 at 11:14:22AM -0700, Chase Douglas wrote: [snip] void +LogWriteSigSafe(int verb, const char *f, log_param_t *args, int num_args) +{ +static char tmpBuffer[1024]; +int

[PATCH 0/2 v2]: dri2: Add DRI2GetParam request

2012-05-14 Thread Chad Versace
This series extends the DRI2 protocol by adding a new request, DRI2GetParam. The new request effectively allows clients to perform feature detection on the DDX. When Intel begins adding MSAA support to its DDX, having a clean way to do feature detection will allow us to avoid painful painful

[PATCH 1/2 v2] dri2proto: Add DRI2GetParam request

2012-05-14 Thread Chad Versace
Bump protocol version to 1.4. Bump package version to 2.7. This new protocol request effectively allows clients to perform feature detection on the DDX. If I had DRI2GetParam in June 2011, when I was implementing support in the Intel DDX and Mesa for new hardware that required a new DRI2

[PATCH 2/2 v2] dri2: Add DRI2GetParam request

2012-05-14 Thread Chad Versace
Bump dri2proto dependency to 2.7. Bump DRI2INFOREC_VERSION to 7. This new protocol request effectively allows clients to perform feature detection on the DDX. The request was added in DRI2 protocol 1.4. If I had DRI2GetParam in June 2011, when I was implementing support in the Intel DDX and Mesa

Re: no more indexes - clean up API

2012-05-14 Thread Aaron Plattner
On 05/14/2012 02:25 PM, Alan Coopersmith wrote: On 05/14/12 09:40 AM, Dave Airlie wrote: The screen/scrninfo APIs are very into passing index values, that are then immediately used to lookup a global array, this is not an API, its whatever the opposite is. This set of patches changes all the

[PATCH] dix: undo transformation for missing valuators (#49347)

2012-05-14 Thread Peter Hutterer
last.valuators contains the transformed valuators of the device. If the device submits events with x/y missing, we need to get that from last.valuators and undo the transformation to that axis. X.Org Bug 49347 http://bugs.freedesktop.org/show_bug.cgi?id=49347 Signed-off-by: Peter Hutterer

Re: [PATCH] dix: undo transformation for missing valuators (#49347)

2012-05-14 Thread Chase Douglas
On 05/14/2012 04:52 PM, Peter Hutterer wrote: last.valuators contains the transformed valuators of the device. If the device submits events with x/y missing, we need to get that from last.valuators and undo the transformation to that axis. X.Org Bug 49347

Re: [PATCH 0/2 v2]: dri2: Add DRI2GetParam request

2012-05-14 Thread Ian Romanick
On 05/14/2012 03:23 PM, Chad Versace wrote: This series extends the DRI2 protocol by adding a new request, DRI2GetParam. The new request effectively allows clients to perform feature detection on the DDX. When Intel begins adding MSAA support to its DDX, having a clean way to do feature

Re: [PATCH] dix: undo transformation for missing valuators (#49347)

2012-05-14 Thread Chase Douglas
On 05/14/2012 05:21 PM, Chase Douglas wrote: On 05/14/2012 04:52 PM, Peter Hutterer wrote: last.valuators contains the transformed valuators of the device. If the device submits events with x/y missing, we need to get that from last.valuators and undo the transformation to that axis. X.Org

Re: [PATCH xinput] Add --enable/--disable support

2012-05-14 Thread Peter Hutterer
On Mon, May 14, 2012 at 08:39:09AM -0700, Chase Douglas wrote: On 05/14/2012 12:29 AM, Peter Hutterer wrote: Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- I got sick of typing 'xinput set-prop foo Device Enabled 0' src/property.c | 14 ++ src/xinput.c |

Re: [PATCH 1/2 v2] dri2proto: Add DRI2GetParam request

2012-05-14 Thread Alan Coopersmith
On 05/14/12 03:23 PM, Chad Versace wrote: + Parameter names in which the value of the most signficant byte is 0 are + reserved for the X server. Names in which the byte's value is 1 are + reserved for the DDX. Names in which the byte's value is neither 0 + nor 1 are reserverd

Re: [PATCH xf86-input-synaptics] Ignore pre-existing touches

2012-05-14 Thread Peter Hutterer
On Mon, May 14, 2012 at 10:20:01AM -0700, Chase Douglas wrote: If a touch is physically active when the device is enabled, then all events for that touch must be ignored. In particular, we cannot close the touch or we will decrement touch count counters below zero. If these counters go below

Re: [PATCH synaptics] Avoid out-of-bounds access by running num_active_touches 0 (#49439)

2012-05-14 Thread Peter Hutterer
On Mon, May 14, 2012 at 10:02:24AM -0700, Chase Douglas wrote: On 05/10/2012 07:30 PM, Peter Hutterer wrote: If a touch is active during driver init, the slot will be set to SLOTSTATE_CLOSE when it finishes. That could decrease num_active_touches to less than 0, causing out-of-bounds

Re: xserver: Branch 'master' - 14 commits

2012-05-14 Thread Peter Hutterer
On Mon, May 14, 2012 at 10:39:24AM -0700, Keith Packard wrote: Xi/chgptr.h |6 --- dix/enterleave.h |8 +--- dix/events.c |2 - dix/ptrveloc.c|3 - exa/exa.c

[PATCH v2] dix: undo transformation for missing valuators (#49347)

2012-05-14 Thread Peter Hutterer
last.valuators contains the transformed valuators of the device. If the device submits events with x/y missing, we need to get that from last.valuators and undo the transformation to that axis. X.Org Bug 49347 http://bugs.freedesktop.org/show_bug.cgi?id=49347 Signed-off-by: Peter Hutterer