[PATCH v2 app-mkfontdir] config: use Autoconf rather than sed to substitute $bindir

2011-01-21 Thread Gaetan Nadon
The path substitution in mkfontdir script can be done at configuration
time using Autoconf. This is an alternative to using sed and requires
less Makefile work.

Signed-off-by: Gaetan Nadon 
---
 Makefile.am   |7 ---
 configure.ac  |5 ++---
 mkfontdir.cpp |3 ---
 mkfontdir.in  |5 +
 4 files changed, 7 insertions(+), 13 deletions(-)
 delete mode 100755 mkfontdir.cpp
 create mode 100755 mkfontdir.in

diff --git a/Makefile.am b/Makefile.am
index b7610ec..e945869 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,13 +22,6 @@
 SUBDIRS = man
 bin_SCRIPTS = mkfontdir
 
-.cpp:
-   $(AM_V_GEN)$(SED) s,BINDIR,`echo @bindir@/mkfontscale | $(SED) 
s,/[^/]*$$,,`, < $< | $(SED) s/XCOMM/\#/ > $@
-
-EXTRA_DIST = mkfontdir.cpp
-CLEANFILES = $(bin_SCRIPTS)
-SUFFIXES = .cpp
-
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
 .PHONY: ChangeLog INSTALL
diff --git a/configure.ac b/configure.ac
index 3090eab..90dbf7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,9 +36,8 @@ m4_ifndef([XORG_MACROS_VERSION],
 XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
-AC_SUBST([bindir])
-
 AC_CONFIG_FILES([
Makefile
-   man/Makefile])
+   man/Makefile
+   mkfontdir])
 AC_OUTPUT
diff --git a/mkfontdir.cpp b/mkfontdir.cpp
deleted file mode 100755
index 98d8ffa..000
--- a/mkfontdir.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-XCOMM!/bin/sh
-
-exec BINDIR/mkfontscale -b -s -l "$@"
diff --git a/mkfontdir.in b/mkfontdir.in
new file mode 100755
index 000..441fa98
--- /dev/null
+++ b/mkfontdir.in
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/mkfontscale -b -s -l "$@"
-- 
1.6.0.4

___
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 app-mkfontdir] config: use Autoconf rather than sed to substitute $bindir

2011-01-21 Thread Gaetan Nadon
On Fri, 2011-01-21 at 18:30 -0800, Alan Coopersmith wrote:

> > index 3090eab..102d71d 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -36,9 +36,8 @@ m4_ifndef([XORG_MACROS_VERSION],
> >  XORG_MACROS_VERSION(1.8)
> >  XORG_DEFAULT_OPTIONS
> >  
> > -AC_SUBST([bindir])
> > -
> >  AC_CONFIG_FILES([
> > Makefile
> > -   man/Makefile])
> > +   man/Makefile
> > +   x11perfcomp])
> 
> Shouldn't that be mkfontdir, not x11perfcomp?
> 

Yes, was fixed locally but did not get it in the commit. Thanks


signature.asc
Description: This is a digitally signed message part
___
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 app-mkfontdir] config: use Autoconf rather than sed to substitute $bindir

2011-01-21 Thread Alan Coopersmith

> index 3090eab..102d71d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -36,9 +36,8 @@ m4_ifndef([XORG_MACROS_VERSION],
>  XORG_MACROS_VERSION(1.8)
>  XORG_DEFAULT_OPTIONS
>  
> -AC_SUBST([bindir])
> -
>  AC_CONFIG_FILES([
>   Makefile
> - man/Makefile])
> + man/Makefile
> + x11perfcomp])

Shouldn't that be mkfontdir, not x11perfcomp?

-- 
-Alan Coopersmith-alan.coopersm...@oracle.com
 Oracle Solaris Platform Engineering: X Window System

___
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 app-x11perf] config: use Autoconf rather than sed to substitute $libdir

2011-01-21 Thread Gaetan Nadon
The path substitution in x11perfcomp script can be done at configuration
time using Autoconf. This is an alternative to using sed and requires
less Makefile work.

Signed-off-by: Gaetan Nadon 
---
Change: don't clean x11perfcomp generated script now that it is done at 
config time.

 Makefile.am|   13 +--
 configure.ac   |6 +++-
 x11pcomp.cpp   |  103 --
 x11perfcomp.in |  105 
 4 files changed, 111 insertions(+), 116 deletions(-)
 delete mode 100644 x11pcomp.cpp
 create mode 100644 x11perfcomp.in

diff --git a/Makefile.am b/Makefile.am
index 3b6d13b..f67bec3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,13 +20,9 @@
 #  PERFORMANCE OF THIS SOFTWARE.
 
 SUBDIRS = man
-bin_PROGRAMS = x11perf
 
+bin_PROGRAMS = x11perf
 bin_SCRIPTS = x11perfcomp
-
-LIBPATH = $(libdir)/X11/x11perfcomp
-
-x11perfcompdir = $(LIBPATH)
 dist_x11perfcomp_SCRIPTS = fillblnk perfboth perfratio Xmark
 
 AM_CFLAGS = $(CWARNFLAGS) $(XEXT_CFLAGS) $(XFT_CFLAGS) $(XRENDER_CFLAGS) 
