Re: [PATCH v3 1/1] os: added the -upstart option for Upstart's signaling method.

2010-07-14 Thread Peter Hutterer
On Wed, Jul 14, 2010 at 07:49:39AM +0300, Oliver McFadden wrote:
 This is very similar to the RunFromSmartParent (implicit) option, except
 we do not send the signal to our parent process, but our own process
 instead, and that signal is SIGSTOP, not SIGUSR1.
 
 Upstart will detect this, realize that we are ready to accept clients
 now, send us SIGCONT and move our job status from SPAWNED to RUNNING.
 
 Signed-off-by: Oliver McFadden oliver.mcfad...@nokia.com
 ---
 v3: resend patch because it seems to have been idle for some time...
 - changed kill(getpid()) to raise().

this seems rather oddly named to me. Ok, upstart may use this one now but
are any of the proposed alternatives using similar methods? (systemd maybe?) 

might be better to use a more descriptive flag like -sigstop that
describes what we actually do instead of hooking it onto a caller's name.
solves two future problems: 
- if upstart changes the signaling method we don't have a need for a
  -upstart2, -upstart3 flag
- if others use similar methods, you don't have to start with -upstart for
  systemd
both outcomes would be rather confusing, imo.

Cheers,
  Peter

  include/opaque.h |1 +
  os/connection.c  |5 +
  os/utils.c   |5 +
  3 files changed, 11 insertions(+), 0 deletions(-)
 
 diff --git a/include/opaque.h b/include/opaque.h
 index b3c7c70..f8c 100644
 --- a/include/opaque.h
 +++ b/include/opaque.h
 @@ -55,6 +55,7 @@ extern _X_EXPORT int defaultBackingStore;
  extern _X_EXPORT Bool disableBackingStore;
  extern _X_EXPORT Bool enableBackingStore;
  extern _X_EXPORT Bool PartialNetwork;
 +extern _X_EXPORT Bool RunFromUpstart;
  #ifndef NOLOGOHACK
  extern _X_EXPORT int logoScreenSaver;
  #endif
 diff --git a/os/connection.c b/os/connection.c
 index c143fb6..53f7f8c 100644
 --- a/os/connection.c
 +++ b/os/connection.c
 @@ -146,6 +146,8 @@ Bool NewOutputPending;/* not yet attempted to 
 write some new output */
  Bool AnyClientsWriteBlocked; /* true if some client blocked on write */
  
  static Bool RunFromSmartParent;  /* send SIGUSR1 to parent process */
 +Bool RunFromUpstart; /* send SIGSTOP to our own process;
 +Upstart will send SIGCONT back. */
  Bool PartialNetwork; /* continue even if unable to bind all addrs */
  static Pid_t ParentProcess;
  
 @@ -357,6 +359,9 @@ NotifyParentProcess(void)
   kill (ParentProcess, SIGUSR1);
   }
  }
 +if (RunFromUpstart) {
 + raise (SIGSTOP);
 +}
  #endif
  }
  
 diff --git a/os/utils.c b/os/utils.c
 index 51455cc..f176af4 100644
 --- a/os/utils.c
 +++ b/os/utils.c
 @@ -527,6 +527,7 @@ void UseMsg(void)
  #endif
  ErrorF(-dumbSched Disable smart scheduling, enable old 
 behavior\n);
  ErrorF(-schedInterval int Set scheduler interval in msec\n);
 +ErrorF(-upstart   Enable support for Upstart's signaling 
 method\n);
  ErrorF(+extension nameEnable extension\n);
  ErrorF(-extension nameDisable extension\n);
  #ifdef XDMCP
 @@ -922,6 +923,10 @@ ProcessCommandLine(int argc, char *argv[])
   else
   UseMsg ();
   }
 + else if ( strcmp( argv[i], -upstart) == 0)
 + {
 + RunFromUpstart = TRUE;
 + }
   else if ( strcmp( argv[i], +extension) == 0)
   {
   if (++i  argc)
 -- 
 1.7.1.245.g7c42e
___
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 1/1] os: added the -sigstop option for Upstart (or equivalent) startup.

2010-07-14 Thread Oliver McFadden
This is very similar to the RunFromSmartParent (implicit) option, except
we do not send the signal to our parent process, but our own process
instead, and that signal is SIGSTOP, not SIGUSR1.

Upstart or a similar equivalent program will detect this, realize that
we are ready to accept clients now, send us SIGCONT and move our job
status from SPAWNED to RUNNING.

Signed-off-by: Oliver McFadden oliver.mcfad...@nokia.com
---
 include/opaque.h |1 +
 os/connection.c  |5 +
 os/utils.c   |5 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/opaque.h b/include/opaque.h
index b3c7c70..dfe440c 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -55,6 +55,7 @@ extern _X_EXPORT int defaultBackingStore;
 extern _X_EXPORT Bool disableBackingStore;
 extern _X_EXPORT Bool enableBackingStore;
 extern _X_EXPORT Bool PartialNetwork;
+extern _X_EXPORT Bool RunFromSigStopParent;
 #ifndef NOLOGOHACK
 extern _X_EXPORT int logoScreenSaver;
 #endif
diff --git a/os/connection.c b/os/connection.c
index c143fb6..c596731 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -146,6 +146,8 @@ Bool NewOutputPending;  /* not yet attempted to 
write some new output */
 Bool AnyClientsWriteBlocked;   /* true if some client blocked on write */
 
 static Bool RunFromSmartParent;/* send SIGUSR1 to parent process */
+Bool RunFromSigStopParent; /* send SIGSTOP to our own process; Upstart (or
+  equivalent) will send SIGCONT back. */
 Bool PartialNetwork;   /* continue even if unable to bind all addrs */
 static Pid_t ParentProcess;
 
@@ -357,6 +359,9 @@ NotifyParentProcess(void)
kill (ParentProcess, SIGUSR1);
}
 }
+if (RunFromSigStopParent) {
+   raise (SIGSTOP);
+}
 #endif
 }
 
diff --git a/os/utils.c b/os/utils.c
index 51455cc..f30674b 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -527,6 +527,7 @@ void UseMsg(void)
 #endif
 ErrorF(-dumbSched Disable smart scheduling, enable old 
behavior\n);
 ErrorF(-schedInterval int Set scheduler interval in msec\n);
+ErrorF(-sigstop   Enable SIGSTOP based startup\n);
 ErrorF(+extension nameEnable extension\n);
 ErrorF(-extension nameDisable extension\n);
 #ifdef XDMCP
