[PATCH xserver] randr: Adjust master's last set time with slaves

2016-05-19 Thread Nikhil Mahale
In prime configurations master's last set time may not be latest
and greatest, adjust it with slaves last set time, pick up greatest
one. Otherwise xserver may end with events which has
lastSetTime < lastConfigTime even if that's not
the case and confuse xrandr client.

Signed-off-by: Nikhil Mahale 
---
 randr/randr.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/randr/randr.c b/randr/randr.c
index 3aabb19..c07def1 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -568,6 +568,7 @@ RRSetChanged(ScreenPtr pScreen)
 void
 RRTellChanged(ScreenPtr pScreen)
 {
+ScreenPtr slave;
 ScreenPtr master;
 rrScrPriv(pScreen);
 rrScrPrivPtr mastersp;
@@ -584,6 +585,15 @@ RRTellChanged(ScreenPtr pScreen)
 mastersp = pScrPriv;
 }
 
+xorg_list_for_each_entry(slave, &master->output_slave_list, output_head) {
+pSlaveScrPriv = rrGetScrPriv(slave);
+
+if (CompareTimeStamps(mastersp->lastSetTime,
+  pSlaveScrPriv->lastSetTime) == EARLIER) {
+mastersp->lastSetTime = pSlaveScrPriv->lastSetTime;
+}
+}
+
 if (mastersp->changed) {
 UpdateCurrentTimeIf();
 if (mastersp->configChanged) {
-- 
2.8.2


---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver] randr: Do not check the screen size bound for gpu screens

2016-05-19 Thread Nikhil Mahale
For gpu screen, CrtcSet set/adjust the master screen size along
mode in following callstack -

  ProcRRSetCrtcConfig()
|
-> RRCrtcSet()
|
-> rrCheckPixmapBounding()
|
-> pScrPriv->rrScreenSetSize()

Checking screen size bound for gpus screen cause some configurations
to fails, e.g

  $ xrandr --output eDP --mode 1920x1080 --pos 0x0 --output HDMI \
  --mode 2560x1440 --pos 0x0

  Here xrandr utility first sets screen size to 2560x1440 which
  gets resized to 1920x1080 on RRSetCrtcConfig request for eDP,
  and then RRSetCrtcConfig request for HDMI fails because
  of failure of screen bound check.

Signed-off-by: Nikhil Mahale 
---
 randr/rrcrtc.c | 19 ++-
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 566a3db..82db9a8 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -1176,27 +1176,20 @@ ProcRRSetCrtcConfig(ClientPtr client)
 
 #ifdef RANDR_12_INTERFACE
 /*
+ * For gpu screen, CrtcSet set/adjust the master screen size along
+ * with mode.
+ *
  * Check screen size bounds if the DDX provides a 1.2 interface
  * for setting screen size. Else, assume the CrtcSet sets
  * the size along with the mode. If the driver supports transforms,
  * then it must allow crtcs to display a subset of the screen, so
  * only do this check for drivers without transform support.
  */
-if (pScrPriv->rrScreenSetSize && !crtc->transforms) {
+if (!pScreen->isGPU && pScrPriv->rrScreenSetSize && !crtc->transforms) 
{
 int source_width;
 int source_height;
 PictTransform transform;
 struct pixman_f_transform f_transform, f_inverse;
-int width, height;
-
-if (pScreen->isGPU) {
-width = pScreen->current_master->width;
-height = pScreen->current_master->height;
-}
-else {
-width = pScreen->width;
-height = pScreen->height;
-}
 
 RRTransformCompute(stuff->x, stuff->y,
mode->mode.width, mode->mode.height,
@@ -1206,13 +1199,13 @@ ProcRRSetCrtcConfig(ClientPtr client)
 
 RRModeGetScanoutSize(mode, &transform, &source_width,
  &source_height);
-if (stuff->x + source_width > width) {
+if (stuff->x + source_width > pScreen->width) {
 client->errorValue = stuff->x;
 free(outputs);
 return BadValue;
 }
 
-if (stuff->y + source_height > height) {
+if (stuff->y + source_height > pScreen->height) {
 client->errorValue = stuff->y;
 free(outputs);
 return BadValue;
-- 
2.8.2


---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 1/2] xwayland: Move sprite invalidation logic into mipointer

2016-05-19 Thread Keith Packard
Emil Velikov  writes:


>> +/* Invalidate current sprite, forcing reload on next
>> + * sprite setting (window crossing, grab action, etc)
>> + */
>> +extern _X_EXPORT void
>> +miPointerInvalidateSprite(DeviceIntPtr pDev);
>> +
> It doesn't look like this should be exported, should it ?

Yes, it's part of the server API and replaces the public definition of
the underlying structure.

> Perhaps it's worth making a list of needed symbols (ideally in an
> automated manner) and throwing the remainder out there ? Then anyone
> can take a small bite as they get bored ;-)

We've done a bunch of symbol hiding, but it's always good to review any
of the remaining ones...

> Just a related thought... there's nothing wrong with the patch.

Thanks!

-- 
-keith


signature.asc
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH evdev] conf: rename to 65-evdev.conf

2016-05-19 Thread Peter Hutterer
On Thu, May 19, 2016 at 05:37:59PM +0200, Stefan Dirsch wrote:
> Bump up evdev driver to 65, so it get's perferred over libipnut,
> which was dropped down to 60. Reason is, that evdev driver is more
> of an additional driver, which likely won't be installed by default
> on a system any longer. But if it is installed it should also be
> used, i.e. preferred over libinput.
> 
> Similar to what was done for wacom configuration file.
> 
> https://bugzilla.suse.com/show_bug.cgi?id=979554
> 
> Signed-off-by: Stefan Dirsch 

nope, can't do this yet. evdev is still more flexible than libinput and
handles a couple of devices that libinput doesn't handle. so we have to
assume that for the time being evdev will be installed on most machines.

Cheers,
   Peter

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 1/2] xwayland: Move sprite invalidation logic into mipointer

2016-05-19 Thread Emil Velikov
On 18 May 2016 at 22:03, Keith Packard  wrote:
> This creates a function that invalidates the current sprite and forces
> a sprite image reload the next time the sprite is checked, moving that
> logic out of the xwayland sources and allowing the miPointerRec
> structure to be removed from the server API.
>
> Signed-off-by: Keith Packard 
> ---
>  hw/xwayland/xwayland-input.c |  9 +
>  mi/mipointer.c   | 15 +++
>  mi/mipointer.h   |  6 ++
>  3 files changed, 22 insertions(+), 8 deletions(-)
>
> diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
> index cbc1bf2..d186681 100644
> --- a/hw/xwayland/xwayland-input.c
> +++ b/hw/xwayland/xwayland-input.c
> @@ -219,7 +219,6 @@ pointer_handle_enter(void *data, struct wl_pointer 
> *pointer,
>  struct xwl_seat *xwl_seat = data;
>  DeviceIntPtr dev = xwl_seat->pointer;
>  DeviceIntPtr master;
> -miPointerPtr mipointer;
>  int i;
>  int sx = wl_fixed_to_int(sx_w);
>  int sy = wl_fixed_to_int(sy_w);
> @@ -243,13 +242,7 @@ pointer_handle_enter(void *data, struct wl_pointer 
> *pointer,
>  master = GetMaster(dev, POINTER_OR_FLOAT);
>  (*pScreen->SetCursorPosition) (dev, pScreen, sx, sy, TRUE);
>
> -/* X is very likely to have the wrong idea of what the actual cursor
> - * sprite is, so in order to force updating the cursor lets set the
> - * current sprite to some invalid cursor behind its back so that it
> - * always will think it changed to the not invalid cursor.
> - */
> -mipointer = MIPOINTER(master);
> -mipointer->pSpriteCursor = (CursorPtr) 1;
> +miPointerInvalidateSprite(master);
>
>  CheckMotion(NULL, master);
>
> diff --git a/mi/mipointer.c b/mi/mipointer.c
> index ada1ab5..7f95cdb 100644
> --- a/mi/mipointer.c
> +++ b/mi/mipointer.c
> @@ -468,6 +468,21 @@ miPointerUpdateSprite(DeviceIntPtr pDev)
>  }
>
>  /**
> + * Invalidate the current sprite and force it to be reloaded on next cursor 
> setting
> + * operation
> + *
> + * @param pDev The device to invalidate the sprite fore
> + */
> +void
> +miPointerInvalidateSprite(DeviceIntPtr pDev)
> +{
> +miPointerPtr pPointer;
> +
> +pPointer = MIPOINTER(pDev);
> +pPointer->pSpriteCursor = (CursorPtr) 1;
> +}
> +
> +/**
>   * Set the device to the coordinates on the given screen.
>   *
>   * @param pDev The device to move
> diff --git a/mi/mipointer.h b/mi/mipointer.h
> index bdeed12..7ce6409 100644
> --- a/mi/mipointer.h
> +++ b/mi/mipointer.h
> @@ -109,6 +109,12 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, double 
> *x, double *y,
>  extern _X_EXPORT void
>  miPointerUpdateSprite(DeviceIntPtr pDev);
>
> +/* Invalidate current sprite, forcing reload on next
> + * sprite setting (window crossing, grab action, etc)
> + */
> +extern _X_EXPORT void
> +miPointerInvalidateSprite(DeviceIntPtr pDev);
> +
It doesn't look like this should be exported, should it ?

From a quick look... many of the exported symbols seems to be left
over from when we hid (made builtin) most of the external modules
(dri/dri2/record/dbe...)

Perhaps it's worth making a list of needed symbols (ideally in an
automated manner) and throwing the remainder out there ? Then anyone
can take a small bite as they get bored ;-)

Just a related thought... there's nothing wrong with the patch.
-Emil
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH v5 00/13] PRIME Synchronization