$(X11PERF_CFLAGS)
@@ -53,13 +49,6 @@ x11perf_SOURCES =\
 x11perf.c \
 x11perf.h
 
-x11perfcomp: x11pcomp.cpp
-   $(AM_V_GEN)$(SED) s/LIBPATH/`echo $(LIBPATH) | sed -e 
s///\//g`/ < $(srcdir)/x11pcomp.cpp | \
-   $(SED) s/XCOMM/\#/ > $@
-
-CLEANFILES = $(bin_SCRIPTS) x11perfcomp
-EXTRA_DIST = x11pcomp.cpp
-
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
 .PHONY: ChangeLog INSTALL
diff --git a/configure.ac b/configure.ac
index 96126f2..79e4bfc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,9 @@ XORG_DEFAULT_OPTIONS
 
 AC_TYPE_SIGNAL
 
+# Define the installation directory for the x11 performance compare scripts
+AC_SUBST([x11perfcompdir], [$libdir/X11/x11perfcomp])
+
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(X11PERF, x11 xmuu)
 
@@ -74,5 +77,6 @@ esac
 
 AC_CONFIG_FILES([
Makefile
-   man/Makefile])
+   man/Makefile
+   x11perfcomp])
 AC_OUTPUT
diff --git a/x11pcomp.cpp b/x11pcomp.cpp
deleted file mode 100644
index be7d397..000
--- a/x11pcomp.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-XCOMM! /bin/sh
-XCOMM
-XCOMM $XFree86$
-XCOMM
-XCOMM Collects multiple outputs of x11perf.  Just feed it a list of files, each
-XCOMM containing the output from an x11perf run, and this shell will extract 
the
-XCOMM object/second information and show it in tabular form.  An 80-column line
-XCOMM is big enough to compare 4 different servers.
-XCOMM
-XCOMM This script normally uses the results from $1 to extract the test label
-XCOMM descriptions, so you can run x11perf on a subset of the test and then
-XCOMM compare the results.  But note that x11perffill requires the labels file
-XCOMM to be a superset of the x11perf results file.  If you run into an ugly
-XCOMM situation in which none of the servers completes the desired tests 
-XCOMM (quite possible on non-DEC servers :), you can use -l  as $1 
and
-XCOMM $2 to force x11perfcomp to use the labels stored in file $2.  (You can 
run
-XCOMM x11perf with the -labels option to generate such a file.)
-XCOMM
-XCOMM Mark Moraes, University of Toronto 
-XCOMM Joel McCormack, DEC Western Research Lab 
-XCOMM
-
-PATH=LIBPATH:.:$PATH
-export PATH
-
-set -e
-tmp=${TMPDIR-/tmp}/rates.$$
-trap "rm -rf $tmp" 0 1 2 15
-mkdir $tmp || exit 1
-mkdir $tmp/rates
-ratio=
-allfiles=
-XCOMM Include relative rates in output?  Report only relative rates?
-case $1 in
--r|-a)
-   ratio=1
-   shift;
-   ;;
--ro)
-   ratio=2
-   shift;
-   ;;
-esac
-XCOMM Get either the provided label file, or construct one from all the
-XCOMM files given.
-case $1 in
--l)cp $2 $tmp/labels
-   shift; shift
-   ;;
-*) for file in "$@"; do
-   awk '$2 == "reps" || $2 == "trep" { print $0; next; }' $file |
-   sed 's/^.*: //' |
-   sed 's/ /_/g' |
-   awk 'NR > 1 { printf ("%s %s\n", prev, $0); } \
-   { prev = $0; }'
-   done | tsort 2>/dev/null | sed 's/_/ /g' > $tmp/labels
-   ;;
-esac
-XCOMM Go through all files, and create a corresponding rate file for each
-n=1
-for i
-do
-XCOMM Get lines with average numbers, fill in any tests that may be missing
-XCOMM then extract the rate field
-   base=`basename $i`
-   (echo " $n  "
-echo ''
-awk '$2 == "reps" || $2 == "trep" { \
-   line = $0; \
-   next; \
-   } \
-   NF == 0 && line != "" { \
-   print line; \
-   line=""; \
-   next; \
-   } \
-' $i > $tmp/$n.avg
-fillblnk $tmp/$n.avg $tmp/labels |
-sed 's/( *\([0-9]*\)/(\1/'   |
-awk '$2 == "reps" || $2 == "trep" { \
-   n = substr($6,2,length($6)-7); \
-   printf "%8s\n", n; \
-

[PATCH app-mkfontdir] config: use Autoconf rather than sed to substitute $bindir

2011-01-21 Thread Gaetan Nadon
The path substitution in mkfontdir script can be done at configuration
time using Autoconf. This is an alternative to using sed and requires
less Makefile work.

Signed-off-by: Gaetan Nadon 
---
 Makefile.am   |7 ---
 configure.ac  |5 ++---
 mkfontdir.cpp |3 ---
 mkfontdir.in  |5 +
 4 files changed, 7 insertions(+), 13 deletions(-)
 delete mode 100755 mkfontdir.cpp
 create mode 100755 mkfontdir.in

diff --git a/Makefile.am b/Makefile.am
index b7610ec..e945869 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,13 +22,6 @@
 SUBDIRS = man
 bin_SCRIPTS = mkfontdir
 
-.cpp:
-   $(AM_V_GEN)$(SED) s,BINDIR,`echo @bindir@/mkfontscale | $(SED) 
s,/[^/]*$$,,`, < $< | $(SED) s/XCOMM/\#/ > $@
-
-EXTRA_DIST = mkfontdir.cpp
-CLEANFILES = $(bin_SCRIPTS)
-SUFFIXES = .cpp
-
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
 .PHONY: ChangeLog INSTALL
diff --git a/configure.ac b/configure.ac
index 3090eab..102d71d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,9 +36,8 @@ m4_ifndef([XORG_MACROS_VERSION],
 XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
-AC_SUBST([bindir])
-
 AC_CONFIG_FILES([
Makefile
-   man/Makefile])
+   man/Makefile
+   x11perfcomp])
 AC_OUTPUT
