udev + gpu screens + output slaves

2012-06-20 Thread Dave Airlie
Okay this is feature set 1, output slaves, it contains the previous set of infrastructure changes, cleaned up further and some more little bugs fixed. Changes that need definite thinking about are mainly the privates assert removals. But after this set, you get to attach output providers, and

[PATCH 03/31] screen: split out screen init code.

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This is a precursor for reusing this code to init gpu screens. Signed-off-by: Dave Airlie airl...@redhat.com --- dix/dispatch.c | 44 +++- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git

[PATCH 04/31] dix: introduce gpu screens. (v2)

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This patch introduces gpu screens into screenInfo. It adds interfaces for adding and removing gpu screens, along with adding private fixup, block handler support, and scratch pixmap init. GPU screens have a myNum that is offset by GPU_SCREEN_OFFSET (256),

[PATCH 06/31] xserver/config: add udev/drm hotplug callbacks.

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This adds callbacks into the ddx for udev gpu hotplug. Signed-off-by: Dave Airlie airl...@redhat.com --- config/udev.c | 42 ++ include/hotplug.h |4 2 files changed, 46 insertions(+) diff --git

[PATCH 07/31] xfree86: add platform bus hotplug support (v2)

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This provides add/remove support for platform devices at xfree86 ddx level. v2: cleanup properly if no driver found. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86platformBus.c| 99

[PATCH 08/31] xfree86: add autoAddGPU option

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This option is to stop the X server adding non-primary devices as gpu screens. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86Config.c | 15 ++- hw/xfree86/common/xf86Globals.c |9 +++--

[PATCH 17/31] privates: when pixmap privates increase, bump the totalPixmapSize

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This bumps totalPixmapSize in all attached screens. Signed-off-by: Dave Airlie airl...@redhat.com --- dix/privates.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/dix/privates.c b/dix/privates.c index

[PATCH 05/31] xfree86: add DDX gpu screen support. (v2)

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This just adds the structures and interfaces required for adding/deleteing gpu screens at the DDX level. The platform probe can pass a new flag to the driver, so they can call xf86AllocateScreen and pass back the new gpu screen flag. It also calls the gpu

[PATCH 09/31] randr: add provider object and provider property support (v2.1)

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This adds the initial provider object and provider property support to the randr dix code. v2: destroy provider in screen close v2.1: fix whitespace Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86platformBus.c |9 +-

[PATCH 13/31] randr: expose unattached providers to the clients.

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This provides the unattached provider list to the clients. Signed-off-by: Dave Airlie airl...@redhat.com --- randr/rrprovider.c |8 1 file changed, 8 insertions(+) diff --git a/randr/rrprovider.c b/randr/rrprovider.c index 8289059..766ff33

[PATCH 14/31] xf86dga: handle DGAAvailable for gpu screens.

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com Just check for GPU screens, in DGAAvailable, should probably overhaul DGA interface at some point, or remove it. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86DGA.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-)

[PATCH 12/31] dix: attach unbound screens to protocol screen 0

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This is the default attachment, unbound gpu screens get attached to the 0 protocol screen. detach on hotunplug. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86Init.c|3 +++ hw/xfree86/common/xf86platformBus.c |2 ++

[PATCH 15/31] xf86: load modesetting driver on Linux hotplug

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This driver is currently really the only choice for a hotplug at the moment, we can refine this in the future to try and pick the driver names. We have to reload this as it can get unloaded it not used in the original probe. Signed-off-by: Dave Airlie

[PATCH 18/31] dix: add ability to link output slave gpus to the current gpu

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com Just add the interfaces to attach/detach output slaves, and a linked list to keep track of them. Hook up the randr providers list to include these slaves. Signed-off-by: Dave Airlie airl...@redhat.com --- dix/dispatch.c | 16

[PATCH 19/31] xf86: add ability to do a role change

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This just hooks up a simple role change to go from unattached to slave output and back. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/modes/xf86RandR12.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff

[PATCH 20/31] dix: pixmap sharing infrastructure

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This is a hooks for pixmap sharing and tracking. The pixmap sharing ones get an integer handle for the pixmap and use a handle to be the backing for a pixmap. The tracker interface is to be used when a GPU needs to track pixmaps to be updated for another

[PATCH 21/31] exa: pixmap sharing infrastructure

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This just adds exa interfaces for mixed exa so drivers can share and set shared pixmaps up correctly. Signed-off-by: Dave Airlie airl...@redhat.com --- exa/exa.c |7 +++ exa/exa.h |6 +- exa/exa_mixed.c | 34

