Re: don't pull yet, but read: pull request for abi/api changes

2012-05-31 Thread Dave Airlie
On Wed, May 30, 2012 at 11:02 PM, Keith Packard kei...@keithp.com wrote: Dave Airlie airl...@gmail.com writes: (the fact that this change ends with a net loss of code is a definite bonus...)       xf86: change EnterVT/LeaveVT to take a ScrnInfoPtr (ABI/API break)       xf86: modify

Re: [PATCH] xf86/modes: Defang stale pointers when copying modes

2012-05-31 Thread Chris Wilson
On Wed, 30 May 2012 14:25:40 -0700, Keith Packard kei...@keithp.com wrote: Chris Wilson ch...@chris-wilson.co.uk writes: +extern _X_EXPORT void +xf86InternMode(DisplayModePtr intern, const DisplayModeRec * pMode); The name doesn't seem very descriptive to me -- what is 'Intern' supposed

[PATCH 05/19] qxl_surface: handle destroyed pixmaps while evacuated

2012-05-31 Thread Alon Levy
Prevent access to freed memory when: 1. qxl_leave_vt/qxl_surface_cache_evacuate_all freed cache-all_surfaces 2. ProcRenderDispatch/damageDestroyPixmap/qxl_destroy_pixmap/qxl_surface_kill access a surface that pointed inside the all_surfaces array Solution in this patch: 1. never free all_surfaces

[PATCH 18/19] qxl_surface: don't unlink surface 0

2012-05-31 Thread Alon Levy
The primary surface, i.e. qxl-primary, the only surface with id==0, is allocated in qxl_surface_cache_create_primary with prev==next==NULL. Unlinking it was producing a wrong cache-free_surfaces == NULL. This was not a problem because unlinking the primary only happened in switch_host, which then

[PATCH 11/19] qxl_pre_init: memset qxl struct

2012-05-31 Thread Alon Levy
--- src/qxl_driver.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index a3ec1f8..1dbde5b 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -1448,6 +1448,7 @@ qxl_pre_init(ScrnInfoPtr pScrn, int flags) if (!pScrn-driverPrivate)

[PATCH 07/19] rename qxl_reset to qxl_reset_and_create_mem_slots

2012-05-31 Thread Alon Levy
--- src/qxl_driver.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index 4c08637..c128231 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -525,7 +525,7 @@ setup_slot(qxl_screen_t *qxl, uint8_t slot_index_offset, }

[PATCH 01/19] uxa: remove unnecessary includes, reduces warnings due to duplicate definitions

2012-05-31 Thread Alon Levy
--- src/uxa/uxa-accel.c |2 -- src/uxa/uxa.c |2 -- 2 files changed, 4 deletions(-) diff --git a/src/uxa/uxa-accel.c b/src/uxa/uxa-accel.c index 62034c2..e456e6c 100644 --- a/src/uxa/uxa-accel.c +++ b/src/uxa/uxa-accel.c @@ -31,8 +31,6 @@ #include dix-config.h #endif #include

[PATCH 03/19] qxl_surface: remove redundant qxl_garbage_collect, qxl_allocnf calls it

2012-05-31 Thread Alon Levy
--- src/qxl_surface.c |2 -- 1 file changed, 2 deletions(-) diff --git a/src/qxl_surface.c b/src/qxl_surface.c index a8901f0..cb0de1d 100644 --- a/src/qxl_surface.c +++ b/src/qxl_surface.c @@ -357,8 +357,6 @@ make_surface_cmd (surface_cache_t *cache, uint32_t id, QXLSurfaceCmdType type)

[PATCH 10/19] qxl_driver: abort on mspace error, don't spin (default abort function)

2012-05-31 Thread Alon Levy
--- src/qxl_driver.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index 3c8dcca..a3ec1f8 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -41,6 +41,7 @@ #include xf86Crtc.h +#include mspace.h #include qxl.h #include