diff --git a/mkfontdir.cpp b/mkfontdir.cpp
deleted file mode 100755
index 98d8ffa..000
--- a/mkfontdir.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-XCOMM!/bin/sh
-
-exec BINDIR/mkfontscale -b -s -l "$@"
diff --git a/mkfontdir.in b/mkfontdir.in
new file mode 100755
index 000..441fa98
--- /dev/null
+++ b/mkfontdir.in
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec @bindir@/mkfontscale -b -s -l "$@"
-- 
1.6.0.4

___
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] xselinux: Fix GetDrawableContext

2011-01-21 Thread Eamon Walsh
Reviewed-by: Eamon Walsh 

This should go as a bugfix on release branches; I'll take care of that after it 
goes in.  Thanks!


On 01/20/2011 11:01 PM, Adam Jackson wrote:
> M_DRAWABLE_PIXMAP is the lookup mask to dixLookupDrawable, and _not_ the
> type value in the drawable itself.
>
> Signed-off-by: Adam Jackson 
> ---
>  Xext/xselinux_ext.c |6 ++
>  1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c
> index 93c1b59..374571c 100644
> --- a/Xext/xselinux_ext.c
> +++ b/Xext/xselinux_ext.c
> @@ -231,13 +231,11 @@ ProcSELinuxGetDrawableContext(ClientPtr client)
>  REQUEST(SELinuxGetContextReq);
>  REQUEST_SIZE_MATCH(SELinuxGetContextReq);
>  
> -rc = dixLookupDrawable(&pDraw, stuff->id, client,
> -M_WINDOW | M_DRAWABLE_PIXMAP,
> -DixGetAttrAccess);
> +rc = dixLookupDrawable(&pDraw, stuff->id, client, 0, DixGetAttrAccess);
>  if (rc != Success)
>   return rc;
>  
> -if (pDraw->type == M_DRAWABLE_PIXMAP)
> +if (pDraw->type == DRAWABLE_PIXMAP)
>   privatePtr = &((PixmapPtr)pDraw)->devPrivates;
>  else
>   privatePtr = &((WindowPtr)pDraw)->devPrivates;


-- 

Eamon Walsh 
National Security Agency

___
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: libX11.pdf not building

2011-01-21 Thread Alan Coopersmith
On 01/21/11 03:09 PM, Matt Dew wrote:
> Has anyone had trouble building the libX11 documentation?
> The HTML docs build and install fine, but the pdf docs do not.
> 
> Other pdf docs build fine.  bigreqsproto for example,  builds ok.
> 
> I see this:
> ...
> checking for fop... /usr/bin/fop
> ...
> 
> for the other modules I build, but not for libX11.  I'm building with build.sh
> 
> Has anyone else had this problem?

Don't forget to set --with-fop, since even if configure finds it, libX11
is set to not use it unless requested, due to the issues we had with the
compose tables docs.   (libX11 is the only module that defaults to off for
fop, instead of auto.)

-- 
-Alan Coopersmith-alan.coopersm...@oracle.com
 Oracle Solaris Platform Engineering: X Window System

___
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


libX11.pdf not building

2011-01-21 Thread Matt Dew

Has anyone had trouble building the libX11 documentation?
The HTML docs build and install fine, but the pdf docs do not.

Other pdf docs build fine.  bigreqsproto for example,  builds ok.

I see this:
...
checking for fop... /usr/bin/fop
...

for the other modules I build, but not for libX11.  I'm building with 
build.sh


Has anyone else had this problem?

Matt
___
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 xf86-video-vmware] Fix include order.

2011-01-21 Thread Thomas Hellstrom

You're right. This was caused by a sloppy fix by me for another problem.

I'll revert that fix tomorrow and try to find a correct fix for that 
problem.


/Thomas



On 01/21/2011 10:57 PM, Gaetan Nadon wrote:

On Fri, 2011-01-21 at 20:07 +0100, Cyril Brulebois wrote:

HAVE_LIBDRM comes from config.h, so include it first.