2016-05-19 Thread Alex Goins
Hi Dave,

Any update on this? Anything I can do to help?

Thanks,
Alex


On Tue, 3 May 2016, Dave Airlie wrote:

> On 3 May 2016 at 12:19, Alex Goins  wrote:
> > Sorry for all of the self-replies.
> >
> > I spent more time looking into what might be causing this (despite not being
> > able to reproduce it), and found that in the Present extension's
> > present_check_flip(), it doesn't use flipping if there are slave outputs. 
> > So,
> > that's why it's not allowing page flipping, but that isn't due to these 
> > patches.
> >
> > Since it can't flip, it falls back to just waiting for vblank and you can 
> > get
> > some ugly tearing on the native display. I still can't reproduce the choppy
> > rendering, but if there is a problem it's likely something to do with
> > drmWaitVBlank().
> >
> > Have you tried to see if it fails like that even without my patches? If the
> > problem is with drmWaitVBlank(), it might just be that something is going 
> > wrong
> > there, and adding output slaves just exposes the issue.
> >
> > It looks like since drmWaitVBlank() doesn't take in the crtc_id directly 
> > like
> > drmModePageFlip(), and since there is no standard interface to do something 
> > like
> > drm_intel_get_pipe_from_crtc_id(), we just make a best guess in
> > drmmode_crtc_vblank_pipe(). Could be error-prone.
> 
> Okay thanks for looking into it. Yes the present behaviour is known as
> we can't flip
> on multiple crtcs with the current present driver API, I should post
> patches to at
> least clean that up.
> 
> Otherwise you are probably right wrt what is causing the choppiness, I'll try
> and get some times (it might be next week) to track it down, but I don't think
> it should block these patches at this point.
> 
> I'll try and finish review by the end of the week,
> 
> Dave.
> 
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH synaptics] conf: rename to 70-synaptics.conf