@@ -922,6 +923,10 @@ ProcessCommandLine(int argc, char *argv[])
else
UseMsg ();
}
+   else if ( strcmp( argv[i], -sigstop) == 0)
+   {
+   RunFromSigStopParent = TRUE;
+   }
else if ( strcmp( argv[i], +extension) == 0)
{
if (++i  argc)
-- 
1.7.1.245.g7c42e

___
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


RE: [Xorg-driver-geode] Rendering in geode

2010-07-14 Thread Jonathan Morton
On Wed, 2010-07-14 at 09:29 +0800, Huang, FrankR wrote:
 I have some understanding about your explanation. Is that to say if
 the source pixel is out of the source image, the modulus operation
 will be used to get the source pixel to to rendered, not for the
 rendering region.

 Take my example, the srcX is 11. So after the modulus operation, the
 source pixle used to rendering is (11%10, 0), that is (1,0). And
 because the rendering region is 40x40, so it will wrap back the (0,0)
 of the source image for the continuing rendering. Is that correct?

Essentially, yes.  I understand there is a slight language barrier here,
but I think your understanding is now correct.

-- 
--
From: Jonathan Morton
  jonathan.mor...@movial.com


___
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


Re: [PATCH] int10: Remove the vm86 and stub backends

2010-07-14 Thread Tiago Vignatti

Hi!

On Tue, Jul 13, 2010 at 11:32:54PM +0200, ext Adam Jackson wrote:
 vm86 has been defaulted off since 1.6, and is still a terrible idea to
 actually use.  Time to say goodbye.

My empirical evidences say that we can't do this. 

I had different behaviour running some systems with x86emu and vm86 in a
not-so-distant past. But it's empirical, as I said; I can't say if the problem
in fact is with real mode calls or a mix of the type of real mode with monitor
info protocols (DDC1, VBE, I2C, etc.). I gave up tracing it.

Also, note we have around fours bugs about people having problems with x86emu
- I know this is not a justification to not remove vm86 though:

https://bugs.freedesktop.org/show_bug.cgi?id=18160
https://bugs.freedesktop.org/show_bug.cgi?id=9206
https://bugs.freedesktop.org/show_bug.cgi?id=20849
https://bugs.freedesktop.org/show_bug.cgi?id=14332


(Damn, I was very very attempted to s-o-b this patch, Ajax!)

 
 The stub backend is only ever built by default on freebsd/ppc, and can't
 be doing any good there.  The right fix is --disable-int10 if you want
 to not ship int10 support.

Makes more sense to separate this hunk in another patch.


Thanks,
 Tiago
___
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


Re: [PATCH] VGA arbiter: No need for arbitration around CreateGC.

2010-07-14 Thread Tiago Vignatti
On Wed, Jul 14, 2010 at 12:35:12AM +0200, ext Jamey Sharp wrote:
 None of XAA, EXA, or UXA do any hardware access during CreateGC, so they
 don't need VGA arbitration. I haven't found any open source drivers that
 hook CreateGC, so they're safe. I'd be surprised if any driver directly
 hooks CreateGC and does hardware access from it and needs VGA
 arbitration.
 
 Signed-off-by: Jamey Sharp ja...@minilop.net

as discussed already in private: 

Signed-off-by: Tiago Vignatti tiago.vigna...@nokia.com


Cheers,
 Tiago
___
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


[RFC] dri2: Expose API for drivers to set drawable swap limit.

2010-07-14 Thread Pauli Nieminen
This allows ddx to set swap_limit if there is variable number of
buffers for drawable.

This allows ddx driver to select triple buffering to avoid problems if
frame rate is close to VSYNC rate. While driver may want to keep
composite swaps double buffered to save memory.

Signed-off-by: Pauli Nieminen ext-pauli.niemi...@nokia.com
---

This patch is for 1.10. 

This is minimal patch that is requried to implement ddx controlled multi
buffering.

Do we need DRI2 request to set the number of buffers?
Client and DDX driver could communicate number of buffers using format field 
in getbuffers.

 hw/xfree86/dri2/dri2.c |   12 
 hw/xfree86/dri2/dri2.h |1 +
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 42b2db4..424fbd0 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -175,6 +175,18 @@ DRI2AllocateDrawable(DrawablePtr pDraw)
 return pPriv;
 }
 
+Bool
+DRI2SwapLimit(DrawablePtr pDraw, int swap_limit)
+{
+DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
+if (!pPriv)
+   return FALSE;
+
+pPriv-swap_limit = swap_limit;
+
+return TRUE;
+}
+
 typedef struct DRI2DrawableRefRec {
 XID  id;
 XID  dri2_id;
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index fe0bf6c..0e0bea4 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -251,6 +251,7 @@ extern _X_EXPORT DRI2BufferPtr 
*DRI2GetBuffersWithFormat(DrawablePtr pDraw,
int *out_count);
 
 extern _X_EXPORT void DRI2SwapInterval(DrawablePtr pDrawable, int interval);
+extern _X_EXPORT Bool DRI2SwapLimit(DrawablePtr pDraw, int swap_limit);
 extern _X_EXPORT int DRI2SwapBuffers(ClientPtr client, DrawablePtr pDrawable,
 CARD64 target_msc, CARD64 divisor,
 CARD64 remainder, CARD64 *swap_target,
-- 
1.6.3.3

___
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


Re: [PATCH] VGA arbiter: No need for arbitration around CreateGC.

2010-07-14 Thread Vignatti Tiago (Nokia-MS/Helsinki)
On Wed, Jul 14, 2010 at 03:19:11PM +0200, Vignatti Tiago (Nokia-MS/Helsinki) 
wrote:
 On Wed, Jul 14, 2010 at 12:35:12AM +0200, ext Jamey Sharp wrote:
  None of XAA, EXA, or UXA do any hardware access during CreateGC, so they
  don't need VGA arbitration. I haven't found any open source drivers that
  hook CreateGC, so they're safe. I'd be surprised if any driver directly
  hooks CreateGC and does hardware access from it and needs VGA
  arbitration.
  
  Signed-off-by: Jamey Sharp ja...@minilop.net
 
 as discussed already in private: 
 
 Signed-off-by: Tiago Vignatti tiago.vigna...@nokia.com
 

oops, I forgot to mention that you can remove the entire function wrapping
there, Jamey. Just remove VGAarbiterCreateGC entirely.

Also, if all GC operations don't touch the hw at all for all kind of accel,
then we can extend this patch for the other functions there.


Thanks,
 Tiago
___
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


Re: [PATCH 2/2] Delete Colormap-devPriv. It isn't used any more.

2010-07-14 Thread Tiago Vignatti
On Wed, Jul 14, 2010 at 12:37:08AM +0200, ext Jamey Sharp wrote:
 Signed-off-by: Jamey Sharp ja...@minilop.net
 ---
  include/colormapst.h |4 +---
  1 files changed, 1 insertions(+), 3 deletions(-)
 
 diff --git a/include/colormapst.h b/include/colormapst.h
 index c4e24a6..bb79c86 100644
 --- a/include/colormapst.h
 +++ b/include/colormapst.h
 @@ -113,9 +113,7 @@ typedef struct _ColormapRec
  Entry*red;
  Entry*green;
  Entry*blue;
 -pointer  devPriv;
 -PrivateRec   *devPrivates;   /* dynamic devPrivates added after 
 devPriv
 -already existed - must keep devPriv */
 +PrivateRec   *devPrivates;
  } ColormapRec;
 
  #endif /* COLORMAP_H */

Reviewed-by: Tiago Vignatti tiago.vigna...@nokia.com

 Tiago
___
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


[PULL libXi] Random patches fixing memory leaks, uninitialized variables and display locking

2010-07-14 Thread Pauli Nieminen
Hi,

I have has a few libXi patches lying around. First 5 patches were reviewed by 
Julien Cristau but the last one didn't get any review.

Pauli

The following changes since commit d36447a69789b7acfd54b625caa299780480:
  Matt Dew (1):
specs: convert input .ms specs from xorg-docs module to DocBook XML

are available in the git repository at:

  git://anongit.freedesktop.org/~suokko/libXi.git small_fixes

Pauli Nieminen (6):
  Fix usage of uninitialized value
  Fix memory leak in XIGetSelectedEvents
  Use single error path in XQueryDeviceState
  Use single error path in XGetFeedbackControl
  Use single error path in XGetDeviceControl
  Always unlock display correctly

 src/XGetDCtl.c |   23 +--
 src/XGetFCtl.c |   23 +--
 src/XIProperties.c |1 +
 src/XISelEv.c  |   33 -
 src/XQueryDv.c |   24 +---
 5 files changed, 44 insertions(+), 60 deletions(-)
___
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


Re: [PATCH] VGA arbiter: No need for arbitration around CreateGC.

2010-07-14 Thread Jamey Sharp
Thanks for reviewing! (And thanks to Alex and Jeremy for this round of
reviews too!)

I don't quite understand your comments on this patch, though, Tiago.

On Wed, Jul 14, 2010 at 6:25 AM, Vignatti Tiago (Nokia-MS/Helsinki)
tiago.vigna...@nokia.com wrote:
 On Wed, Jul 14, 2010 at 03:19:11PM +0200, Vignatti Tiago (Nokia-MS/Helsinki) 
 wrote:
 as discussed already in private:

     Signed-off-by: Tiago Vignatti tiago.vigna...@nokia.com

First, I don't understand this use of signed-off-by. Did you mean reviewed-by?

 oops, I forgot to mention that you can remove the entire function wrapping
 there, Jamey. Just remove VGAarbiterCreateGC entirely.

That's why I want this patch applied, but I believe the rest of the
patches on my for-1.10 branch are needed before it's safe to entirely
delete this function, and I haven't sent those out for review yet.

Currently, as far as I can tell, the VGA arbiter needs a wrapper
around ValidateGC, just so that it can unwrap the ops on the way down
the ValidateGC chain, in case some other ValidateGC wrapper changes
the ops pointer. And the current way to get a wrapper around
ValidateGC is to hook the funcs chain from CreateGC.

When my later patches impose the rule that GC funcs must not modify
the GC ops, then it's safe to delete an awful lot of code, and even
more when I then move the funcs and ops chains to the ScreenRec.

 Also, if all GC operations don't touch the hw at all for all kind of accel,
 then we can extend this patch for the other functions there.

I don't think anybody's GC funcs touch the hardware, which is good
since the VGA arbiter is already not taking the arbitration lock
around those. But hopefully somebody's GC ops are touching the
hardware or else the whole ops abstraction is pointless.

With those clarifications, are you satisfied with this patch?

Jamey
___
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

Re: [PATCH] VGA arbiter: No need for arbitration around CreateGC.

2010-07-14 Thread Vignatti Tiago (Nokia-MS/Helsinki)
Hey Jamey!

On Wed, Jul 14, 2010 at 04:25:39PM +0200, ext Jamey Sharp wrote:
 On Wed, Jul 14, 2010 at 6:25 AM, Vignatti Tiago (Nokia-MS/Helsinki)
 tiago.vigna...@nokia.com wrote:
  On Wed, Jul 14, 2010 at 03:19:11PM +0200, Vignatti Tiago 
  (Nokia-MS/Helsinki) wrote:
  as discussed already in private:
 
      Signed-off-by: Tiago Vignatti tiago.vigna...@nokia.com
 
 First, I don't understand this use of signed-off-by. Did you mean reviewed-by?

No, I meant s-o-b.

From http://lxr.linux.no/#linux+v2.6.34.1/Documentation/SubmittingPatches: 

The Signed-off-by: tag indicates that the signer was involved in the
development of the patch, or that he/she was in the patch's delivery path.

So I considered myself involved in the development of the patch (given our
messages exchanged in pvt). Anyway, this is just nitpick...

 
  oops, I forgot to mention that you can remove the entire function wrapping
  there, Jamey. Just remove VGAarbiterCreateGC entirely.
 
 That's why I want this patch applied, but I believe the rest of the
 patches on my for-1.10 branch are needed before it's safe to entirely
 delete this function, and I haven't sent those out for review yet.
 
 Currently, as far as I can tell, the VGA arbiter needs a wrapper
 around ValidateGC, just so that it can unwrap the ops on the way down
 the ValidateGC chain, in case some other ValidateGC wrapper changes
 the ops pointer. And the current way to get a wrapper around
 ValidateGC is to hook the funcs chain from CreateGC.
 
 When my later patches impose the rule that GC funcs must not modify
 the GC ops, then it's safe to delete an awful lot of code, and even
 more when I then move the funcs and ops chains to the ScreenRec.

All right.

 
  Also, if all GC operations don't touch the hw at all for all kind of accel,
  then we can extend this patch for the other functions there.
 
 I don't think anybody's GC funcs touch the hardware, which is good
 since the VGA arbiter is already not taking the arbitration lock
 around those. But hopefully somebody's GC ops are touching the
 hardware or else the whole ops abstraction is pointless.
 
 With those clarifications, are you satisfied with this patch?

Yes! :)
 Tiago