With CFLAGS="-Wall -Werror", the build fails with:
|   CC vmware_drv_la-vmwaremodule.lo
| cc1: warnings being treated as errors
| vmwaremodule.c: In function ‘vmware_check_kernel_module’:
| vmwaremodule.c:100: error: implicit declaration of function ‘drmOpen’
| vmwaremodule.c:112: error: implicit declaration of function ‘drmClose’

Signed-off-by: Cyril Bruleboismailto:k...@debian.org>>
---
  src/vmwaremodule.c |8 
  1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/vmwaremodule.c b/src/vmwaremodule.c
index a7ba854..2754879 100644
--- a/src/vmwaremodule.c
+++ b/src/vmwaremodule.c
@@ -26,14 +26,14 @@
  #include
  #include

-#ifdef HAVE_LIBDRM
-#include
-#endif
-
  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif

+#ifdef HAVE_LIBDRM
+#include
+#endif
+
  #ifndef HAVE_XORG_SERVER_1_5_0
  #include
  #include
--
1.7.2.3

 


This is the correct order.

Reviewed-by: Gaetan Nadon >


I have copied the driver maintainer who will review and potentially 
push the patch.

http://www.x.org/wiki/vmware



___
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
 


___
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 xf86-video-vmware] Fix include order.

2011-01-21 Thread Gaetan Nadon
On Fri, 2011-01-21 at 20:07 +0100, Cyril Brulebois wrote:

> HAVE_LIBDRM comes from config.h, so include it first.
> 
> With CFLAGS="-Wall -Werror", the build fails with:
> |   CC vmware_drv_la-vmwaremodule.lo
> | cc1: warnings being treated as errors
> | vmwaremodule.c: In function ‘vmware_check_kernel_module’:
> | vmwaremodule.c:100: error: implicit declaration of function ‘drmOpen’
> | vmwaremodule.c:112: error: implicit declaration of function ‘drmClose’
> 
> Signed-off-by: Cyril Brulebois 
> ---
>  src/vmwaremodule.c |8 
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/vmwaremodule.c b/src/vmwaremodule.c
> index a7ba854..2754879 100644
> --- a/src/vmwaremodule.c
> +++ b/src/vmwaremodule.c
> @@ -26,14 +26,14 @@
>  #include 
>  #include 
>  
> -#ifdef HAVE_LIBDRM
> -#include 
> -#endif
> -
>  #ifdef HAVE_CONFIG_H
>  #include "config.h"
>  #endif
>  
> +#ifdef HAVE_LIBDRM
> +#include 
> +#endif
> +
>  #ifndef HAVE_XORG_SERVER_1_5_0
>  #include 
>  #include 
> -- 
> 1.7.2.3
> 


This is the correct order. 

Reviewed-by: Gaetan Nadon 

I have copied the driver maintainer who will review and potentially push
the patch.
http://www.x.org/wiki/vmware



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


signature.asc
Description: This is a digitally signed message part
___
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 app-x11perf] config: use Autoconf rather than sed to substitute $libdir

2011-01-21 Thread Gaetan Nadon
On Fri, 2011-01-21 at 17:34 +0100, Julien Cristau wrote:

> On Fri, Jan 21, 2011 at 08:31:23 -0500, Gaetan Nadon wrote:
> 
> > The path substitution in x11perfcomp script can be done at configuration
> > time using Autoconf. This is an alternative to using sed and requires
> > less Makefile work.
> > 
> > Signed-off-by: Gaetan Nadon 
> > ---
> >  Makefile.am|   14 +--
> >  configure.ac   |6 +++-
> >  x11pcomp.cpp   |  103 
> > --
> >  x11perfcomp.in |  105 
> > 
> >  4 files changed, 112 insertions(+), 116 deletions(-)
> >  delete mode 100644 x11pcomp.cpp
> >  create mode 100644 x11perfcomp.in
> > 
> I'm not sure.  Using autoconf means you get the non-expanded version of
> the variable, which means you need to keep track of which variables have
> to be defined in x11perfcomp.in.  At least in theory that could change
> in a new autoconf version.
> 

Good question, always check if what you are using is part of the public
interface and not some internal implementation.

The variables and thier relationships are all part of the public
interface. These values are the default values, a user can override
with --bindir or --libdir.


exec_prefix

A prefix used in constructing the default values of some of the
variables listed below. The default value of exec_prefix should
be $(prefix). (If you are using Autoconf, write it as
‘@exec_prefix@’.)


‘libdir’

The directory for object files and libraries of object code.
[...] The value of libdir should normally be ‘/usr/local/lib’,
but write it as ‘$(exec_prefix)/lib’. (If you are using
Autoconf, write it as ‘@libdir@’.)


In theory it could change, and it has in the past. The datarootdir
variable was introduced upon which datadir is based. This change was
done in a way that was backward compatible.

I am confident that using these variables is safe in the long run. It
also correctly supports a configuration making use of --libdir.


> Cheers,
> Julien


signature.asc
Description: This is a digitally signed message part
___
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 xf86-video-vmware] Fix include order.

2011-01-21 Thread Cyril Brulebois
HAVE_LIBDRM comes from config.h, so include it first.