[PATCH 23/31] xf86: add initial scanout pixmap support

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com Add the simple passthrough interface for drivers to use, so they can set scanout pixmaps. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/modes/xf86Crtc.h|5 + hw/xfree86/modes/xf86RandR12.c | 11 +++ 2 files changed, 16

[PATCH 22/31] randr: add initial scanout pixmap support

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com When randr notices a crtc configuration request for a slave device, it checks if the slave allocated pixmap exists and is suitable, if not it allocates a new shared pixmap from the master, shares it to the slave, and starts the master tracking damage to it, to

[PATCH 25/31] randr: fix tellchanged to work with slave scanouts

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com Tell changed need to tell only for the master pixmap, however it gets called from various places for slave screens, so convert to telling clients about changes on the master screen. Signed-off-by: Dave Airlie airl...@redhat.com --- randr/randr.c | 26

[PATCH 24/31] randr: fixup constrain to work with slave screens.

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com Current code constrains the cursor to the crtcs on the master device, for slave outputs to work we have to include their crtcs in the constrain calculations. Signed-off-by: Dave Airlie airl...@redhat.com --- randr/rrcrtc.c | 57

[PATCH 28/31] xf86/crtc: add new interface to detach slave crtcs.

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This will detach any scanout pixmaps attached to slave crtcs. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/modes/xf86Crtc.c | 20 hw/xfree86/modes/xf86Crtc.h |3 +++ 2 files changed, 23 insertions(+) diff --git

[PATCH 27/31] dix/pixmap: track dirty pixmaps in server.

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This adds two functions for drivers to use directly to keep a linked list of slave pixmaps to do damage tracking on and keep updated. It also adds a helper function that drivers may optionally call to do a simple copy area damage update. Signed-off-by: Dave

[PATCH 29/31] randr: hook up output slave to screen resources return

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com When the client asks for the screen resources list, it will now get a list of crtc/outputs for the master + all attached slaves, this will let randr configure all attached slave devices properly. Signed-off-by: Dave Airlie airl...@redhat.com ---

[PATCH 30/31] xf86: detach all slave crtcs on disconnect/randr event

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com If we get disconnected or a randr event, disconnect the slave crtcs. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86platformBus.c | 11 ++- hw/xfree86/modes/xf86RandR12.c |2 ++ 2 files changed, 12 insertions(+), 1

[PATCH 31/31] xf86/cursor: fallback to sw cursor if we have slaves present.

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com Current USB devices have no hw rendered cursors, so we need the master GPU to render the cursor, so whenever we plug in a slave device, fallback to sw rendered cursors. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/ramdac/xf86Cursor.c |2

[PATCH 01/31] xf86: cursor code got mangled by indenting

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This fixes some really ugly code that got mangled by the indenting. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/ramdac/xf86Cursor.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git

[PATCH 10/31] xfree86: add framework for provider support in ddx.

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This adds the framework for DDX provider support. Signed-off-by: Dave Airlie airl...@redhat.com --- hw/xfree86/common/xf86str.h|4 +++ hw/xfree86/modes/xf86Crtc.c| 46 ++ hw/xfree86/modes/xf86Crtc.h| 58

[PATCH 16/31] privates: remove asserts that stop dynamic increasing of privates size.

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com These asserts stop us increasing the size of privates after create screen resources has been called, however for dynamic screens we need to be able to increase private size as new drivers are loaded. In theory any object allocated by an older driver won't try

[PATCH 11/31] dix: add unattached list for attaching screens to initially.

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This list is meant for attaching unbound gpu screens to initially, before the client side rebinds them. Signed-off-by: Dave Airlie airl...@redhat.com --- dix/dispatch.c | 19 +++ include/screenint.h |5 + include/scrnintstr.h

[PATCH 26/31] randr: check the screen size bounds against the master

2012-06-20 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com The master contains the complete screen size bounds, so check the width/height against it. Signed-off-by: Dave Airlie airl...@redhat.com --- randr/rrcrtc.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/randr/rrcrtc.c

Re: [PATCH] dri2: Pass a ScreenPtr through to the driver's AuthMagic function. (v3)

2012-06-20 Thread Kristian Høgsberg
On Tue, Jun 19, 2012 at 11:53 PM, Christopher James Halse Rogers christopher.halse.rog...@canonical.com wrote: xwayland drivers need access to their screen private data to authenticate. Now that drivers no longer have direct access to the global screen arrays, this needs to be passed in as

[no subject]

2012-06-20 Thread Keith Packard
I didn't see a conclusion to this patch series, so I split the second patch into two pieces (leaving the authorship alone), and incorporated Peter's suggestion to use BUG_WARN_MSG instead of ErrorF. Andy -- if you could 'ack' these, I'll get them into the server tree. [PATCH 1/2] Remove