2016-05-19 Thread Eric Engestrom
On Thu, May 19, 2016 at 05:35:57PM +0200, Stefan Dirsch wrote:
> ---
>  conf/50-synaptics.conf | 46 --
>  conf/70-synaptics.conf | 46 ++

Also, `git format-patch` supports -M, which avoids all this "delete whole file
and create a whole new file" in favour of "move this file" ;)
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH synaptics] conf: rename to 70-synaptics.conf

2016-05-19 Thread Eric Engestrom
On Thu, May 19, 2016 at 05:35:57PM +0200, Stefan Dirsch wrote:
> Bump up synaptics driver to 70, so it get's perferred over libipnut,
> which was dropped down to 60. Reason is, that synaptics driver is more
> of an additional driver, which then should be installed if installed.

s/perferred/preferred/, and it seems like there's been a bit too much of
copy/paste near the end :)
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 08/11] kdrive/ephyr: Poll for events in block handler

2016-05-19 Thread Keith Packard
Laércio de Sousa  writes:

> Could it be related somehow to my concerns in
> https://patchwork.freedesktop.org/patch/86328 ?

I don't think so -- my patch only changes where the FD is read, not when
that FD is added to the select call. Your patch looks like a fine
change, although I think it might need to include a change to discard
input events when the input subsystem wasn't running (which is why the
SetNotifyFd calls are where they are)