With CFLAGS="-Wall -Werror", the build fails with:
|   CC vmware_drv_la-vmwaremodule.lo
| cc1: warnings being treated as errors
| vmwaremodule.c: In function ‘vmware_check_kernel_module’:
| vmwaremodule.c:100: error: implicit declaration of function ‘drmOpen’
| vmwaremodule.c:112: error: implicit declaration of function ‘drmClose’

Signed-off-by: Cyril Brulebois 
---
 src/vmwaremodule.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/vmwaremodule.c b/src/vmwaremodule.c
index a7ba854..2754879 100644
--- a/src/vmwaremodule.c
+++ b/src/vmwaremodule.c
@@ -26,14 +26,14 @@
 #include 
 #include 
 
-#ifdef HAVE_LIBDRM
-#include 
-#endif
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#ifdef HAVE_LIBDRM
+#include 
+#endif
+
 #ifndef HAVE_XORG_SERVER_1_5_0
 #include 
 #include 
-- 
1.7.2.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 app-x11perf] config: use Autoconf rather than sed to substitute $libdir

2011-01-21 Thread Julien Cristau
On Fri, Jan 21, 2011 at 08:31:23 -0500, Gaetan Nadon wrote:

> The path substitution in x11perfcomp script can be done at configuration
> time using Autoconf. This is an alternative to using sed and requires
> less Makefile work.
> 
> Signed-off-by: Gaetan Nadon 
> ---
>  Makefile.am|   14 +--
>  configure.ac   |6 +++-
>  x11pcomp.cpp   |  103 --
>  x11perfcomp.in |  105 
> 
>  4 files changed, 112 insertions(+), 116 deletions(-)
>  delete mode 100644 x11pcomp.cpp
>  create mode 100644 x11perfcomp.in
> 
I'm not sure.  Using autoconf means you get the non-expanded version of
the variable, which means you need to keep track of which variables have
to be defined in x11perfcomp.in.  At least in theory that could change
in a new autoconf version.

Cheers,
Julien
___
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] [xserver] xkb: Cancel a key's repetition when its autorepeat is disabled.

2011-01-21 Thread Erkki Seppälä
When XkbChangeEnabledControls is called to disable key repetition of a
certain key (or keys), currently ongoing repetition of that key was
not cancelled. It was cancelled if ChangeKeyboardControl was used to
disable key repetition globally.

Reviewed-by: Rami Ylimäki 
---
 xkb/xkb.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 7d95bc0..395f6fc 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -915,9 +915,14 @@ ProcXkbSetControls(ClientPtr client)
stuff->axtOptsMask);
 }
 
-if (stuff->changeCtrls & XkbPerKeyRepeatMask)
+if (stuff->changeCtrls & XkbPerKeyRepeatMask) {
 memcpy(new.per_key_repeat, stuff->perKeyRepeat,
XkbPerKeyBitArraySize);
+if (xkbi->repeatKey &&
+!BitIsOn(new.per_key_repeat, xkbi->repeatKey)) {
+AccessXCancelRepeatKey(xkbi, xkbi->repeatKey);
+}
+}
 
 old= *ctrl;
 *ctrl= new;
-- 
1.7.0.4

___
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 app-x11perf] config: use Autoconf rather than sed to substitute $libdir

2011-01-21 Thread Gaetan Nadon
The path substitution in x11perfcomp script can be done at configuration
time using Autoconf. This is an alternative to using sed and requires
less Makefile work.

Signed-off-by: Gaetan Nadon 
---
 Makefile.am|   14 +--
 configure.ac   |6 +++-
 x11pcomp.cpp   |  103 --
 x11perfcomp.in |  105 
 4 files changed, 112 insertions(+), 116 deletions(-)
 delete mode 100644 x11pcomp.cpp
 create mode 100644 x11perfcomp.in

diff --git a/Makefile.am b/Makefile.am
index 3b6d13b..f5b7cf2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,13 +20,9 @@
 #  PERFORMANCE OF THIS SOFTWARE.
 
 SUBDIRS = man
-bin_PROGRAMS = x11perf
 
+bin_PROGRAMS = x11perf
 bin_SCRIPTS = x11perfcomp
-
-LIBPATH = $(libdir)/X11/x11perfcomp
-
-x11perfcompdir = $(LIBPATH)
 dist_x11perfcomp_SCRIPTS = fillblnk perfboth perfratio Xmark
 
 AM_CFLAGS = $(CWARNFLAGS) $(XEXT_CFLAGS) $(XFT_CFLAGS) $(XRENDER_CFLAGS) 
$(X11PERF_CFLAGS)
@@ -53,13 +49,7 @@ x11perf_SOURCES =\
 x11perf.c \
 x11perf.h
 
-x11perfcomp: x11pcomp.cpp
-   $(AM_V_GEN)$(SED) s/LIBPATH/`echo $(LIBPATH) | sed -e 
s///\//g`/ < $(srcdir)/x11pcomp.cpp | \
-   $(SED) s/XCOMM/\#/ > $@
-
-CLEANFILES = $(bin_SCRIPTS) x11perfcomp
-EXTRA_DIST = x11pcomp.cpp
-
+CLEANFILES = $(bin_SCRIPTS)
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
 .PHONY: ChangeLog INSTALL