[PATCH 1/2] Remove static qualifier on mieqProcessInputEvents()'s 'event' local variable.

2012-06-20 Thread Keith Packard
From: Andy Ritger arit...@nvidia.com This isn't necessary Signed-off-by: Andy Ritger arit...@nvidia.com Signed-off-by: Keith Packard kei...@keithp.com --- mi/mieq.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mi/mieq.c b/mi/mieq.c index e117a8d..c7dd0ad 100644 ---

[PATCH 2/2] mi: Log an error if mieqProcessInputEvents() recurses.

2012-06-20 Thread Keith Packard
From: Andy Ritger arit...@nvidia.com v2: Uses BUG_WARN_MSG to also provide a stack trace. (Peter Hutterer) Signed-off-by: Keith Packard kei...@keithp.com Signed-off-by: Andy Ritger arit...@nvidia.com --- mi/mieq.c | 12 1 file changed, 12 insertions(+) diff --git a/mi/mieq.c

Re: [PATCH] dri2: Pass a ScreenPtr through to the driver's AuthMagic function. (v3)

2012-06-20 Thread Keith Packard
Christopher James Halse Rogers christopher.halse.rog...@canonical.com writes: xwayland drivers need access to their screen private data to authenticate. Now that drivers no longer have direct access to the global screen arrays, this needs to be passed in as function context. v2: Don't break

Re: [PATCH 1/2] randr: Don't recurse into mieqProcessInputEvents() from RRTellChanged().

2012-06-20 Thread Keith Packard
Andy Ritger arit...@nvidia.com writes: Call UpdateCurrentTimeIf(), not UpdateCurrentTime(), from RRTellChanged(). The latter calls ProcessInputEvents(), which can trigger a recursion into mieqProcessInputEvents(). The former omits the call to ProcessInputEvents(). Merged.

[PATCH 1/2] Add APIs for selecting on write fds.

2012-06-20 Thread Keith Packard
This adds API support for waking the server when an fd becomes writable. void AddWriteSocket(int fd); Add an FD to the select write mask; the server will wake when this fd is writable. void RemoveWriteSocket(int fd); Remove the FD from the select write mask.

Re: [PATCH 01/14] xfree86: use udev to provide device enumeration for kms devices (v9)

2012-06-20 Thread Keith Packard
Dave Airlie airl...@gmail.com writes: +else if (strcmp(udev_device_get_subsystem(udev_device), drm)) +goto no_probe; +else if (strncmp(sysname, card, 4)) +goto no_probe; bikeshed -- strcmp(a,b) != 0; otherwise, I'm left wondering if you expected strcmp

Re: [PATCH 02/14] screen: split out screen init code.