-- 
-keith


signature.asc
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH evdev] conf: rename to 65-evdev.conf

2016-05-19 Thread Stefan Dirsch
Bump up evdev driver to 65, so it get's perferred over libipnut,
which was dropped down to 60. Reason is, that evdev driver is more
of an additional driver, which likely won't be installed by default
on a system any longer. But if it is installed it should also be
used, i.e. preferred over libinput.

Similar to what was done for wacom configuration file.

https://bugzilla.suse.com/show_bug.cgi?id=979554

Signed-off-by: Stefan Dirsch 
---
 10-evdev.conf | 40 
 65-evdev.conf | 40 
 Makefile.am   |  2 +-
 3 files changed, 41 insertions(+), 41 deletions(-)
 delete mode 100644 10-evdev.conf
 create mode 100644 65-evdev.conf

diff --git a/10-evdev.conf b/10-evdev.conf
deleted file mode 100644
index cc83ab2..000
--- a/10-evdev.conf
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Catch-all evdev loader for udev-based systems
-# We don't simply match on any device since that also adds accelerometers
-# and other devices that we don't really want to use. The list below
-# matches everything but joysticks.
-
-Section "InputClass"
-Identifier "evdev pointer catchall"
-MatchIsPointer "on"
-MatchDevicePath "/dev/input/event*"
-Driver "evdev"
-EndSection
-
-Section "InputClass"
-Identifier "evdev keyboard catchall"
-MatchIsKeyboard "on"
-MatchDevicePath "/dev/input/event*"
-Driver "evdev"
-EndSection
-
-Section "InputClass"
-Identifier "evdev touchpad catchall"
-MatchIsTouchpad "on"
-MatchDevicePath "/dev/input/event*"
-Driver "evdev"
-EndSection
-
-Section "InputClass"
-Identifier "evdev tablet catchall"
-MatchIsTablet "on"
-MatchDevicePath "/dev/input/event*"
-Driver "evdev"
-EndSection
-
-Section "InputClass"
-Identifier "evdev touchscreen catchall"
-MatchIsTouchscreen "on"
-MatchDevicePath "/dev/input/event*"
-Driver "evdev"
-EndSection
diff --git a/65-evdev.conf b/65-evdev.conf
new file mode 100644
index 000..cc83ab2
--- /dev/null
+++ b/65-evdev.conf
@@ -0,0 +1,40 @@
+#
+# Catch-all evdev loader for udev-based systems
+# We don't simply match on any device since that also adds accelerometers
+# and other devices that we don't really want to use. The list below
+# matches everything but joysticks.
+
+Section "InputClass"
+Identifier "evdev pointer catchall"
+MatchIsPointer "on"
+MatchDevicePath "/dev/input/event*"
+Driver "evdev"
+EndSection
+
+Section "InputClass"
+Identifier "evdev keyboard catchall"
+MatchIsKeyboard "on"
+MatchDevicePath "/dev/input/event*"
+Driver "evdev"
+EndSection
+
+Section "InputClass"
+Identifier "evdev touchpad catchall"
+MatchIsTouchpad "on"
+MatchDevicePath "/dev/input/event*"
+Driver "evdev"
+EndSection
+
+Section "InputClass"
+Identifier "evdev tablet catchall"
+MatchIsTablet "on"
+MatchDevicePath "/dev/input/event*"
+Driver "evdev"
+EndSection
+
+Section "InputClass"
+Identifier "evdev touchscreen catchall"
+MatchIsTouchscreen "on"
+MatchDevicePath "/dev/input/event*"
+Driver "evdev"
+EndSection
diff --git a/Makefile.am b/Makefile.am
index 1cc3ea6..99e3b6c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,7 @@ MAINTAINERCLEANFILES = ChangeLog INSTALL
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = xorg-evdev.pc
 
-dist_xorgconf_DATA = 10-evdev.conf
+dist_xorgconf_DATA = 65-evdev.conf
 
 .PHONY: ChangeLog INSTALL
 
