Re: [Mesa-dev] [dri2proto] Declare DRI2ParamXHasBufferAge

2015-06-16 Thread Martin Peres

On 20/01/15 22:53, Ian Romanick wrote:

On 01/19/2015 03:00 AM, Chris Wilson wrote:

In order for X/DDX to reuse a driver specific field of the DRI2GetBuffers
reply, we need to declare the change in semantics. To indicate that the
flags field now continues the last swap buffers count instead, we
introduce the has-buffer-age parameter.

Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk

Reviewed-by: Ian Romanick ian.d.roman...@intel.com



Reviewed-by: Martin Peres martin.pe...@linux.intel.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: [Mesa-dev] [xorg 1/3] dri2: Allow GetBuffers to match any format

2015-06-16 Thread Martin Peres

On 20/01/15 22:49, Ian Romanick wrote:

On 01/19/2015 03:00 AM, Chris Wilson wrote:

Since the introduction of DRI2GetBuffersWithFormat, the old
DRI2GetBuffers interface would always recreate all buffers all the time
as it was no longer agnostic to the format value being set by the DDXes.
This causes an issue with clients intermixing the two requests,
rendering any sharing or caching of buffers (e.g. for triple buffering)
void.

Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk
---
  hw/xfree86/dri2/dri2.c | 13 -
  1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 43a1899..f9f594d 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -464,14 +464,16 @@ find_attachment(DRI2DrawablePtr pPriv, unsigned 
attachment)
  static Bool
  allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds,
   DRI2DrawablePtr pPriv,
- unsigned int attachment, unsigned int format,
+ unsigned int attachment,
+ int has_format, unsigned int format,
   int dimensions_match, DRI2BufferPtr * buffer)
  {
  int old_buf = find_attachment(pPriv, attachment);
  
  if ((old_buf  0)

  || attachment == DRI2BufferFrontLeft
-|| !dimensions_match || (pPriv-buffers[old_buf]-format != format)) {
+|| !dimensions_match
+|| (has_format  pPriv-buffers[old_buf]-format != format)) {
  *buffer = create_buffer(ds, pDraw, attachment, format);

Shouldn't the create_buffer change if !has_format?  If !has_format and,
say, !dimensions_match, create_buffer will get format = 0 when it should
get format = pPriv-buffers[old_buf]-format.  Right?


This is still a problem in the current patchset that I have. Since the 
client did not specifically ask for a certain format, why not increase 
the likeliness of us being able to reuse the buffer later on by using a 
format that the application already asked before?




Another alternative would be to have the caller always pass a format:
either the format supplied in the protocol or the format of the old
buffer.  That might be more messy.  Dunno.


  return TRUE;
  
@@ -549,7 +551,8 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,

  const unsigned format = (has_format) ? *(attachments++) : 0;
  
  if (allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment,

- format, dimensions_match, buffers[i]))
+ has_format, format, dimensions_match,
+ buffers[i]))
  buffers_changed = 1;
  
  if (buffers[i] == NULL)

@@ -584,7 +587,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
  
  if (need_real_front  0) {

  if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFrontLeft,
- front_format, dimensions_match,
+ has_format, front_format, 
dimensions_match,
   buffers[i]))
  buffers_changed = 1;
  