[PATCH 02/19] uxa-damage: remove unnecessary include (doesn't fix any warnings)

2012-05-31 Thread Alon Levy
--- src/uxa/uxa-damage.c |1 - 1 file changed, 1 deletion(-) diff --git a/src/uxa/uxa-damage.c b/src/uxa/uxa-damage.c index 586c466..3e4c075 100644 --- a/src/uxa/uxa-damage.c +++ b/src/uxa/uxa-damage.c @@ -30,7 +30,6 @@ #includeX11/X.h #includescrnintstr.h #includewindowstr.h

[PATCH 16/19] io: add qxl_io_destroy_primary

2012-05-31 Thread Alon Levy
--- src/qxl.h|1 + src/qxl_driver.c | 15 +++ 2 files changed, 16 insertions(+) diff --git a/src/qxl.h b/src/qxl.h index 819c98d..aa6645c 100644 --- a/src/qxl.h +++ b/src/qxl.h @@ -435,6 +435,7 @@ inline void qxl_mem_unverifiable(struct qxl_mem *mem) {} void

[PATCH 04/19] qxl_driver: hide cursors on vt switch

2012-05-31 Thread Alon Levy
This is not enough to prevent any qxl_destroy_pixmap call during vt switch, but it prevents those triggered by CursorDisplayCursor. Note: a matching xf86_show_cursors call doesn't hurt, but is not required, so not adding it. It is still possible to access freed memory by the following trigger:

[PATCH 17/19] qxl_surface: add DEBUG_SURFACE_LIFECYCLE helpers

2012-05-31 Thread Alon Levy
--- src/qxl_surface.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/src/qxl_surface.c b/src/qxl_surface.c index fd62576..669a022 100644 --- a/src/qxl_surface.c +++ b/src/qxl_surface.c @@ -49,6 +49,12 @@ #include qxl.h +#ifdef

[PATCH 00/19] xf86-video-qxl cleanups, switchmode, vt segfaults

2012-05-31 Thread Alon Levy
This patchset has multiple fixes and cleanups, including: * handle DestroyPixmap during [LeaveVT, EnterVT]. When we evacuated all the surfaces we also destroyed all_surfaces, causing segfaults. * tracking of mspace allocation (compile time flag, defaults to off), including trivial

[PATCH 12/19] qxl_surface: cosmetics

2012-05-31 Thread Alon Levy
--- src/qxl_surface.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qxl_surface.c b/src/qxl_surface.c index d999b4d..976c339 100644 --- a/src/qxl_surface.c +++ b/src/qxl_surface.c @@ -551,7 +551,7 @@ surface_send_create (surface_cache_t *cache, /* the final +

[PATCH 08/19] qxl_leave_vt: change outb to ioport_write (easier to grep / breakpoint on a single point)

2012-05-31 Thread Alon Levy
--- src/qxl_driver.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index c128231..3c8dcca 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -1214,7 +1214,7 @@ qxl_leave_vt(int scrnIndex, int flags) qxl-vt_surfaces =

[PATCH 09/19] mspace: add mspace_malloc_stats_return

2012-05-31 Thread Alon Levy
--- src/mspace.c | 33 +++-- src/mspace.h |5 - 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/mspace.c b/src/mspace.c index 17d976a..822aade 100644 --- a/src/mspace.c +++ b/src/mspace.c @@ -1479,7 +1479,8 @@ static struct mallinfo

[PATCH 13/19] qxl_surface: logging: add function name to ErrorF

2012-05-31 Thread Alon Levy
--- src/qxl_surface.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qxl_surface.c b/src/qxl_surface.c index 976c339..6414351 100644 --- a/src/qxl_surface.c +++ b/src/qxl_surface.c @@ -635,7 +635,7 @@ qxl_surface_create (surface_cache_t *cache, if

[PATCH 14/19] qxl.h: add device_primary tri state UNDEFINED/NONE/CREATED

2012-05-31 Thread Alon Levy
--- src/qxl.h|8 src/qxl_driver.c |4 2 files changed, 12 insertions(+) diff --git a/src/qxl.h b/src/qxl.h index c6d3793..56e03a3 100644 --- a/src/qxl.h +++ b/src/qxl.h @@ -126,6 +126,12 @@ enum { OPTION_COUNT, }; +enum { +QXL_DEVICE_PRIMARY_UNDEFINED, +

[PATCH 06/19] qxl_mem: add debug flags, simple accounting and valgrind enabled

2012-05-31 Thread Alon Levy
adds preprocessor definitions DEBUG_QXL_MEM DEBUG_QXL_MEM_VERBOSE --- src/qxl.h|6 ++ src/qxl_driver.c |8 src/qxl_mem.c| 54 +- 3 files changed, 67 insertions(+), 1 deletion(-) diff --git a/src/qxl.h

[PATCH 15/19] prefix io with qxl_io, add several

2012-05-31 Thread Alon Levy
--- src/qxl.h |9 +--- src/qxl_driver.c | 65 - src/qxl_surface.c |2 +- 3 files changed, 67 insertions(+), 9 deletions(-) diff --git a/src/qxl.h b/src/qxl.h index 56e03a3..819c98d 100644 --- a/src/qxl.h +++ b/src/qxl.h

[PATCH 19/19] qxl_switch_mode: don't evacuate, just recreate primary surface

2012-05-31 Thread Alon Levy
In summary, on vt enter we still: reset recreate memory slots clear our mspace allocators and then do what switch mode below says On vt leave we still: reset (this is redundant since the first VGA access will trigger a reset on the device side) On switch mode however we only: destroy

Re: [PATCH] prevent X crash on pressing multimedia buttons, again

2012-05-31 Thread Michal Suchanek
ping? 0001-Fix-yet-another-crash-in-pointer-event-queuing.patch Description: Binary data ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH v2] qxl_mem: add debug flags, simple accounting and valgrind enabled

2012-05-31 Thread Alon Levy
adds preprocessor definitions DEBUG_QXL_MEM DEBUG_QXL_MEM_VERBOSE --- v1-v2: add static in front of qxl_mem_unverifiable in the default case of undefined DEBUG_QXL_MEM. src/qxl.h|6 ++ src/qxl_driver.c |8 src/qxl_mem.c| 54

Re: don't pull yet, but read: pull request for abi/api changes

2012-05-31 Thread Keith Packard
Dave Airlie airl...@gmail.com writes: Cool I'll fixup the stuff here and send another do-not-pull yet request. Thanks! -- keith.pack...@intel.com pgpRJlMt80TCy.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives:

Re: [PATCH] xf86/modes: Defang stale pointers when copying modes

2012-05-31 Thread Keith Packard
Chris Wilson ch...@chris-wilson.co.uk writes: On Wed, 30 May 2012 14:25:40 -0700, Keith Packard kei...@keithp.com wrote: Chris Wilson ch...@chris-wilson.co.uk writes: +extern _X_EXPORT void +xf86InternMode(DisplayModePtr intern, const DisplayModeRec * pMode); The name doesn't seem very

[PULL: xserver master] dri2: Add DRI2GetParam request (v2)

2012-05-31 Thread Chad Versace
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The following changes since commit fffe93b91823a110f71a28d8914e7fd5c727b81a: XQuartz: Avoid a race in initialization of darwinPointer (2012-05-31 11:06:39 -0700) are available in the git repository at:

[PATCH libpciaccess] Implement legacy io map for x86 backend

2012-05-31 Thread Samuel Thibault
Add the legacy io and map methods for the x86 backend, using ioperm, in/out, and the existing mmap method. Signed-off-by: Samuel Thibault samuel.thiba...@ens-lyon.org --- src/x86_pci.c | 100 - 1 file changed, 99 insertions(+), 1

Re: [PULL: xserver master] dri2: Add DRI2GetParam request (v2)

2012-05-31 Thread Keith Packard
Chad Versace chad.vers...@linux.intel.com writes: Chad Versace (1): dri2: Add DRI2GetParam request (v2) I've cherry-picked this patch to master: 594b4a4..78f0d9c master - master -- keith.pack...@intel.com pgpeHRQ0dmbEb.pgp Description: PGP signature

[PATCH:xinput] Free strings allocated by GetAtomName instead of letting them leak

2012-05-31 Thread Alan Coopersmith
Fixes errors reported by Parfait 0.5.0.1 bug checking tool: Error: Memory leak (CWE 401) Memory leak of pointer 'unknown' allocated with XGetAtomName(dpy, info-type) at line 122 of src/list.c in function 'print_info'. pointer allocated at line 84 with XGetAtomName(dpy,