-- 
2.6.6

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH synaptics] conf: rename to 70-synaptics.conf

2016-05-19 Thread Stefan Dirsch
Bump up synaptics driver to 70, so it get's perferred over libipnut,
which was dropped down to 60. Reason is, that synaptics driver is more
of an additional driver, which then should be installed if installed.

Similar to what was done for wacom configuration file.

https://bugzilla.suse.com/show_bug.cgi?id=979554

Signed-off-by: Stefan Dirsch 
---
 conf/50-synaptics.conf | 46 --
 conf/70-synaptics.conf | 46 ++
 conf/Makefile.am   |  2 +-
 man/synaptics.man  |  2 +-
 4 files changed, 48 insertions(+), 48 deletions(-)
 delete mode 100644 conf/50-synaptics.conf
 create mode 100644 conf/70-synaptics.conf

diff --git a/conf/50-synaptics.conf b/conf/50-synaptics.conf
deleted file mode 100644
index aa50456..000
--- a/conf/50-synaptics.conf
+++ /dev/null
@@ -1,46 +0,0 @@
-# Example xorg.conf.d snippet that assigns the touchpad driver
-# to all touchpads. See xorg.conf.d(5) for more information on
-# InputClass.
-# DO NOT EDIT THIS FILE, your distribution will likely overwrite
-# it when updating. Copy (and rename) this file into
-# /etc/X11/xorg.conf.d first.
-# Additional options may be added in the form of
-#   Option "OptionName" "value"
-#
-Section "InputClass"
-Identifier "touchpad catchall"
-Driver "synaptics"
-MatchIsTouchpad "on"
-# This option is recommend on all Linux systems using evdev, but cannot be
-# enabled by default. See the following link for details:
-# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
-#   MatchDevicePath "/dev/input/event*"
-EndSection
-
-Section "InputClass"
-Identifier "touchpad ignore duplicates"
-MatchIsTouchpad "on"
-MatchOS "Linux"
-MatchDevicePath "/dev/input/mouse*"
-Option "Ignore" "on"
-EndSection
-
-# This option enables the bottom right corner to be a right button on clickpads
-# and the right and middle top areas to be right / middle buttons on clickpads
-# with a top button area.
-# This option is only interpreted by clickpads.
-Section "InputClass"
-Identifier "Default clickpad buttons"
-MatchDriver "synaptics"
-Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
-Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
-EndSection
-
-# This option disables software buttons on Apple touchpads.
-# This option is only interpreted by clickpads.
-Section "InputClass"
-Identifier "Disable clickpad buttons on Apple touchpads"
-MatchProduct "Apple|bcm5974"
-MatchDriver "synaptics"
-Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
-EndSection
diff --git a/conf/70-synaptics.conf b/conf/70-synaptics.conf
new file mode 100644
index 000..aa50456
--- /dev/null
+++ b/conf/70-synaptics.conf
@@ -0,0 +1,46 @@
+# Example xorg.conf.d snippet that assigns the touchpad driver
+# to all touchpads. See xorg.conf.d(5) for more information on
+# InputClass.
+# DO NOT EDIT THIS FILE, your distribution will likely overwrite
+# it when updating. Copy (and rename) this file into
+# /etc/X11/xorg.conf.d first.
+# Additional options may be added in the form of
+#   Option "OptionName" "value"
+#
+Section "InputClass"
+Identifier "touchpad catchall"
+Driver "synaptics"
+MatchIsTouchpad "on"
+# This option is recommend on all Linux systems using evdev, but cannot be
+# enabled by default. See the following link for details:
+# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
+#   MatchDevicePath "/dev/input/event*"
+EndSection
+
+Section "InputClass"
+Identifier "touchpad ignore duplicates"
+MatchIsTouchpad "on"
+MatchOS "Linux"
+MatchDevicePath "/dev/input/mouse*"
+Option "Ignore" "on"
+EndSection
+
+# This option enables the bottom right corner to be a right button on clickpads
+# and the right and middle top areas to be right / middle buttons on clickpads
+# with a top button area.
+# This option is only interpreted by clickpads.
+Section "InputClass"
+Identifier "Default clickpad buttons"
+MatchDriver "synaptics"
+Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
+Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
+EndSection
+
+# This option disables software buttons on Apple touchpads.
+# This option is only interpreted by clickpads.
+Section "InputClass"
+Identifier "Disable clickpad buttons on Apple touchpads"
+MatchProduct "Apple|bcm5974"
+MatchDriver "synaptics"
+Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
+EndSection
diff --git a/conf/Makefile.am b/conf/Makefile.am
index 38d2a01..b883c10 100644
--- a/conf/Makefile.am
+++ b/conf/Makefile.am
@@ -20,7 +20,7 @@
 
 
 if HAS_XORG_CONF_DIR