@@ -595,7 +598,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
  
  if (need_fake_front  0) {

  if (allocate_or_reuse_buffer(pDraw, ds, pPriv, 
DRI2BufferFakeFrontLeft,
- front_format, dimensions_match,
+ has_format, front_format, 
dimensions_match,
   buffers[i]))
  buffers_changed = 1;
  

___
dri-devel mailing list
dri-de...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-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

[ANNOUNCE] xorg-server 1.17.2

2015-06-16 Thread Adam Jackson
This picks up a pile of fixes from master.  Notable highlights:

- Fix for CVE-2015-3164 in Xwayland
- Fix int10 setup for vesa
- Fix regression in server-interpreted auth
- Fix fb setup on big-endian CPUs
- Build fix for for gcc5

Complete changelog:

Aaron Plattner (2):
  xfree86: Fix xf86_check_platform_slot's handling of PCI
  xfree86: Add GPU screens even if there are no active GDevs

Adam Jackson (1):
  xserver 1.17.2

Adel Gadllah (1):
  modesetting: Fix software cursor fallback

Alan Coopersmith (2):
  Clear ListenTransConns entries in CloseWellKnownConnections
  Accept x86_64 as well as i*86 for $host_cpu in Solaris on x86

Brent Collins (1):
  shm: Fix xselinux resource initialization for xinerama pixmaps

Chris Wilson (2):
  shm: Fix use-after-free in ShmDestroyPixmap
  present: Copy unflip contents back to the Screen Pixmap

Colin Harrison (2):
  os/xdmcp.c: Include Xtrans.h when building for WIN32
  os/utils.c: Don't try to build os_move_fd() for WIN32

Dave Airlie (2):
  os/access: fix regression in server interpreted auth
  glamor: don't do render ops with matching source/dest (v2)

Dima Ryazanov (1):
  xwayland: Implement smooth scrolling

Egbert Eich (6):
  symbols: Fix sdksyms.sh to cope with gcc5
  Xephyr: Don't crash when no command line argument is specified
  Xephyr: Print default server display number if none is specified
  Xephyr: Fix compile when debugging is enabled
  Xephyr: Fix screen image draw for the non-Glamor  non-XHSM case
  Xephyr: Fix broken image when endianess of client machine and 
host-Xserver differ

Emil Velikov (2):
  randr: remove chatty error messages
  randr: use randr: prefix in ErrorF()

Hans de Goede (1):
  Re-enable non serverfd input devices immediately on vtenter

Jason Gerecke (2):
  xfree86: Return NULL from xf86CompatOutput if no compat_output is defined
  dix: Do not allow device transform to be set on valuatorless devices

Jon TURNEY (9):
  ephyr: Avoid a segfault with 'DISPLAY= Xephy -glamor'
  os: XDMCP options like -query etc. should imply -listen tcp
  os: Teach vpnprintf() how to handle %*.*s
  hw/xwin/glx: Refactor parsing of the proto XML element
  hw/xwin/glx: Improve code generator to deal with latest Khronos OpenGL 
registry XML
  hw/xwin: Report Cygwin version information in log
  glamor: Fix build when configured --enable-glamor --disable-xshmfence
  hw/xwin/winclipboard: Link xwinclip with -lpthread
  hw/xnest: Fix build for MinGW

Jonathan Gray (2):
  glamor: remove const from the return type of 
glamor_get_drawable_location()
  glamor: fix build when DRI3 is not defined

Jürg Billeter (1):
  int10: Fix error check for pci_device_map_legacy

Keith Packard (1):
  mi: Partial pie-slice filled arcs may need more space for spans

Maarten Lankhorst (4):
  glamor: only use (un)pack_subimage when available
  glamor: do not check for gl errors in glamor_build_program
  glamor: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER
  glamor: GL_TEXTURE_MAX_LEVEL is not available on GLES2

Michal Srb (1):
  Expose GetMaster to modules.

Michel Dänzer (2):
  Add AC_SYS_LARGEFILE defines to dix-config.h
  modesetting: Include dix-config.h from dumb_bo.c

Olivier Fourdan (4):
  ephyr: Fail if glamor is requested but not usable
  xwayland: Add dependency on glamor libs
  glamor: check max native ALU instructions
  dix: Fix image byte order on big endian hardware

Ray Strode (5):
  systemd-logind: filter out non-signal messages from message filter
  systemd-logind: don't second guess D-Bus default timeout
  xwayland: Enable access control on open sockets [CVE-2015-3164 1/3]
  os: support new implicit local user access mode [CVE-2015-3164 2/3]
  xwayland: default to local user if no xauth file given. [CVE-2015-3164 
3/3]

Robert Ancell (1):
  xwayland: Fix error strings

Rui Matos (2):
  dix/events: Set currentTime to the given time stamp in NoticeTime
  xwayland: Throttle our cursor surface updates with a frame callback

Vicente Olivert Riera (1):
  backtrace.c: Fix word cast to a pointer

git tag: xorg-server-1.17.2

http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.17.2.tar.bz2
MD5:  397e405566651150490ff493e463f1ad  xorg-server-1.17.2.tar.bz2
SHA1: 56ac29a82b99bcf4c7ba2fca41a44cfa18748262  xorg-server-1.17.2.tar.bz2
SHA256: f61120612728f2c5034671d0ca3e2273438c60aba93b3dda4a8aa40e6a257993  
xorg-server-1.17.2.tar.bz2
PGP:  
http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.17.2.tar.bz2.sig

http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.17.2.tar.gz
MD5:  01012da00e2d76a305bd3e522c9583cf  xorg-server-1.17.2.tar.gz
SHA1: e71f5634ab1adf6b5017e21d1432d50f70e6c405  xorg-server-1.17.2.tar.gz
SHA256: fc568544920e9872fa615db3e32c8930e739dbef8b20366e775dee42db8ff5d1  

[ANNOUNCE] xf86-video-vesa 2.3.4

2015-06-16 Thread Adam Jackson
Minor update to fix PanelID support.  The minimum xserver version is
now 1.6; if you haven't updated your xserver in the last six years, now
would be a good time.

Adam Jackson (3):
  configure: Drop PanelID test
  Don't include deprecated xf86PciInfo.h
  vesa 2.3.4

Alan Coopersmith (1):
  Raise required version of xorg-server to = 1.6

git tag: xf86-video-vesa-2.3.4

http://xorg.freedesktop.org/archive/individual/driver/xf86-video-vesa-2.3.4.tar.bz2
MD5:  a893c37c589f7a31cea929a5d896a0e2  xf86-video-vesa-2.3.4.tar.bz2
SHA1: 88e74ccc5c11fdb60539bd474ba978eeb4f28a23  xf86-video-vesa-2.3.4.tar.bz2
SHA256: 7bddf4d879dd6f67088ecb203a31e12334aab980174bd0909930a21f32e251c1  
xf86-video-vesa-2.3.4.tar.bz2
PGP:  
http://xorg.freedesktop.org/archive/individual/driver/xf86-video-vesa-2.3.4.tar.bz2.sig

http://xorg.freedesktop.org/archive/individual/driver/xf86-video-vesa-2.3.4.tar.gz
MD5:  8a262adc37de43977e084ecfc951ee03  xf86-video-vesa-2.3.4.tar.gz
SHA1: b9b376714c8ec612f41bbc8ff2768c9d01911577  xf86-video-vesa-2.3.4.tar.gz
SHA256: e7d88c014b2e93afcee4d48495f5fb69f6e03818b1f67d20a71739c190c4fb8e  
xf86-video-vesa-2.3.4.tar.gz
PGP:  
http://xorg.freedesktop.org/archive/individual/driver/xf86-video-vesa-2.3.4.tar.gz.sig

- ajax


signature.asc
Description: This is a digitally signed message part
___
xorg-announce mailing list
xorg-announce@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-announce


libxrandr XRRGetCrtcInfo() misinterpretation by nouveau or NVIDIA?

2015-06-16 Thread Thomas Richter

Hi folks,

recently, I run into a problem enabling panning on a system enabled with 
NVIDIA hardware and the proprietary NVIDIA X11 driver. The bug manifests 
itself in Xfce4's desktop only covering the upper left corner of the 
screen when panning is enabled, and not the entire panning area.


After hunting the problem down, the result seems to be that the nouveau 
driver and the NVIDIA driver seem to disagree on what to return as 
information on XRRGetCrtcInfo() from libxrandr.


For the sake of giving an example, consider that I have a 1280x1024 
screen and enable a 2560x2048 panning area with


xrandr --output DVI-I-3 --panning 2560x2048

It seems to me that the nouveau driver returns the dimension of the 
entire panning area, i.e. 2560x2048, whereas the NVIDIA driver returns 
only the dimension of the visible screen, i.e. the monitor dimension of 
1280x1024.


Running xrandr on the same system, but with two different X11 drivers 
active seems to confirm this hypothesis.


Given the name of the libxrandr call, I'm tempted to believe that the 
proprietary NVIDIA X11 driver might actually be correct, but the 
documentation of libxrandr seems to be lacking in some respect, so I 
wonder how XRRGetCrtcInfo() should work in the combination of panning.


Problem is that libgtk+ currently uses this call to return a monitor 
dimension (for whatever this is with panning enabled), and Xfce4 
depends on this monitor dimension to fill the screen background. This 
works fine with nouveau (returning the entire screen area) but fails 
with NVIDIA (returning only the monitor area).


My question would now be where the actual protocol/interface violation 
is. At NVIDIA/nouveau? At libxrandr? At gtk+ using the wrong low-level 
call (instead of X11 screen-width / screen-height) or at Xfce4 (using 
gdk_screen_get_monitor_geometry(), expecting screen dimensions rather 
than monitor dimensions).


Thanks for any hints.

Greetings,
Thomas


___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

RandR + i915 (HD 4600 / Haswell) -- Cannot switch from internal to 3x external

2015-06-16 Thread Nathan Schulte
I am running Debian Sid on a laptop machine with an Intel Haswell CPU 
with Intel HD 4600 graphics.



$ Xorg -version

X.Org X Server 1.17.1
Release Date: 2015-02-10
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
Current Operating System: Linux desmas-l 4.0.0-1-amd64 #1 SMP Debian 4.0.2-1 
(2015-05-11) x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-4.0.0-1-amd64 
root=UUID=f5ba8b5c-63aa-4a67-a07c-dd8d3297b2d3 ro quiet
Build Date: 04 May 2015  11:22:06PM
xorg-server 2:1.17.1-2 (http://www.debian.org/support)
Current version of pixman: 0.32.6
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.


When using RandR (xrandr, arandr), I am unable to re-configure my 
displays from the one integrated in the machine (eDP1), to three 
external displays (in this case, HDMI1 (DP - DVI via DP++), HDMI2 (HDMI 
- DVI), HDMI3 (miniDP - DVI); the machine has three external 
connectors).  I haven't played with DP and multi-stream transport, but I 
expect it would behave similarly (that is, annoyingly).



xrandr: cannot find crtc for output HDMI


My work-around is to issue two RandR requests, with the first one 
enabling an external display, and the second one disabling the internal 
display and enabling the rest.  This is rather annoying and conflicts 
with some of the scripts I use to automatically configure my displays 
based upon context and hot-plug (autorandr).


The internal display is 1920x1080, and the three external displays are 
identical monitors with 1920x1200 resolution.  I believe this is key, 
and has to do with the number of available PLLs (2) and encoders (3) in 
the Intel hardware.


I've attached an strace (xrandr.log) of the xrandr command:


xrandr \
--output DP2 --off \
--output DP1 --off \
--output HDMI3 --mode 1920x1200 --pos 3120x0 --rotate left \
--output HDMI2 --mode 1920x1200 --pos 1920x0 --rotate left \
--output HDMI1 --primary --mode 1920x1200 --pos 0x410 --rotate normal \
--output eDP1 --off \
--output VGA1 --off


Any help resolving this issue is greatly appreciated.

--
Nate
execve(/usr/bin/xrandr, [xrandr, --output, DP2, --off, --output, DP1, --off, --output, HDMI3, --mode, 1920x1200, --pos, 3120x0, --rotate, left, --output, ...], [/* 30 vars */]) = 0
brk(0)  = 0x1e18000
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f190cfe8000
access(/etc/ld.so.preload, R_OK)  = -1 ENOENT (No such file or directory)
open(/etc/ld.so.cache, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=104928, ...}) = 0
mmap(NULL, 104928, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f190cfce000
close(3)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/usr/lib/x86_64-linux-gnu/libXrandr.so.2, O_RDONLY|O_CLOEXEC) = 3
read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\0\34\0\0\0\0\0\0..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=39256, ...}) = 0
mmap(NULL, 2134536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f190cbc
mprotect(0x7f190cbc9000, 2093056, PROT_NONE) = 0
mmap(0x7f190cdc8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f190cdc8000
close(3)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/usr/lib/x86_64-linux-gnu/libXrender.so.1, O_RDONLY|O_CLOEXEC) = 3
read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0p\33\0\0\0\0\0\0..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=39480, ...}) = 0
mmap(NULL, 2134760, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f190c9b6000
mprotect(0x7f190c9bf000, 2093056, PROT_NONE) = 0
mmap(0x7f190cbbe000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f190cbbe000
close(3)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/usr/lib/x86_64-linux-gnu/libX11.so.6, O_RDONLY|O_CLOEXEC) = 3
read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\220\337\1\0\0\0\0\0..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1319088, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f190cfcd000
mmap(NULL, 3416352, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f190c673000
mprotect(0x7f190c7af000, 2093056, PROT_NONE) = 0
mmap(0x7f190c9ae000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13b000) = 0x7f190c9ae000
mmap(0x7f190c9b5000, 288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f190c9b5000
close(3)= 0
access(/etc/ld.so.nohwcap, F_OK)  = -1 ENOENT (No such file or directory)
open(/lib/x86_64-linux-gnu/libm.so.6, O_RDONLY|O_CLOEXEC) = 3
read(3, 

Re: [PATCH] Xi: call UpdateDeviceState() even when the client is missing

2015-06-16 Thread Peter Hutterer
On Tue, Jun 16, 2015 at 01:55:49PM +0300, Alexander Volkov wrote:
 The client window can be closed in the middle of a touch sequence,
 e.g. Qt 4 closes popup windows on MousePress and Qt 5.5 will do it
 on TouchBegin. In this case the state of mouse buttons will not be
 updated on TouchEnd because ProcessTouchEvent() calls UpdateDeviceState()
 only when the event has been sent to the client. It results in a
 stuck left mouse button.
 
 This patch adds a call to UpdateDeviceState() in case the client
 can't be found.
 
 Signed-off-by: Alexander Volkov a.vol...@rusbitech.ru
 ---
  Xi/exevents.c | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/Xi/exevents.c b/Xi/exevents.c
 index 1c586d0..32e4a2c 100644
 --- a/Xi/exevents.c
 +++ b/Xi/exevents.c
 @@ -1590,6 +1590,8 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
  if (!ti) {
  DebugF([Xi] %s: Failed to get event %d for touchpoint %d\n,
 dev-name, type, touchid);
 +if (emulate_pointer)
 +UpdateDeviceState(dev, ev-device_event);
  return;
  }

ACK, but can we do this with a goto out please?

Cheers,
   Peter

  
 -- 
 2.4.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

[PATCH synaptics] Drop touch events from the driver

2015-06-16 Thread Peter Hutterer
This was a bad idea. No-one seems to use this and it gives us little benefits.
To even get this feature a number of other features need to be turned off
(like two-finger scrolling and tapping). Many of these are enabled by default,
if they are disabled a client stack with full touchpad gesture support could
in theory support true touchpad gestures. This has never happened.

Drop the touch events from the synaptics driver. This allows us to switch the
touchpad fully over to look like a relative device, thus also removing the
bug that changes the touchpad speed whenever a monitor is added/removed in.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
---
 src/synaptics.c | 113 +---
 1 file changed, 10 insertions(+), 103 deletions(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index 955b042..550b31c 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1190,49 +1190,19 @@ DeviceInitTouch(DeviceIntPtr dev, Atom *axes_labels)
 {
 InputInfoPtr pInfo = dev-public.devicePrivate;
 SynapticsPrivate *priv = (SynapticsPrivate *) (pInfo-private);
-int i;
 
-if (priv-has_touch) {
-priv-num_slots =
-priv-max_touches ? priv-max_touches : SYNAPTICS_MAX_TOUCHES;
+if (!priv-has_touch)
+return;
 
-priv-open_slots = malloc(priv-num_slots * sizeof(int));
-if (!priv-open_slots) {
-xf86IDrvMsg(pInfo, X_ERROR,
-failed to allocate open touch slots array\n);
-priv-has_touch = 0;
-priv-num_slots = 0;
-return;
-}
+priv-num_slots =
+priv-max_touches ? priv-max_touches : SYNAPTICS_MAX_TOUCHES;
 
-/* x/y + whatever other MT axes we found */
-if (!InitTouchClassDeviceStruct(dev, priv-max_touches,
-XIDependentTouch,
-2 + priv-num_mt_axes)) {
-xf86IDrvMsg(pInfo, X_ERROR,
-failed to initialize touch class device\n);
-priv-has_touch = 0;
-priv-num_slots = 0;
-free(priv-open_slots);
-priv-open_slots = NULL;
-return;
-}
-
-for (i = 0; i  priv-num_mt_axes; i++) {
-SynapticsTouchAxisRec *axis = priv-touch_axes[i];
-int axnum = 4 + i;  /* Skip x, y, and scroll axes */
-
-if (!xf86InitValuatorAxisStruct(dev, axnum, axes_labels[axnum],
-axis-min, axis-max, axis-res, 0,
-axis-res, Absolute)) {
-xf86IDrvMsg(pInfo, X_WARNING,
-failed to initialize axis %s, skipping\n,
-axis-label);
-continue;
-}
-
-xf86InitValuatorDefaults(dev, axnum);
-}
+priv-open_slots = malloc(priv-num_slots * sizeof(int));
+if (!priv-open_slots) {
+xf86IDrvMsg(pInfo, X_ERROR,
+failed to allocate open touch slots array\n);
+priv-has_touch = 0;
+priv-num_slots = 0;
 }
 }
 
@@ -3009,18 +2979,9 @@ static void
 HandleTouches(InputInfoPtr pInfo, struct SynapticsHwState *hw)
 {
 SynapticsPrivate *priv = (SynapticsPrivate *) pInfo-private;
-SynapticsParameters *para = priv-synpara;
 int new_active_touches = priv-num_active_touches;
-int min_touches = 2;
-Bool restart_touches = FALSE;
 int i;
 
-if (para-click_action[F3_CLICK1] || para-tap_action[F3_TAP])
-min_touches = 4;
-else if (para-click_action[F2_CLICK1] || para-tap_action[F2_TAP] ||
- para-scroll_twofinger_vert || para-scroll_twofinger_horiz)
-min_touches = 3;
-
 /* Count new number of active touches */
 for (i = 0; i  hw-num_mt_mask; i++) {
 if (hw-slot_state[i] == SLOTSTATE_OPEN)
@@ -3029,60 +2990,6 @@ HandleTouches(InputInfoPtr pInfo, struct 
SynapticsHwState *hw)
 new_active_touches--;
 }
 
-if (priv-has_semi_mt)
-goto out;
-
-if (priv-num_active_touches  min_touches 
-new_active_touches  min_touches) {
-/* We stayed below number of touches needed to send events */
-goto out;
-}
-else if (priv-num_active_touches = min_touches 
- new_active_touches  min_touches) {
-/* We are transitioning to less than the number of touches needed to
- * send events. End all currently open touches. */
-for (i = 0; i  priv-num_active_touches; i++) {
-int slot = priv-open_slots[i];
-
-xf86PostTouchEvent(pInfo-dev, slot, XI_TouchEnd, 0,
-   hw-mt_mask[slot]);
-}
-
-/* Don't send any more events */
-goto out;
-}
-else if (priv-num_active_touches  min_touches 
- new_active_touches = min_touches) {
-/* We are transitioning to more than the number of touches needed 

Pointer Barrier

2015-06-16 Thread - -


Hi allI am new here and hopefully you can help me with my problem. I am trying to useXFixesCreatePointerBarrier and XFixesDestroyPointerBarrierCreating works and I can see how the barrier works. To release the barrier I can catch the events usingXI_BarrierHitXI_BarrierLeavewhich I did and after receiving that event I used XIBarrierReleasePointer to release it. I know if I wanna disable this barrier the step has to be repeated everytime the pointer hits the barrier etc.What I like to do is to destroy the barrier so that it should not be used at all. I like to remove it completely. UsingXFixesDestroyPointerBarrier on the barrier gives me after couple of eventsX Error of failed request: 141 Major opcode of failed request: 138 (XFIXES) Minor opcode of failed request: 32 () Serial number of failed request: 87 Current serial number in output stream: 87What is it I am doing wrong? Hope someone can help me with that.Cengiz (yaakuro)
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: XIScrollClassInfo, generation of smooth scroll events from replayed buttons

2015-06-16 Thread Thomas Lübking

On Dienstag, 16. Juni 2015 06:53:31 CEST, Peter Hutterer wrote:

On Fri, Jun 12, 2015 at 09:21:34PM +0200, Thomas Lübking wrote:

See https://bugzilla.gnome.org/show_bug.cgi?id=750870

KWin passively grabs and casually replays buttons (including 4,5,6  7) on
inactive windows, but apparently that does not lead to the generation of
smooth scroll events from xinput2.

I suspect this could be related to the replay also generating framing ...


well, the problem here is that button and motion events are separate 
events 


Sorry, I forgot to cancel that.

Turned out that gtk raises a flag on crossing (as caused by the replay) and 
ignores the next motion event completely (replayed or not)

As by replaying every motion event is the first motion event and gtk also 
completely ignores wheel buttons no event processing takes place in the client (despite 
it receives all of them)

There was also https://bugs.freedesktop.org/show_bug.cgi?id=71762 about the 
inabilty to separate between XINotifyPassiveUnGrab and XINotifyUnGrab

Cheers and thanks for some more details,
Thomas
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

[PATCH] Skip disabled CRTCs in radeon_scanout_(do_)update

2015-06-16 Thread Michel Dänzer
From: Michel Dänzer michel.daen...@amd.com

The vblank / page flip ioctls don't work as expected for a disabled CRTC.

Signed-off-by: Michel Dänzer michel.daen...@amd.com
---
 src/radeon_kms.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 25a746d..ba95653 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -338,7 +338,8 @@ radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int 
scanout_id)
 RADEONInfoPtr info;
 Bool force;
 
-if (drmmode_crtc-dpms_mode != DPMSModeOn ||
+if (!xf86_crtc-enabled ||
+   drmmode_crtc-dpms_mode != DPMSModeOn ||
!drmmode_crtc-scanout[scanout_id].pixmap)
return FALSE;
 
@@ -409,7 +410,8 @@ radeon_scanout_update(xf86CrtcPtr xf86_crtc)
 DrawablePtr pDraw;
 BoxRec extents;
 
-if (drmmode_crtc-scanout_update_pending ||
+if (!xf86_crtc-enabled ||
+   drmmode_crtc-scanout_update_pending ||
!drmmode_crtc-scanout[0].pixmap ||
drmmode_crtc-dpms_mode != DPMSModeOn)
return;
-- 
2.1.4

___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[PATCH] Xi: call UpdateDeviceState() even when the client is missing

2015-06-16 Thread Alexander Volkov
The client window can be closed in the middle of a touch sequence,
e.g. Qt 4 closes popup windows on MousePress and Qt 5.5 will do it
on TouchBegin. In this case the state of mouse buttons will not be
updated on TouchEnd because ProcessTouchEvent() calls UpdateDeviceState()
only when the event has been sent to the client. It results in a
stuck left mouse button.

This patch adds a call to UpdateDeviceState() in case the client
can't be found.

Signed-off-by: Alexander Volkov a.vol...@rusbitech.ru
---
 Xi/exevents.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 1c586d0..32e4a2c 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1590,6 +1590,8 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
 if (!ti) {
 DebugF([Xi] %s: Failed to get event %d for touchpoint %d\n,
dev-name, type, touchid);
+if (emulate_pointer)
+UpdateDeviceState(dev, ev-device_event);
 return;
 }
 
-- 
2.4.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