2012-06-20 Thread Keith Packard
Dave Airlie airl...@gmail.com writes: -int -AddScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ , - int /*argc */ , - char ** /*argv */ - ), int argc, char **argv) +static int init_screen(ScreenPtr pScreen, int i) { - -

Re: [PATCH 03/14] dix: introduce gpu screens.

2012-06-20 Thread Keith Packard
Dave Airlie airl...@gmail.com writes: +int +AddGPUScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ , + int /*argc */ , + char ** /*argv */ + ), + int argc, char **argv) +{ +int i; +

Re: [PATCH 04/14] xfree86: add DDX gpu screen support. (v2)

2012-06-20 Thread Keith Packard
Dave Airlie airl...@gmail.com writes: +pScrn-origIndex = pScrn-scrnIndex; /* This never changes */ I can't find any users of origIndex; I suspect it can be safely removed. -xf86Screens[i]-drv = drv; +pScrn-drv = drv; drv-refCount++; -xf86Screens[i]-module =

Re: [PATCH 05/14] xserver/config: add udev/drm hotplug callbacks.

2012-06-20 Thread Keith Packard
Dave Airlie airl...@gmail.com writes: From: Dave Airlie airl...@redhat.com This adds callbacks into the ddx for udev gpu hotplug. Seems straightforward enough to me. Reviewed-by: Keith Packard kei...@keithp.com -- keith.pack...@intel.com pgp4q3QXerKZm.pgp Description: PGP signature

[PATCH] include: document _XkbErrCode2 macros

2012-06-20 Thread Peter Hutterer
Why sending the number of the (implementation-dependent) error statement to the client is a good idea is a bit beyond me, but at least document it so we can all share the despair. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Yes, this is really how it's used in the XKB code.

[PATCH] kdrive: adjust BlockHandler/WakeupHandler to new API

2012-06-20 Thread Peter Hutterer
Missing API update caused Xephyr to crash on startup, garbage memory dereference when accessing timeout. Introduced in 1f0e8bd5eb1a5539689cfc4f5a6b86b530907ec5 kdrive.c:868:27: warning: assignment from incompatible pointer type kdrive.c:869:28: warning: assignment from incompatible pointer type

[PATCH] randr: first check pScrPriv before using the pointer at RRFirstOutput

2012-06-20 Thread Ricardo Salveti de Araujo
Fix a seg fault in case pScrPriv is NULL at ProcRRGetScreenInfo, which later calls RRFirstOutput. Signed-off-by: Ricardo Salveti de Araujo ricardo.salv...@linaro.org --- randr/randr.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/randr/randr.c b/randr/randr.c index 4d4298a..103da48

Re: [PATCH 3/4] Fix dtrace hook special object generation

2012-06-20 Thread Alan Coopersmith
Sorry, but I tried a bunch of stuff before finally remembering why it is I had to do it this way - the ELF magic for dtrace probes on Solaris gets lost building static libraries, so we lose all the probes when you convert to *.la files.Maybe we can find some other way around this, but since

Re: [PATCH 1/4] AC_SUBST the GLX_SYS_LIBS

2012-06-20 Thread Alan Coopersmith
On 06/18/12 05:59 PM, Peter Hutterer wrote: On Mon, Jun 18, 2012 at 03:45:28PM -0700, Alan Coopersmith wrote: On 06/17/12 08:40 PM, Peter Hutterer wrote: libxservertest needs -lpthread from glxapi.c's pthread_once() call. Usually this would be pulled in by the XORG_LIBS but not when building

[PATCH] os: print newline after printing display name

2012-06-20 Thread Peter Hutterer
Much easier for scripts that try to read the display value off the file descriptor. Plus, this restores the behaviour we had for this patch in Fedora since server 1.6 (April 2009). https://bugzilla.redhat.com/show_bug.cgi?id=824594 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net ---

Re: [RFC PATCH:xf86-video-ati 9/15] Link with modules needed to build with no-undefined linking

2012-06-20 Thread Alan Coopersmith
On 06/14/12 06:27 AM, Gaetan Nadon wrote: On 12-06-13 06:31 PM, Alan Coopersmith wrote: On 06/12/12 12:06 AM, Michel Dänzer wrote: On Mon, 2012-06-11 at 18:36 -0700, Alan Coopersmith wrote: On 06/ 1/12 02:56 AM, Michel Dänzer wrote: On Fre, 2012-05-25 at 08:02 -0700, Alan Coopersmith wrote:

Re: [PATCH] kdrive: adjust BlockHandler/WakeupHandler to new API

2012-06-20 Thread Keith Packard
Peter Hutterer peter.hutte...@who-t.net writes: Missing API update caused Xephyr to crash on startup, garbage memory dereference when accessing timeout. Introduced in 1f0e8bd5eb1a5539689cfc4f5a6b86b530907ec5 kdrive.c:868:27: warning: assignment from incompatible pointer type

Re: [PATCH] randr: first check pScrPriv before using the pointer at RRFirstOutput

2012-06-20 Thread Keith Packard
Ricardo Salveti de Araujo ricardo.salv...@linaro.org writes: Fix a seg fault in case pScrPriv is NULL at ProcRRGetScreenInfo, which later calls RRFirstOutput. Do you have a stack trace for this case? It shouldn't ever happen, I don't think. -- keith.pack...@intel.com pgpkGGkGETBlo.pgp

Re: [PATCH 3/4] Fix dtrace hook special object generation

2012-06-20 Thread Keith Packard
Alan Coopersmith alan.coopersm...@oracle.com writes: Perhaps we can isolate the .la avoidance to just Solaris and leave Linux MacOS using .la's for these? No-one should be using .la files; they're a pox. -- keith.pack...@intel.com pgpRfWSVST0gn.pgp Description: PGP signature

[PULL: xserver master] comment warning fixes

2012-06-20 Thread Alan Coopersmith
The following changes since commit 3f97284b10c250457888902debd4d793cb4544d4: dri2: Pass a ScreenPtr through to the driver's AuthMagic function. (v3) (2012-06-20 11:56:55 -0700) are available in the git repository at: git://people.freedesktop.org/~alanc/xserver.git master for you to fetch

[PATCH v2] os: print newline after printing display name

2012-06-20 Thread Peter Hutterer
Much easier for scripts that try to read the display value off the file descriptor. Plus, this restores the behaviour we had for this patch in Fedora since server 1.6 (April 2009). Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- alanc pointed me to why the \n wasn't part of