diff --git a/configure.ac b/configure.ac
index 96126f2..79e4bfc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,9 @@ XORG_DEFAULT_OPTIONS
 
 AC_TYPE_SIGNAL
 
+# Define the installation directory for the x11 performance compare scripts
+AC_SUBST([x11perfcompdir], [$libdir/X11/x11perfcomp])
+
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(X11PERF, x11 xmuu)
 
@@ -74,5 +77,6 @@ esac
 
 AC_CONFIG_FILES([
Makefile
-   man/Makefile])
+   man/Makefile
+   x11perfcomp])
 AC_OUTPUT
diff --git a/x11pcomp.cpp b/x11pcomp.cpp
deleted file mode 100644
index be7d397..000
--- a/x11pcomp.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-XCOMM! /bin/sh
-XCOMM
-XCOMM $XFree86$
-XCOMM
-XCOMM Collects multiple outputs of x11perf.  Just feed it a list of files, each
-XCOMM containing the output from an x11perf run, and this shell will extract 
the
-XCOMM object/second information and show it in tabular form.  An 80-column line
-XCOMM is big enough to compare 4 different servers.
-XCOMM
-XCOMM This script normally uses the results from $1 to extract the test label
-XCOMM descriptions, so you can run x11perf on a subset of the test and then
-XCOMM compare the results.  But note that x11perffill requires the labels file
-XCOMM to be a superset of the x11perf results file.  If you run into an ugly
-XCOMM situation in which none of the servers completes the desired tests 
-XCOMM (quite possible on non-DEC servers :), you can use -l  as $1 
and
-XCOMM $2 to force x11perfcomp to use the labels stored in file $2.  (You can 
run
-XCOMM x11perf with the -labels option to generate such a file.)
-XCOMM
-XCOMM Mark Moraes, University of Toronto 
-XCOMM Joel McCormack, DEC Western Research Lab 
-XCOMM
-
-PATH=LIBPATH:.:$PATH
-export PATH
-
-set -e
-tmp=${TMPDIR-/tmp}/rates.$$
-trap "rm -rf $tmp" 0 1 2 15
-mkdir $tmp || exit 1
-mkdir $tmp/rates
-ratio=
-allfiles=
-XCOMM Include relative rates in output?  Report only relative rates?
-case $1 in
--r|-a)
-   ratio=1
-   shift;
-   ;;
--ro)
-   ratio=2
-   shift;
-   ;;
-esac
-XCOMM Get either the provided label file, or construct one from all the
-XCOMM files given.
-case $1 in
--l)cp $2 $tmp/labels
-   shift; shift
-   ;;
-*) for file in "$@"; do
-   awk '$2 == "reps" || $2 == "trep" { print $0; next; }' $file |
-   sed 's/^.*: //' |
-   sed 's/ /_/g' |
-   awk 'NR > 1 { printf ("%s %s\n", prev, $0); } \
-   { prev = $0; }'
-   done | tsort 2>/dev/null | sed 's/_/ /g' > $tmp/labels
-   ;;
-esac
-XCOMM Go through all files, and create a corresponding rate file for each
-n=1
-for i
-do
-XCOMM Get lines with average numbers, fill in any tests that may be missing
-XCOMM then extract the rate field
-   base=`basename $i`
-   (echo " $n  "
-echo ''
-awk '$2 == "reps" || $2 == "trep" { \
-   line = $0; \
-   next; \
-   } \
-   NF == 0 && line != "" { \
-   print line; \
-   line=""; \
-   next; \
-   } \
-' $i > $tmp/$n.avg
-fillblnk $tmp/$n.avg $tmp/labels |
-sed 's/( *\([0-9]*\)/(\1/'   |
-awk '$2 == "reps" || $2 == "trep" { \
-   n = substr($6,2,length($6)-7); \
-   printf "%8s\n", n; \
-  }'
-   ) > $tmp/rates/$n
-   echo "$n: $i"
-

Re: [PATCH] [xserver] xkb: Cancel a key's repetition when its autorepeat is disabled.

2011-01-21 Thread Dirk Wallenstein
On Fri, Jan 21, 2011 at 10:11:41AM +0200, Erkki Seppälä wrote:
> When XkbChangeEnabledControls is called to disable key repetition of a
> certain key (or keys), currently ongoing repetition of that key was
> not cancelled. It was cancelled if ChangeKeyboardControl was used to
> disable key repetition globally.
> 
> Signed-off-by: Erkki Seppälä 
> ---
>  xkb/xkb.c |   12 +++-
>  1 files changed, 11 insertions(+), 1 deletions(-)
> 
> diff --git a/xkb/xkb.c b/xkb/xkb.c
> index 7d95bc0..4a2590b 100644
> --- a/xkb/xkb.c
> +++ b/xkb/xkb.c
> @@ -915,9 +915,19 @@ ProcXkbSetControls(ClientPtr client)
> stuff->axtOptsMask);
>  }
>  
> -if (stuff->changeCtrls & XkbPerKeyRepeatMask)
> +if (stuff->changeCtrls & XkbPerKeyRepeatMask) {
> +unsigned key;
> +
>  memcpy(new.per_key_repeat, stuff->perKeyRepeat,
> XkbPerKeyBitArraySize);
> +for (key = 0; key < 8 * XkbPerKeyBitArraySize; ++key) {
> +unsigned idx = key / 8;
> +unsigned bit = key % 8;
> +if (!(new.per_key_repeat[idx] & (1 << bit))) {
> +AccessXCancelRepeatKey(xkbi, key);
> +}
> +}
> +}
>  
>  old= *ctrl;
>  *ctrl= new;
> -- 
> 1.7.0.4
> 