-dist_config_DATA = 50-synaptics.conf
+dist_config_DATA = 70-synaptics.conf
 else
 fdidir = $(datadir)/hal/fdi/policy/20thirdparty
 dist_fdi_DATA = 11-x11-synaptics.fdi
diff --git a/man/synapt

Re: [PATCH 1/4] Remove CLTS code

2016-05-19 Thread Adam Jackson
On Wed, 2016-05-18 at 19:12 -0500, Keith Packard wrote:
> Adam Jackson  writes:
> 
> > Never been used, as far as I can tell.
> 
> All seem like fine changes to me, although I'd rather see people working
> to just stop using Xtrans entirely...

Oh, very much agreed. Just trimming the fat first.

> For the series:
> 
> Reviewed-by: Keith Packard 

remote: I: patch #87928 updated using rev 
473e77563b16fa7c42db9403c1382e9483e3666c.
remote: I: patch #87929 updated using rev 
0794b1b712a90b40e2b019c9edc6f96874493c52.
remote: I: patch #87930 updated using rev 
75419e6b6d985ea8796f05d1acb5e154b065c9b9.
remote: I: patch #87931 updated using rev 
3810e026323210df6ec6cf818f01832a63e9fbb9.
remote: I: 4 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/lib/libxtrans
   b167145..3810e02  master -> master

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 08/11] kdrive/ephyr: Poll for events in block handler

2016-05-19 Thread Laércio de Sousa
Could it be related somehow to my concerns in
https://patchwork.freedesktop.org/patch/86328 ?

2016-05-18 18:51 GMT-03:00 Keith Packard :