___
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] miPolyGlyphBlt: Delete redundant ValidateGC.

2010-07-14 Thread Jamey Sharp
The caller is required to have validated the GC for the drawable before
calling any ops, including PolyGlyphBlt.

Signed-off-by: Jamey Sharp ja...@minilop.net
---
 mi/miglblt.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/mi/miglblt.c b/mi/miglblt.c
index 13efb0c..9edb500 100644
--- a/mi/miglblt.c
+++ b/mi/miglblt.c
@@ -182,8 +182,6 @@ miPolyGlyphBlt(
0, 0, gWidth, gHeight, 
0, XYBitmap, (char *)pb);
 
-   if ((pGC-serialNumber) != (pDrawable-serialNumber))
-   ValidateGC(pDrawable, pGC);
(*pGC-ops-PushPixels)(pGC, pPixmap, pDrawable,
   gWidth, gHeight,
   x + pci-metrics.leftSideBearing,
-- 
1.7.0

___
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


Re: [PATCH] Remove xcalibrate and tslib support

2010-07-14 Thread Tiago Vignatti

Hi Timothy! Sorry to reply this thread so late.

On Thu, Jul 08, 2010 at 08:34:20PM +0200, ext Timothy Meade wrote:
 
 I would rather move
 forward not backwards and getting XF86 to a usable memory footprint
 and startup time would certainly be moving forward (unacceptible
 startup time being any noticable delay between starting /usr/bin/X and
 completing vt switch). I have a very vague initial proposal for
 replacing kdrive ddx with a more modular and XF86 compatible
 replacement and am also researching optimization options for XF86,
 simplifiying probing and replacing with bus enumeration and maybe
 flattened device trees which Ubuntu/Linaro have shown interest in.

nice!

I kinda started to record some memory usage of Xorg and Xfbdev (with some help
of Ajax and Mikhail). You may find this interesting and would be nice if you
could run mem-usage script on your device to improve this info:

http://people.freedesktop.org/~vignatti/scrutinizing-x-mem/standalone-usage/

http://people.freedesktop.org/~vignatti/scrutinizing-x-mem/standalone-usage/xorg_2010-07-14_1.8.0RC1_mydevice.txt

http://people.freedesktop.org/~vignatti/scrutinizing-x-mem/standalone-usage/xfbdev_2010-03-25_dottedmag.txt


This second link shows a device running with ~ 4.5MB of RSS. This is with Xorg
1.8. On the third link you can see that Mikhail got ~ 3.9MB of RSS using
kdrive Xfbdev. That's not much difference when comparing with Xorg.

Xorg 1.9 will be bringing a bit more expertise regarding memory usage and
we're going to be able to disable other components that for instance I don't
care for my device (such as DBE, Xdmcp, libpciaccess). So, as Ajax stated,
it's very likely that we'll be able to delete kdrive hardware servers if
memory is the only advantage on those (and honestly I get always shocked when
someone comes to this mailing list mentioning that still using kdrive. Move on
:)


Cheers,

 Tiago
___
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


Re: [PATCH] VGA arbiter: No need for arbitration around CreateGC.

2010-07-14 Thread Jamey Sharp
On Wed, Jul 14, 2010 at 7:44 AM, Vignatti Tiago (Nokia-MS/Helsinki)
tiago.vigna...@nokia.com wrote:
 On Wed, Jul 14, 2010 at 04:25:39PM +0200, ext Jamey Sharp wrote:
 First, I don't understand this use of signed-off-by. Did you mean 
 reviewed-by?

 So I considered myself involved in the development of the patch (given our
 messages exchanged in pvt). Anyway, this is just nitpick...

Ah, I see! Signed-off-by it is then.

 With those clarifications, are you satisfied with this patch?

 Yes! :)

Hooray! :-) Now 14 of my 42 patches for 1.10 are ready for merge... :-)

I'm hoping to get most of the remaining 13 that I've already sent out
reviewed before sending my big XAA series or the massive cleanups that
follow that, but I think the whole series is stable and reviewable at
this point. I have more patches to write though...

http://patchwork.freedesktop.org/project/Xorg/list/?submitter=45
http://cgit.freedesktop.org/~jamey/xserver/log/?h=for-1.10

Jamey
___
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


Re: [RFC] dri2: Expose API for drivers to set drawable swap limit.

2010-07-14 Thread Jesse Barnes
On Wed, 14 Jul 2010 16:20:40 +0300
Pauli Nieminen ext-pauli.niemi...@nokia.com wrote:

 This allows ddx to set swap_limit if there is variable number of
 buffers for drawable.
 
 This allows ddx driver to select triple buffering to avoid problems if
 frame rate is close to VSYNC rate. While driver may want to keep
 composite swaps double buffered to save memory.
 
 Signed-off-by: Pauli Nieminen ext-pauli.niemi...@nokia.com
 ---

Have you tested this?  I think there are a few things on the server
side that need work to make triple (or more) buffering work.  Here's
the patch I last used to work on it...

To make things fast, you'll need some extra buffers allocated in the
DRI2 drawable, and you'll need to switch between them at swapbuffers
time, along with upping the swap_limit.