It could be simplified a lot if you would use BitIsOn().  I would say
that the loop is not necessary -- just query and cancel xkbi->repeatKey.

-- 
Greetings,
Dirk
___
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: EVIOC mechanism for MT slots

2011-01-21 Thread Henrik Rydberg
> This is really problematic when launching applications that rely on
> evdev to work:
> you click with the mouse emulation on your icon to launch the program
> (one finger), and you start using your application with one finger
> only (opening of a file for instance) -> you are in an unstable case
> as the app does not know the slot state until you put another finger
> on the screen.
> 
> So I'm in favor of applying this patch Henrik submitted last May.

Great, so there seems to be sufficient interest to warrant revisiting
this. If you can find the patches, I will queue them in my tree. ;-)

And if Dmitry concurs, perhaps we can even aim at 2.6.38.

Thanks,
Henrik
___
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: EVIOC mechanism for MT slots

2011-01-21 Thread Dmitry Torokhov
On Fri, Jan 21, 2011 at 10:15:19AM +0100, Henrik Rydberg wrote:
> > This is really problematic when launching applications that rely on
> > evdev to work:
> > you click with the mouse emulation on your icon to launch the program
> > (one finger), and you start using your application with one finger
> > only (opening of a file for instance) -> you are in an unstable case
> > as the app does not know the slot state until you put another finger
> > on the screen.
> > 
> > So I'm in favor of applying this patch Henrik submitted last May.
> 
> Great, so there seems to be sufficient interest to warrant revisiting
> this. If you can find the patches, I will queue them in my tree. ;-)
> 
> And if Dmitry concurs, perhaps we can even aim at 2.6.38.
> 

The reason I objected in the first place is that the patch was a "nice
to have for completeness". Now that there are actual users needing this
data I have no issues with adding ioctl to retrieve this data.

Thanks.

-- 
Dmitry
___
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 xserver v2] xf86cmap: Use old palette system for pseudocolour.

2011-01-21 Thread Michel Dänzer
From: Michel Dänzer 

RandR doesn't seem to deal with pseudocolour at all, so without this the
pseudocolour palette never gets loaded to the hardware.

v2: Move logic into xf86_crtc_supports_gamma().