> With the driver block handler guaranteed to be the last thing called
> before the server blocks, we can now reliably check for events there
> and never block with events read but not processed.
>
> Signed-off-by: Keith Packard 
> ---
>  hw/kdrive/ephyr/ephyr.c | 14 +-
>  hw/kdrive/ephyr/ephyr.h |  3 +++
>  hw/kdrive/ephyr/ephyrinit.c |  1 +
>  hw/kdrive/src/kdrive.h  |  2 +-
>  hw/kdrive/src/kinput.c  |  9 -
>  5 files changed, 22 insertions(+), 7 deletions(-)
>
> diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
> index 1a410ca..6066b5d 100644
> --- a/hw/kdrive/ephyr/ephyr.c
> +++ b/hw/kdrive/ephyr/ephyr.c
> @@ -1106,7 +1106,7 @@ ephyrProcessConfigureNotify(xcb_generic_event_t *xev)
>  }
>
>  static void
> -ephyrXcbNotify(int fd, int ready, void *data)
> +ephyrXcbProcessEvents(void)
>  {
>  xcb_connection_t *conn = hostx_get_xcbconn();
>
> @@ -1166,6 +1166,18 @@ ephyrXcbNotify(int fd, int ready, void *data)
>  }
>  }
>
> +static void
> +ephyrXcbNotify(int fd, int ready, void *data)
> +{
> +ephyrXcbProcessEvents();
> +}
> +
> +void
> +ephyrBlockHandler(ScreenPtr pScreen, void *timeo)
> +{
> +ephyrXcbProcessEvents();
> +}
> +
>  void
>  ephyrCardFini(KdCardInfo * card)
>  {
> diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h
> index f5015f6..ef5736e 100644
> --- a/hw/kdrive/ephyr/ephyr.h
> +++ b/hw/kdrive/ephyr/ephyr.h
> @@ -138,6 +138,9 @@ void
>  ephyrCloseScreen(ScreenPtr pScreen);
>
>  void
> +ephyrBlockHandler(ScreenPtr pScreen, void *timeo);
> +
> +void
>   ephyrCardFini(KdCardInfo * card);
>
>  void
> diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
> index 149ea98..03d6289 100644
> --- a/hw/kdrive/ephyr/ephyrinit.c
> +++ b/hw/kdrive/ephyr/ephyrinit.c
> @@ -411,4 +411,5 @@ KdCardFuncs ephyrFuncs = {
>  ephyrPutColors, /* putColors */
>
>  ephyrCloseScreen,   /* closeScreen */
> +ephyrBlockHandler,  /* blockHandler */
>  };
> diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
> index 3c7f2cd..6ef7337 100644
> --- a/hw/kdrive/src/kdrive.h
> +++ b/hw/kdrive/src/kdrive.h
> @@ -133,6 +133,7 @@ typedef struct _KdCardFuncs {
>  void (*putColors) (ScreenPtr, int, xColorItem *);
>
>  void (*closeScreen) (ScreenPtr);/* close ScreenRec */
> +void (*blockHandler) (ScreenPtr, void *timeo);
>  } KdCardFuncs;
>
>  #define KD_MAX_PSEUDO_DEPTH 8
> @@ -296,7 +297,6 @@ typedef struct _KdOsFuncs {
>  Bool (*SpecialKey) (KeySym);
>  void (*Disable) (void);
>  void (*Fini) (void);
> -void (*pollEvents) (void);
>  void (*Bell) (int, int, int);
>  } KdOsFuncs;
>
> diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
> index c0f1cf7..2234dfc 100644
> --- a/hw/kdrive/src/kinput.c
> +++ b/hw/kdrive/src/kinput.c
> @@ -1965,6 +1965,7 @@ KdBlockHandler(ScreenPtr pScreen, void *timeo)
>  {
>  KdPointerInfo *pi;
>  int myTimeout = 0;
> +KdScreenPriv(pScreen);
>
>  for (pi = kdPointers; pi; pi = pi->next) {
>  if (pi->timeoutPending) {
> @@ -1977,13 +1978,11 @@ KdBlockHandler(ScreenPtr pScreen, void *timeo)
>  myTimeout = ms;
>  }
>  }
> -/* if we need to poll for events, do that */
> -if (kdOsFuncs->pollEvents) {
> -(*kdOsFuncs->pollEvents) ();
> -myTimeout = 20;
> -}
>  if (myTimeout > 0)
>  AdjustWaitForDelay(timeo, myTimeout);
> +
> +if (pScreenPriv->card->cfuncs->blockHandler)
> +(*pScreenPriv->card->cfuncs->blockHandler)(pScreen, timeo);
>  }
>
>  void
> --
> 2.8.0.rc3
>
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel




-- 
*Laércio de Sousa*
*Orientador de Informática*
*Escola Municipal "Professor Eulálio Gruppi"*
*Rua Ismael da Silva Mello, 559, Mogi Moderno*
*Mogi das Cruzes - SPCEP 08717-390*
Telefone: (11) 4726-8313
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 1/2] xwayland: Move sprite invalidation logic into mipointer

2016-05-19 Thread Simon Thum

Hi Keith!

Just saw this patch while I glossed over the input threading patches. 
Glad to see them land after all these years! But anyway:


On 05/18/2016 11:03 PM, Keith Packard wrote:

-/* X is very likely to have the wrong idea of what the actual cursor
- * sprite is, so in order to force updating the cursor lets set the
- * current sprite to some invalid cursor behind its back so that it
- * always will think it changed to the not invalid cursor.
- */
-mipointer = MIPOINTER(master);
-mipointer->pSpriteCursor = (CursorPtr) 1;
+miPointerInvalidateSprite(master);


Maybe the MIPOINTER macro def is a candidate for removal, too?

Cheers,

Simon


___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH libXfont 1/2] autogen: Set a default subject prefix for patches

2016-05-19 Thread Gioele Barabucci

Am 18.05.2016 um 17:52 schrieb Adam Jackson:

Signed-off-by: Adam Jackson 
---
  autogen.sh | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/autogen.sh b/autogen.sh
index fc34bd5..da95aaa 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,6 +9,9 @@ cd $srcdir
  autoreconf -v --install || exit 1
  cd $ORIGDIR || exit $?

+git config --local --get format.subjectPrefix ||
+git config --local format.subjectPrefix "PATCH libXfont"
+


Hi,

would it be possible make sure that this is applied only to git clones? 
For example using something like