-- 
Jesse Barnes, Intel Open Source Technology Center
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index f9ba8e7..93634ba 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -82,6 +82,8 @@ typedef struct _DRI2Drawable {
 CARD64		 last_swap_msc; /* msc at completion of most recent swap */
 CARD64		 last_swap_ust; /* ust at completion of most recent swap */
 int			 swap_limit; /* for N-buffering */
+Bool		 triple_buffer;
+DRI2BufferPtr	 extra_back; /* for triple buffering */
 } DRI2DrawableRec, *DRI2DrawablePtr;
 
 typedef struct _DRI2Screen {
@@ -163,6 +165,8 @@ DRI2AllocateDrawable(DrawablePtr pDraw)
 pPriv-last_swap_msc = 0;
 pPriv-last_swap_ust = 0;
 list_init(pPriv-reference_list);
+pPriv-triple_buffer = TRUE;
+pPriv-extra_back = NULL;
 
 if (pDraw-type == DRAWABLE_WINDOW) {
 	pWin = (WindowPtr) pDraw;
@@ -371,7 +375,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
 int need_real_front = 0;
 int need_fake_front = 0;
 int have_fake_front = 0;
-int front_format = 0;
+int front_format = 0, back_format = 0;
 int dimensions_match;
 int buffers_changed = 0;
 int i;
@@ -408,6 +412,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
 	if (attachment == DRI2BufferBackLeft) {
 	need_real_front++;
 	front_format = format;
+	back_format = format;
 	}
 
 	if (attachment == DRI2BufferFrontLeft) {
@@ -427,6 +432,17 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
 	}
 }
 
+if (pPriv-triple_buffer) {
+	if (!dimensions_match) {
+	(*ds-DestroyBuffer)(pDraw, pPriv-extra_back);
+	pPriv-extra_back = NULL;
+	}
+
+	if (!pPriv-extra_back)
+	pPriv-extra_back = (*ds-CreateBuffer)(pDraw, DRI2BufferBackLeft,
+		back_format);
+}
+
 if (need_real_front  0) {
 	if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFrontLeft,
  front_format, dimensions_match,
@@ -727,6 +743,16 @@ DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame,
 pPriv-last_swap_msc = frame;
 pPriv-last_swap_ust = ust;
 
+if (pPriv-triple_buffer) {
+	DRI2BufferPtr tmp;
+	int i;
+
+	i = find_attachment(pPriv, DRI2BufferBackLeft);
+	tmp = pPriv-extra_back;
+	pPriv-extra_back = pPriv-buffers[i];
+	pPriv-buffers[i] = tmp;
+}
+
 DRI2WakeClient(client, pDraw, frame, tv_sec, tv_usec);
 }
 
___
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

Re: [PATCH] miPolyGlyphBlt: Delete redundant ValidateGC.

2010-07-14 Thread Keith Packard
On Wed, 14 Jul 2010 07:57:11 -0700, Jamey Sharp ja...@minilop.net wrote:
 The caller is required to have validated the GC for the drawable before
 calling any ops, including PolyGlyphBlt.

Reviewed-by: Keith Packard kei...@keithp.com

-- 
keith.pack...@intel.com


pgpGNfHKDQ1kI.pgp
Description: PGP signature
___
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 2/2] rootless: ROOTLESS_GLOBAL_COORDS is always set, so unifdef it.

2010-07-14 Thread Jamey Sharp
Signed-off-by: Jamey Sharp ja...@minilop.net
Cc: Jeremy Huddleston jerem...@apple.com
Cc: Jon TURNEY jon.tur...@dronecode.org.uk
---
 miext/rootless/rootlessConfig.h |2 --
 miext/rootless/README.txt   |   15 ++-
 miext/rootless/rootless.h   |5 +
 miext/rootless/rootlessCommon.c |2 --
 miext/rootless/rootlessWindow.c |5 -
 5 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/rootlessConfig.h
index 9082ac2..a6c0d25 100644
--- a/miext/rootless/rootlessConfig.h
+++ b/miext/rootless/rootlessConfig.h
@@ -36,7 +36,6 @@
 
 #ifdef __APPLE__
 
-# define ROOTLESS_GLOBAL_COORDS TRUE
 # define ROOTLESS_PROTECT_ALPHA TRUE
 # define ROOTLESS_REDISPLAY_DELAY 10
 # define ROOTLESS_RESIZE_GRAVITY TRUE
@@ -51,7 +50,6 @@
 
 #if defined(__CYGWIN__) || defined(WIN32)
 
-# define ROOTLESS_GLOBAL_COORDS TRUE
 # define ROOTLESS_PROTECT_ALPHA NO
 # define ROOTLESS_REDISPLAY_DELAY 10
 # undef  ROOTLESS_RESIZE_GRAVITY
diff --git a/miext/rootless/README.txt b/miext/rootless/README.txt
index 8a6df74..7ec5c41 100644
--- a/miext/rootless/README.txt
+++ b/miext/rootless/README.txt
@@ -76,15 +76,6 @@ rootlessConfig.h to specify compile time options for its 
platform.
 The following compile-time options are defined in 
 rootlessConfig.h:
 
-  o ROOTLESS_GLOBAL_COORDS: This option controls the way that frame
-coordinates are passed to the rootless implementation. If false,
-the coordinates are passed per screen relative to the origin of 
-the screen the frame is currently on. Some implementations may 
-prefer to work in a single global coordinate space that spans all 
-screens. If this option is true, the coordinates are passed after 
-adding the coordinates of the screen origin and an overall offset of 
-(rootlessGlobalOffsetX, rootlessGlobalOffsetY).
-
   o ROOTLESS_PROTECT_ALPHA: By default for a color bit depth of 24 and
 32 bits per pixel, fb will overwrite the unused 8 bits to optimize
 drawing speed. If this is true, the alpha channel of frames is
@@ -107,8 +98,7 @@ rootlessConfig.h:
 
 The following runtime options are defined in rootless.h:
 
-  o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These are only 
-used if ROOTLESS_GLOBAL_COORDS is true. They specify the global
+  o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These specify the global
 offset that is applied to all screens when converting from
 screen-local to global coordinates.
 
@@ -182,8 +172,7 @@ implementation to indicate the frame to operate on.
  *  initialized before calling except for pFrame-wid, which
  *  is set by this function.
  *  pScreen Screen on which to place the new frame
- *  newX, newY  Position of the frame. These will be identical to pFrame-x,
- *  pFrame-y unless ROOTLESS_GLOBAL_COORDS is set.
+ *  newX, newY  Position of the frame.
  *  pNewShape   Shape for the frame (in frame-local coordinates). NULL for
  *  unshaped frames.
  */
diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h
index 2e6e782..359d6c1 100644
--- a/miext/rootless/rootless.h
+++ b/miext/rootless/rootless.h
@@ -76,10 +76,8 @@ typedef struct _RootlessWindowRec {
 
 
 /* Offset for screen-local to global coordinate transforms */
-#ifdef ROOTLESS_GLOBAL_COORDS
 extern int rootlessGlobalOffsetX;
 extern int rootlessGlobalOffsetY;
-#endif
 
 /* The minimum number of bytes or pixels for which to use the
implementation's accelerated functions. */
@@ -130,8 +128,7 @@ enum rl_gravity_enum {
  *  initialized before calling except for pFrame-wid, which
  *  is set by this function.
  *  pScreen Screen on which to place the new frame
- *  newX, newY  Position of the frame. These will be identical to pFrame-x,
- *  pFrame-y unless ROOTLESS_GLOBAL_COORDS is set.
+ *  newX, newY  Position of the frame.
  *  pNewShape   Shape for the frame (in frame-local coordinates). NULL for
  *  unshaped frames.
  */
diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c
index f84214c..219844a 100644
--- a/miext/rootless/rootlessCommon.c
+++ b/miext/rootless/rootlessCommon.c
@@ -43,10 +43,8 @@ unsigned int rootless_CopyBytes_threshold = 0;
 unsigned int rootless_FillBytes_threshold = 0;
 unsigned int rootless_CompositePixels_threshold = 0;
 unsigned int rootless_CopyWindow_threshold = 0;
-#ifdef ROOTLESS_GLOBAL_COORDS
 int rootlessGlobalOffsetX = 0;
 int rootlessGlobalOffsetY = 0;
-#endif
 
 RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL};
 
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 72208cb..e4d936b 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -51,15 +51,10 @@ extern Bool no_configure_window;
 #include rootlessCommon.h
 #include 

[PATCH 1/2] rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it.

2010-07-14 Thread Jamey Sharp
Signed-off-by: Jamey Sharp ja...@minilop.net
Cc: Jeremy Huddleston jerem...@apple.com
Cc: Jon TURNEY jon.tur...@dronecode.org.uk
---
 miext/rootless/rootlessConfig.h |2 --
 hw/xwin/winscrinit.c|2 --
 miext/rootless/README.txt   |   19 ++-
 miext/rootless/rootless.h   |   16 +++-
 miext/rootless/rootlessCommon.c |   35 ---
 miext/rootless/rootlessWindow.c |   18 --
 6 files changed, 5 insertions(+), 87 deletions(-)

diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/rootlessConfig.h
index 50bac3f..9082ac2 100644
--- a/miext/rootless/rootlessConfig.h
+++ b/miext/rootless/rootlessConfig.h
@@ -40,7 +40,6 @@
 # define ROOTLESS_PROTECT_ALPHA TRUE
 # define ROOTLESS_REDISPLAY_DELAY 10
 # define ROOTLESS_RESIZE_GRAVITY TRUE
-# undef  ROOTLESS_TRACK_DAMAGE
 /*# define ROOTLESSDEBUG*/
 
 /* Bit mask for alpha channel with a particular number of bits per
@@ -56,7 +55,6 @@
 # define ROOTLESS_PROTECT_ALPHA NO
 # define ROOTLESS_REDISPLAY_DELAY 10
 # undef  ROOTLESS_RESIZE_GRAVITY
-# undef  ROOTLESS_TRACK_DAMAGE
 /*# define ROOTLESSDEBUG*/
 
 # define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF00 : 0)
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index 47e9b6d..1b40933 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -54,9 +54,7 @@ winMWExtWMProcs = {
   winMWExtWMStartDrawing,
   winMWExtWMStopDrawing,
   winMWExtWMUpdateRegion,
-#ifndef ROOTLESS_TRACK_DAMAGE
   winMWExtWMDamageRects,
-#endif
   winMWExtWMRootlessSwitchWindow,
   NULL,//winMWExtWMDoReorderWindow,
   NULL,//winMWExtWMHideWindow,
diff --git a/miext/rootless/README.txt b/miext/rootless/README.txt
index 2c3fbb0..8a6df74 100644
--- a/miext/rootless/README.txt
+++ b/miext/rootless/README.txt
@@ -105,18 +105,6 @@ rootlessConfig.h:
 during resizing and rely on the frame contents being preserved
 accordingly.
 
-  o ROOTLESS_TRACK_DAMAGE: The generic rootless layer draws to the
-frames' backing buffers and periodically flushes the modified
-regions to the underlying window server. If this option is true,
-the generic rootless layer will track these damaged regions. 
-Currently it uses the miRegion code and will not simplify damaged 
-regions even when updating a bounding region would be more 
-efficient. Some window systems provide a more efficient way to 
-track damaged regions. If this option is false, the rootless 
-implementation function DamageRects() is called whenever a 
-backing buffer is modified and the rootless implementation is 
-expected to track the damaged regions itself.
-
 The following runtime options are defined in rootless.h:
 
   o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These are only 
@@ -287,8 +275,7 @@ typedef void (*RootlessStartDrawingProc)
  *  is started again.
  *
  *  wid Frame id
- *  flush   Flush drawing updates for this frame to the screen. This
- *  will always be FALSE if ROOTLESS_TRACK_DAMAGE is set.
+ *  flush   Flush drawing updates for this frame to the screen.
  */
 typedef void (*RootlessStopDrawingProc)
 (RootlessFrameID wid, Bool flush);
@@ -299,15 +286,13 @@ typedef void (*RootlessStopDrawingProc)
  *
  *  wid Frame id
  *  pDamage Region containing all the changed pixels in frame-local
- *  coordinates. This is clipped to the window's clip. This
- *  will be NULL if ROOTLESS_TRACK_DAMAGE is not set.
+ *  coordinates. This is clipped to the window's clip.
  */
 typedef void (*RootlessUpdateRegionProc)
 (RootlessFrameID wid, RegionPtr pDamage);
 
 /*
  * Mark damaged rectangles as requiring redisplay to screen.
- *  This will only be called if ROOTLESS_TRACK_DAMAGE is not set.
  *
  *  wid Frame id
  *  nrects  Number of damaged rectangles
diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h
index 00eac4e..2e6e782 100644
--- a/miext/rootless/rootless.h
+++ b/miext/rootless/rootless.h
@@ -68,10 +68,6 @@ typedef struct _RootlessWindowRec {
 
 PixmapPtr pixmap;
 
-#ifdef ROOTLESS_TRACK_DAMAGE
-RegionRec damage;
-#endif
-
 unsigned int is_drawing :1;// Currently drawing?
 unsigned int is_reorder_pending :1;
 unsigned int is_offscreen :1;
@@ -227,8 +223,7 @@ typedef void (*RootlessStartDrawingProc)
  *  is started again.
  *
  *  wid Frame id
- *  flush   Flush drawing updates for this frame to the screen. This
- *  will always be FALSE if ROOTLESS_TRACK_DAMAGE is set.
+ *  flush   Flush drawing updates for this frame to the screen.
  */
 typedef void (*RootlessStopDrawingProc)
 (RootlessFrameID wid, Bool flush);
@@ -239,15 +234,13 @@ typedef void (*RootlessStopDrawingProc)
  *
  *  wid Frame id
  *  pDamage Region containing all the changed pixels in frame-lcoal
- *  

Re: [PATCH 2/2] rootless: ROOTLESS_GLOBAL_COORDS is always set, so unifdef it.

2010-07-14 Thread Jeremy Huddleston

Reviewed-by: Jeremy Huddleston jerem...@apple.com

On Jul 14, 2010, at 11:44, Jamey Sharp wrote:


Signed-off-by: Jamey Sharp ja...@minilop.net
Cc: Jeremy Huddleston jerem...@apple.com
Cc: Jon TURNEY jon.tur...@dronecode.org.uk
---
miext/rootless/rootlessConfig.h |2 --
miext/rootless/README.txt   |   15 ++-
miext/rootless/rootless.h   |5 +
miext/rootless/rootlessCommon.c |2 --
miext/rootless/rootlessWindow.c |5 -
5 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/ 
rootlessConfig.h

index 9082ac2..a6c0d25 100644
--- a/miext/rootless/rootlessConfig.h
+++ b/miext/rootless/rootlessConfig.h
@@ -36,7 +36,6 @@

#ifdef __APPLE__

-# define ROOTLESS_GLOBAL_COORDS TRUE
# define ROOTLESS_PROTECT_ALPHA TRUE
# define ROOTLESS_REDISPLAY_DELAY 10
# define ROOTLESS_RESIZE_GRAVITY TRUE
@@ -51,7 +50,6 @@

#if defined(__CYGWIN__) || defined(WIN32)

-# define ROOTLESS_GLOBAL_COORDS TRUE
# define ROOTLESS_PROTECT_ALPHA NO
# define ROOTLESS_REDISPLAY_DELAY 10
# undef  ROOTLESS_RESIZE_GRAVITY
diff --git a/miext/rootless/README.txt b/miext/rootless/README.txt
index 8a6df74..7ec5c41 100644
--- a/miext/rootless/README.txt
+++ b/miext/rootless/README.txt
@@ -76,15 +76,6 @@ rootlessConfig.h to specify compile time options  
for its platform.

The following compile-time options are defined in
rootlessConfig.h:

-  o ROOTLESS_GLOBAL_COORDS: This option controls the way that  
frame
-coordinates are passed to the rootless implementation. If  
false,
-the coordinates are passed per screen relative to the  
origin of
-the screen the frame is currently on. Some implementations  
may
-prefer to work in a single global coordinate space that  
spans all
-screens. If this option is true, the coordinates are passed  
after
-adding the coordinates of the screen origin and an overall  
offset of

-(rootlessGlobalOffsetX, rootlessGlobalOffsetY).
-
  o ROOTLESS_PROTECT_ALPHA: By default for a color bit depth of  
24 and
32 bits per pixel, fb will overwrite the unused 8 bits to  
optimize

drawing speed. If this is true, the alpha channel of frames is
@@ -107,8 +98,7 @@ rootlessConfig.h:

The following runtime options are defined in rootless.h:

-  o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These are only
-used if ROOTLESS_GLOBAL_COORDS is true. They specify the  
global
+  o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These specify  
the global

offset that is applied to all screens when converting from
screen-local to global coordinates.

@@ -182,8 +172,7 @@ implementation to indicate the frame to operate  
on.
 *  initialized before calling except for pFrame-wid,  
which

 *  is set by this function.
 *  pScreen Screen on which to place the new frame
- *  newX, newY  Position of the frame. These will be identical to  
pFrame-x,

- *  pFrame-y unless ROOTLESS_GLOBAL_COORDS is set.
+ *  newX, newY  Position of the frame.
 *  pNewShape   Shape for the frame (in frame-local coordinates).  
NULL for

 *  unshaped frames.
 */
diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h
index 2e6e782..359d6c1 100644
--- a/miext/rootless/rootless.h
+++ b/miext/rootless/rootless.h
@@ -76,10 +76,8 @@ typedef struct _RootlessWindowRec {


/* Offset for screen-local to global coordinate transforms */
-#ifdef ROOTLESS_GLOBAL_COORDS
extern int rootlessGlobalOffsetX;
extern int rootlessGlobalOffsetY;
-#endif

/* The minimum number of bytes or pixels for which to use the
   implementation's accelerated functions. */
@@ -130,8 +128,7 @@ enum rl_gravity_enum {
 *  initialized before calling except for pFrame-wid,  
which

 *  is set by this function.
 *  pScreen Screen on which to place the new frame
- *  newX, newY  Position of the frame. These will be identical to  
pFrame-x,

- *  pFrame-y unless ROOTLESS_GLOBAL_COORDS is set.
+ *  newX, newY  Position of the frame.
 *  pNewShape   Shape for the frame (in frame-local coordinates).  
NULL for

 *  unshaped frames.
 */
diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/ 
rootlessCommon.c

index f84214c..219844a 100644
--- a/miext/rootless/rootlessCommon.c
+++ b/miext/rootless/rootlessCommon.c
@@ -43,10 +43,8 @@ unsigned int rootless_CopyBytes_threshold = 0;
unsigned int rootless_FillBytes_threshold = 0;
unsigned int rootless_CompositePixels_threshold = 0;
unsigned int rootless_CopyWindow_threshold = 0;
-#ifdef ROOTLESS_GLOBAL_COORDS
int rootlessGlobalOffsetX = 0;
int rootlessGlobalOffsetY = 0;
-#endif

RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL};

diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/ 
rootlessWindow.c

index 72208cb..e4d936b 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c

Re: [PATCH 1/2] rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it.

2010-07-14 Thread Jeremy Huddleston

Reviewed-by: Jeremy Huddleston jerem...@apple.com

On Jul 14, 2010, at 11:44, Jamey Sharp wrote:


Signed-off-by: Jamey Sharp ja...@minilop.net
Cc: Jeremy Huddleston jerem...@apple.com
Cc: Jon TURNEY jon.tur...@dronecode.org.uk
---
miext/rootless/rootlessConfig.h |2 --
hw/xwin/winscrinit.c|2 --
miext/rootless/README.txt   |   19 ++-
miext/rootless/rootless.h   |   16 +++-
miext/rootless/rootlessCommon.c |   35  
---

miext/rootless/rootlessWindow.c |   18 --
6 files changed, 5 insertions(+), 87 deletions(-)

diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/ 
rootlessConfig.h

index 50bac3f..9082ac2 100644
--- a/miext/rootless/rootlessConfig.h
+++ b/miext/rootless/rootlessConfig.h
@@ -40,7 +40,6 @@
# define ROOTLESS_PROTECT_ALPHA TRUE
# define ROOTLESS_REDISPLAY_DELAY 10
# define ROOTLESS_RESIZE_GRAVITY TRUE
-# undef  ROOTLESS_TRACK_DAMAGE
/*# define ROOTLESSDEBUG*/

/* Bit mask for alpha channel with a particular number of bits per
@@ -56,7 +55,6 @@
# define ROOTLESS_PROTECT_ALPHA NO
# define ROOTLESS_REDISPLAY_DELAY 10
# undef  ROOTLESS_RESIZE_GRAVITY
-# undef  ROOTLESS_TRACK_DAMAGE
/*# define ROOTLESSDEBUG*/

# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF00 : 0)
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index 47e9b6d..1b40933 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -54,9 +54,7 @@ winMWExtWMProcs = {
  winMWExtWMStartDrawing,
  winMWExtWMStopDrawing,
  winMWExtWMUpdateRegion,
-#ifndef ROOTLESS_TRACK_DAMAGE
  winMWExtWMDamageRects,
-#endif
  winMWExtWMRootlessSwitchWindow,
  NULL,//winMWExtWMDoReorderWindow,
  NULL,//winMWExtWMHideWindow,
diff --git a/miext/rootless/README.txt b/miext/rootless/README.txt
index 2c3fbb0..8a6df74 100644
--- a/miext/rootless/README.txt
+++ b/miext/rootless/README.txt
@@ -105,18 +105,6 @@ rootlessConfig.h:
during resizing and rely on the frame contents being preserved
accordingly.

-  o ROOTLESS_TRACK_DAMAGE: The generic rootless layer draws to  
the

-frames' backing buffers and periodically flushes the modified
-regions to the underlying window server. If this option is  
true,

-the generic rootless layer will track these damaged regions.
-Currently it uses the miRegion code and will not simplify  
damaged

-regions even when updating a bounding region would be more
-efficient. Some window systems provide a more efficient way  
to

-track damaged regions. If this option is false, the rootless
-implementation function DamageRects() is called whenever a
-backing buffer is modified and the rootless implementation is
-expected to track the damaged regions itself.
-
The following runtime options are defined in rootless.h:

  o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These are only
@@ -287,8 +275,7 @@ typedef void (*RootlessStartDrawingProc)
 *  is started again.
 *
 *  wid Frame id
- *  flush   Flush drawing updates for this frame to the screen.  
This

- *  will always be FALSE if ROOTLESS_TRACK_DAMAGE is set.
+ *  flush   Flush drawing updates for this frame to the screen.
 */
typedef void (*RootlessStopDrawingProc)
(RootlessFrameID wid, Bool flush);
@@ -299,15 +286,13 @@ typedef void (*RootlessStopDrawingProc)
 *
 *  wid Frame id
 *  pDamage Region containing all the changed pixels in frame- 
local
- *  coordinates. This is clipped to the window's clip.  
This

- *  will be NULL if ROOTLESS_TRACK_DAMAGE is not set.
+ *  coordinates. This is clipped to the window's clip.
 */
typedef void (*RootlessUpdateRegionProc)
(RootlessFrameID wid, RegionPtr pDamage);

/*
 * Mark damaged rectangles as requiring redisplay to screen.
- *  This will only be called if ROOTLESS_TRACK_DAMAGE is not set.
 *
 *  wid Frame id
 *  nrects  Number of damaged rectangles
diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h
index 00eac4e..2e6e782 100644
--- a/miext/rootless/rootless.h
+++ b/miext/rootless/rootless.h
@@ -68,10 +68,6 @@ typedef struct _RootlessWindowRec {

PixmapPtr pixmap;

-#ifdef ROOTLESS_TRACK_DAMAGE
-RegionRec damage;
-#endif
-
unsigned int is_drawing :1; // Currently drawing?
unsigned int is_reorder_pending :1;
unsigned int is_offscreen :1;
@@ -227,8 +223,7 @@ typedef void (*RootlessStartDrawingProc)
 *  is started again.
 *
 *  wid Frame id
- *  flush   Flush drawing updates for this frame to the screen.  
This

- *  will always be FALSE if ROOTLESS_TRACK_DAMAGE is set.
+ *  flush   Flush drawing updates for this frame to the screen.
 */
typedef void (*RootlessStopDrawingProc)
(RootlessFrameID wid, Bool flush);
@@ -239,15 +234,13 @@ typedef void (*RootlessStopDrawingProc)
 *
 *  wid Frame id
 *  pDamage Region containing all the 

[PATCH] rootless: Delete dead remnants of rootless acceleration.

2010-07-14 Thread Jamey Sharp
Jeremy deleted rootlessAccelInit's implementation in 2008 in commit
587c010a1cd733fded4d49dc339df0634bda8be6. Delete its prototype and the
remaining commented-out call to it.

It still makes sense for the rootless GC ops to relax the planemask, but
that's independent of the size of the operation, so quit checking the
thresholds there.

FillBytes and CompositePixels are not called anywhere, so delete
everything related to both.

Signed-off-by: Jamey Sharp ja...@minilop.net
Cc: Jeremy Huddleston jerem...@apple.com
Cc: Jon TURNEY jon.tur...@dronecode.org.uk
---
 hw/xquartz/xpr/xprFrame.c   |4 --
 hw/xquartz/xpr/xprScreen.c  |6 ---
 hw/xwin/win.h   |   10 --
 hw/xwin/winscrinit.c|4 --
 hw/xwin/winwin32rootless.c  |   22 
 miext/rootless/README.txt   |   41 +--
 miext/rootless/rootless.h   |   69 ---
 miext/rootless/rootlessCommon.c |2 -
 miext/rootless/rootlessGC.c |   57 ++--
 9 files changed, 11 insertions(+), 204 deletions(-)

diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index 9f5d8a6..7b938c1 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -457,8 +457,6 @@ static RootlessFrameProcsRec xprRootlessProcs = {
 xprHideWindow,
 xprUpdateColormap,
 xp_copy_bytes,
-xp_fill_bytes,
-xp_composite_pixels,
 xprCopyWindow
 };
 
@@ -474,8 +472,6 @@ xprInit(ScreenPtr pScreen)
 TA_SERVER();
 
 rootless_CopyBytes_threshold = xp_copy_bytes_threshold;
-rootless_FillBytes_threshold = xp_fill_bytes_threshold;
-rootless_CompositePixels_threshold = xp_composite_area_threshold;
 rootless_CopyWindow_threshold = xp_scroll_area_threshold;
 
 return TRUE;
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 87e97d4..c03a82d 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -367,12 +367,6 @@ xprAddScreen(int index, ScreenPtr pScreen)
 static Bool
 xprSetupScreen(int index, ScreenPtr pScreen)
 {
-// Initialize accelerated rootless drawing
-// Note that this must be done before DamageSetup().
-
-// These are crashing ugly... better to be stable and not crash for now.
-//RootlessAccelInit(pScreen);
-
 #ifdef DAMAGE
 // The Damage extension needs to wrap underneath the
 // generic rootless layer, so do it now.
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 8c4b67f..1b1358c 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -1377,16 +1377,6 @@ winMWExtWMCopyBytes (unsigned int width, unsigned int 
height,
   void *dst, unsigned int dstRowBytes);
 
 void
-winMWExtWMFillBytes (unsigned int width, unsigned int height, unsigned int 
value,
-  void *dst, unsigned int dstRowBytes);
-
-int
-winMWExtWMCompositePixels (unsigned int width, unsigned int height, unsigned 
int function,
-void *src[2], unsigned int srcRowBytes[2],
-void *mask, unsigned int maskRowBytes,
-void *dst[2], unsigned int dstRowBytes[2]);
-
-void
 winMWExtWMCopyWindow (RootlessFrameID wid, int dstNrects, const BoxRec 
*dstRects,
int dx, int dy);
 #endif
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index 1b40933..178a1e4 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -61,8 +61,6 @@ winMWExtWMProcs = {
   NULL,//winMWExtWMUpdateColorMap,
 
   NULL,//winMWExtWMCopyBytes,
-  NULL,//winMWExtWMFillBytes,
-  NULL,//winMWExtWMCompositePixels,
   winMWExtWMCopyWindow
 };
 #endif
@@ -463,8 +461,6 @@ winFinishScreenInitFB (int index,
   winDebug (winScreenInit - MultiWindowExtWM - RootlessInit returned\n);
   
   rootless_CopyBytes_threshold = 0;
-  rootless_FillBytes_threshold = 0;
-  rootless_CompositePixels_threshold = 0;
   /* FIXME: How many? Profiling needed? */
   rootless_CopyWindow_threshold = 1;
 
diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index 9749861..fbe4191 100755
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -1007,28 +1007,6 @@ winMWExtWMCopyBytes (unsigned int width, unsigned int 
height,
 }
 
 void
-winMWExtWMFillBytes (unsigned int width, unsigned int height, unsigned int 
value,
-  void *dst, unsigned int dstRowBytes)
-{
-#if CYGMULTIWINDOW_DEBUG
-  winDebug (winMWExtWMFillBytes - Not implemented\n);
-#endif
-}
-
-int
-winMWExtWMCompositePixels (unsigned int width, unsigned int height, unsigned 
int function,
-void *src[2], unsigned int srcRowBytes[2],
-void *mask, unsigned int maskRowBytes,
-void *dst[2], unsigned int dstRowBytes[2])
-{
-#if CYGMULTIWINDOW_DEBUG
-  winDebug (winMWExtWMCompositePixels - Not implemented\n);
-#endif
-  return 0;

Re: [PATCH] rootless: Delete dead remnants of rootless acceleration.

2010-07-14 Thread Jeremy Huddleston

Reviewed-by: Jeremy Huddleston jerem...@apple.com

On Jul 14, 2010, at 13:49, Jamey Sharp wrote:


Jeremy deleted rootlessAccelInit's implementation in 2008 in commit
587c010a1cd733fded4d49dc339df0634bda8be6. Delete its prototype and the
remaining commented-out call to it.

It still makes sense for the rootless GC ops to relax the planemask,  
but

that's independent of the size of the operation, so quit checking the
thresholds there.

FillBytes and CompositePixels are not called anywhere, so delete
everything related to both.

Signed-off-by: Jamey Sharp ja...@minilop.net
Cc: Jeremy Huddleston jerem...@apple.com
Cc: Jon TURNEY jon.tur...@dronecode.org.uk
---
hw/xquartz/xpr/xprFrame.c   |4 --
hw/xquartz/xpr/xprScreen.c  |6 ---
hw/xwin/win.h   |   10 --
hw/xwin/winscrinit.c|4 --
hw/xwin/winwin32rootless.c  |   22 
miext/rootless/README.txt   |   41 +--
miext/rootless/rootless.h   |   69  
---

miext/rootless/rootlessCommon.c |2 -
miext/rootless/rootlessGC.c |   57 + 
+--

9 files changed, 11 insertions(+), 204 deletions(-)

diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index 9f5d8a6..7b938c1 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -457,8 +457,6 @@ static RootlessFrameProcsRec xprRootlessProcs = {
xprHideWindow,
xprUpdateColormap,
xp_copy_bytes,
-xp_fill_bytes,
-xp_composite_pixels,
xprCopyWindow
};

@@ -474,8 +472,6 @@ xprInit(ScreenPtr pScreen)
TA_SERVER();

rootless_CopyBytes_threshold = xp_copy_bytes_threshold;
-rootless_FillBytes_threshold = xp_fill_bytes_threshold;
-rootless_CompositePixels_threshold = xp_composite_area_threshold;
rootless_CopyWindow_threshold = xp_scroll_area_threshold;

return TRUE;
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 87e97d4..c03a82d 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -367,12 +367,6 @@ xprAddScreen(int index, ScreenPtr pScreen)
static Bool
xprSetupScreen(int index, ScreenPtr pScreen)
{
-// Initialize accelerated rootless drawing
-// Note that this must be done before DamageSetup().
-
-// These are crashing ugly... better to be stable and not crash  
for now.

-//RootlessAccelInit(pScreen);
-
#ifdef DAMAGE
// The Damage extension needs to wrap underneath the
// generic rootless layer, so do it now.
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 8c4b67f..1b1358c 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -1377,16 +1377,6 @@ winMWExtWMCopyBytes (unsigned int width,  
unsigned int height,

   void *dst, unsigned int dstRowBytes);

void
-winMWExtWMFillBytes (unsigned int width, unsigned int height,  
unsigned int value,

-  void *dst, unsigned int dstRowBytes);
-
-int
-winMWExtWMCompositePixels (unsigned int width, unsigned int height,  
unsigned int function,

-void *src[2], unsigned int srcRowBytes[2],
-void *mask, unsigned int maskRowBytes,
-void *dst[2], unsigned int dstRowBytes[2]);
-
-void
winMWExtWMCopyWindow (RootlessFrameID wid, int dstNrects, const  
BoxRec *dstRects,

int dx, int dy);
#endif
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index 1b40933..178a1e4 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -61,8 +61,6 @@ winMWExtWMProcs = {
  NULL,//winMWExtWMUpdateColorMap,

  NULL,//winMWExtWMCopyBytes,
-  NULL,//winMWExtWMFillBytes,
-  NULL,//winMWExtWMCompositePixels,
  winMWExtWMCopyWindow
};
#endif
@@ -463,8 +461,6 @@ winFinishScreenInitFB (int index,
  winDebug (winScreenInit - MultiWindowExtWM - RootlessInit  
returned\n);


  rootless_CopyBytes_threshold = 0;
-  rootless_FillBytes_threshold = 0;
-  rootless_CompositePixels_threshold = 0;
  /* FIXME: How many? Profiling needed? */
  rootless_CopyWindow_threshold = 1;

diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c
index 9749861..fbe4191 100755
--- a/hw/xwin/winwin32rootless.c
+++ b/hw/xwin/winwin32rootless.c
@@ -1007,28 +1007,6 @@ winMWExtWMCopyBytes (unsigned int width,  
unsigned int height,

}

void
-winMWExtWMFillBytes (unsigned int width, unsigned int height,  
unsigned int value,

-  void *dst, unsigned int dstRowBytes)
-{
-#if CYGMULTIWINDOW_DEBUG
-  winDebug (winMWExtWMFillBytes - Not implemented\n);
-#endif
-}
-
-int
-winMWExtWMCompositePixels (unsigned int width, unsigned int height,  
unsigned int function,

-void *src[2], unsigned int srcRowBytes[2],
-void *mask, unsigned int maskRowBytes,
-void *dst[2], unsigned int dstRowBytes[2])
-{
-#if CYGMULTIWINDOW_DEBUG
-  

xwin sets ROOTLESS_PROTECT_ALPHA to NO: bug?

2010-07-14 Thread Jamey Sharp
The generic rootless layer can be built to preserve an alpha channel
for depth 24 images stored at 32 bits per pixel. It does this if
rootlessConfig.h defines ROOTLESS_PROTECT_ALPHA; it doesn't matter
what it's defined to.

When the server is built on Windows, ROOTLESS_PROTECT_ALPHA is defined
to NO, so rootless will protect the alpha channel. Counter-intuitive
to say the least.

Does Xwin need to preserve the alpha channel of its top-level windows,
or should the relevant line of rootlessConfig.h be changed to #undef
ROOTLESS_PROTECT_ALPHA?

I think rootless does more work than necessary if
ROOTLESS_PROTECT_ALPHA is turned off, presumably because that case
isn't actually being tested. It can probably be simplified if this
matters.

Jamey
___
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


Current 1.9 release blocking bugs

2010-07-14 Thread Keith Packard

Here's the current list of bugs blocking the 1.9 release:

Summary:

A couple of rendering issues remaining that need Xlib test
cases, and then a handful of input bugs. Otherwise, I think
we're in good shape.

Details:

* 3040:  Bad interaction between xinerama and xfs  

Recent ignore/attend changes may make this easy to fix.

* 3370: Suggested change for ConfineTo 

Patch in bug, testing needed.

* 4652: Xv + Silkenmouse = Lethal race condition 

This sure looks like a driver bug -- the frame is only updated in normal
process execution, so if there is synchronization required, that's the
driver's problem. I'm tempted to close this one as 'not our problem'.

* 7681: zero-sized a1 glyphs stop further text drawing 

Still need a pure Render test case to verify that this is fixed.

*11053: Buffer overflow in fbCopyArea() 

Still no clue

*11503: Xserver 1.3 crash in fbPolyline() when using xpdf 

Test case required.

*14267: Xserver ignores Option PreferredMode for the second output when 
there's a Preferred for the first output 

This isn't getting fixed for 1.9; I'm removing the dependency.

*14648: DamageSubtract is misdesigned, making DeltaRectangles mode 
unusable 

I don't think this is a bug; I'm closing it.

*23938: keys occasionally get stuck with xorg-server 1.6.99.901 

I haven't heard from Peter on this one

*23985: Excessive core motion events for subpixel motions

This is essentially a feature request to reduce duplicate motion events.

*24094: CTRL-ALT-F1 doesn't switch to VT1 (provides garbage input to 
terminal instead) 
*24856: xorg-server-1.7.1 mouse cursor not moving from MouseKeys 
*25801: Switching VT re-enables XBell(), ignoring 'xset b off'

Peter?

*27428: xrandr events delayed until a key is pressed

Anyone have a test case?

*27804: Enter/Leave event woes with multiple master devices.

Peter?

-- 
keith.pack...@intel.com


pgpFMSRaQFyJM.pgp
Description: PGP signature
___
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] xkb: use GetMaster instead of dev-u.master.

2010-07-14 Thread Peter Hutterer
Devices that are both pointers and keyboards are not affected by keyboard
changes as their master device is a master pointer, not a master keyboard.
Use GetMaster() instead to ensure devices that are attached to the paired
master pointer device will still be update.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
---
Wacom devices that emulate keystrokes do not see keyboard layout changes -
the device's map never updates because these devices are attached to the VCP
by default, not the VCK.

 xkb/xkb.c |   32 
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/xkb/xkb.c b/xkb/xkb.c
index bd73e9a..935f5ea 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -523,7 +523,7 @@ ProcXkbBell(ClientPtr client)
 DeviceIntPtr other;
 for (other = inputInfo.devices; other; other = other-next)
 {
-if ((other != dev)  other-key  !IsMaster(other)  
(other-u.master == dev))
+if ((other != dev)  other-key  !IsMaster(other)  
GetMaster(other, MASTER_KEYBOARD) == dev)
 {
 rc = XaceHook(XACE_DEVICE_ACCESS, client, other, 
DixBellAccess);
 if (rc == Success)
@@ -606,7 +606,7 @@ ProcXkbLatchLockState(ClientPtr client)
 status = Success;
 
 for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd-next) {
-if ((tmpd == dev) || (!IsMaster(tmpd)  tmpd-u.master == dev)) {
+if ((tmpd == dev) || (!IsMaster(tmpd)  GetMaster(tmpd, 
MASTER_KEYBOARD) == dev)) {
 if (!tmpd-key || !tmpd-key-xkbInfo)
 continue;
 
@@ -748,7 +748,7 @@ ProcXkbSetControls(ClientPtr client)
 for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd-next) {
 if (!tmpd-key || !tmpd-key-xkbInfo)
 continue;
-if ((tmpd == dev) || (!IsMaster(tmpd)  tmpd-u.master == dev)) {
+if ((tmpd == dev) || (!IsMaster(tmpd)  GetMaster(tmpd, 
MASTER_KEYBOARD) == dev)) {
 xkbi = tmpd-key-xkbInfo;
 ctrl = xkbi-desc-ctrls;
 new = *ctrl;
@@ -2558,7 +2558,7 @@ ProcXkbSetMap(ClientPtr client)
 DeviceIntPtr other;
 for (other = inputInfo.devices; other; other = other-next)
 {
-if ((other != dev)  other-key  !IsMaster(other)  
(other-u.master == dev))
+if ((other != dev)  other-key  !IsMaster(other)  
GetMaster(other, MASTER_KEYBOARD) == dev)
 {
 rc = XaceHook(XACE_DEVICE_ACCESS, client, other, 
DixManageAccess);
 if (rc == Success)
@@ -2581,7 +2581,7 @@ ProcXkbSetMap(ClientPtr client)
 DeviceIntPtr other;
 for (other = inputInfo.devices; other; other = other-next)
 {
-if ((other != dev)  other-key  !IsMaster(other)  
(other-u.master == dev))
+if ((other != dev)  other-key  !IsMaster(other)  
GetMaster(other, MASTER_KEYBOARD) == dev)
 {
 rc = XaceHook(XACE_DEVICE_ACCESS, client, other, 
DixManageAccess);
 if (rc == Success)
@@ -2887,7 +2887,7 @@ ProcXkbSetCompatMap(ClientPtr client)
 DeviceIntPtr other;
 for (other = inputInfo.devices; other; other = other-next)
 {
-if ((other != dev)  other-key  !IsMaster(other)  
(other-u.master == dev))
+if ((other != dev)  other-key  !IsMaster(other)  
GetMaster(other, MASTER_KEYBOARD) == dev)
 {
 rc = XaceHook(XACE_DEVICE_ACCESS, client, other, 
DixManageAccess);
 if (rc == Success)
@@ -2910,7 +2910,7 @@ ProcXkbSetCompatMap(ClientPtr client)
 DeviceIntPtr other;
 for (other = inputInfo.devices; other; other = other-next)
 {
-if ((other != dev)  other-key  !IsMaster(other)  
(other-u.master == dev))
+if ((other != dev)  other-key  !IsMaster(other)  
GetMaster(other, MASTER_KEYBOARD) == dev)
 {
 rc = XaceHook(XACE_DEVICE_ACCESS, client, other, 
DixManageAccess);
 if (rc == Success)
@@ -3165,7 +3165,7 @@ ProcXkbSetIndicatorMap(ClientPtr client)
 DeviceIntPtr other;
 for (other = inputInfo.devices; other; other = other-next)
 {
-if ((other != dev)  other-key  !IsMaster(other)  
(other-u.master == dev))
+if ((other != dev)  other-key  !IsMaster(other)  
GetMaster(other, MASTER_KEYBOARD) == dev)
 {
 rc = XaceHook(XACE_DEVICE_ACCESS, client, other, 
DixSetAttrAccess);
 if (rc == Success)
@@ -3434,7 +3434,7 @@ ProcXkbSetNamedIndicator(ClientPtr client)
 DeviceIntPtr other;
 for (other = inputInfo.devices; other; other = other-next)
 {
-if ((other != dev)  !IsMaster(other)  (other-u.master == dev) 

+if ((other != dev)  !IsMaster(other)  GetMaster(other, 
MASTER_KEYBOARD) == dev 
 (other-kbdfeed || other-leds) 
 (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) 
== Success))