Signed-off-by: Michel Dänzer 
---
 hw/xfree86/modes/xf86Crtc.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index c4470c3..a3a123e 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -3262,6 +3262,10 @@ xf86_crtc_notify(ScreenPtr screen)
 Bool
 xf86_crtc_supports_gamma(ScrnInfoPtr pScrn)
 {
+/* RandR doesn't seem to deal with PseudoColor */
+if (pScrn->defaultVisual == PseudoColor)
+   return FALSE;
+
 if (xf86CrtcConfigPrivateIndex != -1) {
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
xf86CrtcPtr crtc;
-- 
1.7.2.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: EVIOC mechanism for MT slots

2011-01-21 Thread Benjamin Tissoires
Hi,

if the TrackingID is stable during the touch, the MT_SLOT is stable
*between* the touches:

if you put one finger on the surface, you get the slot 0. Then you
release. Then you touch one finger again, and protocol B does not send
the slot value.

This is really problematic when launching applications that rely on
evdev to work:
you click with the mouse emulation on your icon to launch the program
(one finger), and you start using your application with one finger
only (opening of a file for instance) -> you are in an unstable case
as the app does not know the slot state until you put another finger
on the screen.

So I'm in favor of applying this patch Henrik submitted last May.

Cheers,
Benjamin

On Fri, Jan 21, 2011 at 04:57, Chris Bagwell  wrote:
> On Thu, Jan 20, 2011 at 7:45 PM, Ping Cheng  wrote:
>> Hi Dmitry,
>>
>> Rafi's request is a good use case for the "input: mt: Add EVIOC
>> mechanism for MT slots" patchset that Henrik submitted last May. From
>> the MT X driver experience we had in the last few months, retrieving
>> all active contacts, especially in the case when different tool types
>> are supported on the same logical port, is necessary to initialize the
>> tools properly.
>>
>> Can you consider to merge the patchset into 2.6.38?
>>
>> Thank you.
>>
>> Ping
>
> Agree.  Although X/Y will change often, the tracking ID is stable.  So
> during start up of applications it would be really useful to query
> pre-existing ABS_MT_TRACKING_ID so that user doesn't have to lift
> object/hand/whatever before application starts working.
>
> Chris
>
>>
>>  Original Message 
>> Subject:        Re: [PATCH 0/2] input: mt: Add EVIOC mechanism for MT slots
>> Date:   Thu, 27 May 2010 16:12:20 -0700
>> From:   Dmitry Torokhov 
>> To:     Ping Cheng 
>> CC:     Henrik Rydberg , Andrew Morton
>> , linux-in...@vger.kernel.org,
>> linux-ker...@vger.kernel.org, Mika Kuoppala ,
>> Peter Hutterer , Benjamin Tissoires
>> , Stephane Chatty , Rafi Rubin
>> , Michael Poole 
>>
>>
>> On Thursday, May 27, 2010 03:59:37 pm Ping Cheng wrote:
>>
>>     On Thu, May 27, 2010 at 12:03 AM, Dmitry Torokhov
>>
>>       wrote:
>>     >  On Wed, May 26, 2010 at 08:59:35AM -0700, Ping Cheng wrote:
>>     >>  On Tue, May 25, 2010 at 1:23 PM, Dmitry Torokhov
>>     >>
>>     >>    wrote:
>>     >>  >  On Tue, May 25, 2010 at 09:52:29PM +0200, Henrik Rydberg wrote:
>>     >>  >>  Dmitry Torokhov wrote:
>>     >>  >>  >  Hi Henrik,
>>     >>  >>  >
>>     >>  >>  >  On Tue, May 25, 2010 at 01:52:57PM +0200, Henrik Rydberg 
>> wrote:
>>     >>  >>  >>  These patches are in response to the discussion about
>> input state
>>     >>  >>  >>  retrieval.
>>     >>  >>  >>
>>     >>  >>  >>  The current EVIOCGABS method does not work with MT
>> slots.  These
>>     >>  >>  >>  patches provides a mechanism where a slot is first
>> selected via a
>>     >>  >>  >>  call to EVIOCSABS, after which the corresponding MT
>> events can be
>>     >>  >>  >>  extracted with calls to EVIOCGABS.
>>     >>  >>  >>
>>     >>  >>  >>  The symmetric operation, to set the MT state via
>> EVIOCSABS, seems
>>     >>  >>  >>  to violate input data integrity, and is therefore not
>>     >>  >>  >>  implemented.
>>     >>  >>  >
>>     >>  >>  >  This looks sane, however the question remains - is
>> there any users
>>     >>  >>  >  for this data? Like I mentioned, I can see the need to
>> fetch state
>>     >>  >>  >  of switches and ranges of absolute axis, and even 
>> non-multitouch
>>     >>  >>  >  ABS values (due to the fact that some input devices,
>> like sliders,
>>     >>  >>  >  may stay in a certain position for long periods of time), but 
>> I
>>     >>  >>  >  expect multitouch data to be "refreshed" very quickly.
>>     >>  >>  >
>>     >>  >>  >  Thanks.
>>     >>  >>
>>     >>  >>  There were some voices addressing this issue, and the patches are
>>     >>  >>  here, available for whomever to pick up. Drop them if you wish, I
>>     >>  >>  will not send them anew.
>>     >>  >
>>     >>  >  I'll save them in my queue but will hold off applying until I hear
>>     >>  >  userspace folks requesting such functionality.
>>     >>
>>     >>  Hi Dmitry,
>>     >>
>>     >>  You do have a valid point - the (x,y) from a touch object would most
>>     >>  likely change all the time. Even if the object itself is in a steady
>>     >>  state on the digitizer, i.e., without any intentional movement, the
>>     >>  electronic noise would most likely lead to some (x,y) changes. So, 
>> the
>>     >>  chance that we need to retrieve (x,y) is rare.
>>     >>
>>     >>  However, it is possibe that when X driver starts, an object was
>>     >>  already on the digitizer. And the digitizer is of such a high quality
>>     >>
>>     >>  :), it filtered all the noises so we can not locate the touch without
>>     >>
>>     >>  a EVIOCGABS call.
>>     >>
>>     >>  Plus, from a pure coding/development point of view, it is not a bad
>>     >>  practice

[PATCH] [xserver] xkb: Cancel a key's repetition when its autorepeat is disabled.

2011-01-21 Thread Erkki Seppälä
When XkbChangeEnabledControls is called to disable key repetition of a
certain key (or keys), currently ongoing repetition of that key was
not cancelled. It was cancelled if ChangeKeyboardControl was used to
disable key repetition globally.

Signed-off-by: Erkki Seppälä 
---
 xkb/xkb.c |   12 +++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 7d95bc0..4a2590b 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -915,9 +915,19 @@ ProcXkbSetControls(ClientPtr client)
stuff->axtOptsMask);
 }
 
-if (stuff->changeCtrls & XkbPerKeyRepeatMask)
+if (stuff->changeCtrls & XkbPerKeyRepeatMask) {
+unsigned key;
+
 memcpy(new.per_key_repeat, stuff->perKeyRepeat,
XkbPerKeyBitArraySize);
+for (key = 0; key < 8 * XkbPerKeyBitArraySize; ++key) {
+unsigned idx = key / 8;
+unsigned bit = key % 8;
+if (!(new.per_key_repeat[idx] & (1 << bit))) {
+AccessXCancelRepeatKey(xkbi, key);
+}
+}
+}
 
 old= *ctrl;
 *ctrl= new;
-- 
1.7.0.4

___
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