if test -d .git ; then

If the directory has been created from a tarball, then git would 
traverse up the directories and it would change the subjectPrefix of 
some other repository, for example ~/.git for those with a versioned $HOME.


Regards,

--
Gioele Barabucci 

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 1/2] xwayland: Move sprite invalidation logic into mipointer

2016-05-19 Thread Pekka Paalanen
On Wed, 18 May 2016 16:03:47 -0500
Keith Packard  wrote:

> This creates a function that invalidates the current sprite and forces
> a sprite image reload the next time the sprite is checked, moving that
> logic out of the xwayland sources and allowing the miPointerRec
> structure to be removed from the server API.
> 
> Signed-off-by: Keith Packard 
> ---
>  hw/xwayland/xwayland-input.c |  9 +
>  mi/mipointer.c   | 15 +++
>  mi/mipointer.h   |  6 ++
>  3 files changed, 22 insertions(+), 8 deletions(-)

Hi,

FWIW as I'm so not familiar with Xserver code nor even compile-tested
this, but still looks good to me:

Reviewed-by: Pekka Paalanen 

for both patches.


Thanks,
pq

> diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
> index cbc1bf2..d186681 100644
> --- a/hw/xwayland/xwayland-input.c
> +++ b/hw/xwayland/xwayland-input.c
> @@ -219,7 +219,6 @@ pointer_handle_enter(void *data, struct wl_pointer 
> *pointer,
>  struct xwl_seat *xwl_seat = data;
>  DeviceIntPtr dev = xwl_seat->pointer;
>  DeviceIntPtr master;
> -miPointerPtr mipointer;
>  int i;
>  int sx = wl_fixed_to_int(sx_w);
>  int sy = wl_fixed_to_int(sy_w);
> @@ -243,13 +242,7 @@ pointer_handle_enter(void *data, struct wl_pointer 
> *pointer,
>  master = GetMaster(dev, POINTER_OR_FLOAT);
>  (*pScreen->SetCursorPosition) (dev, pScreen, sx, sy, TRUE);
>  
> -/* X is very likely to have the wrong idea of what the actual cursor
> - * sprite is, so in order to force updating the cursor lets set the
> - * current sprite to some invalid cursor behind its back so that it
> - * always will think it changed to the not invalid cursor.
> - */
> -mipointer = MIPOINTER(master);
> -mipointer->pSpriteCursor = (CursorPtr) 1;
> +miPointerInvalidateSprite(master);
>  
>  CheckMotion(NULL, master);
>  
> diff --git a/mi/mipointer.c b/mi/mipointer.c
> index ada1ab5..7f95cdb 100644
> --- a/mi/mipointer.c
> +++ b/mi/mipointer.c
> @@ -468,6 +468,21 @@ miPointerUpdateSprite(DeviceIntPtr pDev)
>  }
>  
>  /**
> + * Invalidate the current sprite and force it to be reloaded on next cursor 
> setting
> + * operation
> + *
> + * @param pDev The device to invalidate the sprite fore
> + */
> +void
> +miPointerInvalidateSprite(DeviceIntPtr pDev)
> +{
> +miPointerPtr pPointer;
> +
> +pPointer = MIPOINTER(pDev);
> +pPointer->pSpriteCursor = (CursorPtr) 1;
> +}
> +
> +/**
>   * Set the device to the coordinates on the given screen.
>   *
>   * @param pDev The device to move
> diff --git a/mi/mipointer.h b/mi/mipointer.h
> index bdeed12..7ce6409 100644
> --- a/mi/mipointer.h
> +++ b/mi/mipointer.h
> @@ -109,6 +109,12 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, double 
> *x, double *y,
>  extern _X_EXPORT void
>  miPointerUpdateSprite(DeviceIntPtr pDev);
>  
> +/* Invalidate current sprite, forcing reload on next
> + * sprite setting (window crossing, grab action, etc)
> + */
> +extern _X_EXPORT void
> +miPointerInvalidateSprite(DeviceIntPtr pDev);
> +
>  /* Sets whether the sprite should be updated immediately on pointer moves */
>  extern _X_EXPORT Bool
>  miPointerSetWaitForUpdate(ScreenPtr pScreen, Bool wait);



pgprF_X204a1b.pgp
Description: OpenPGP digital signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel