Re: [PATCH v5 xserver 5/7] xf86Cursor: Fix xf86_crtc_rotate_coord_back using width/height wrongly

2016-09-08 Thread Hans de Goede
Hi, On 08-09-16 07:59, Michel Dänzer wrote: On 08/09/16 02:32 PM, Hans de Goede wrote: On 08-09-16 03:10, Michel Dänzer wrote: On 08/09/16 12:43 AM, Hans de Goede wrote: xf86_crtc_rotate_coord_back() is described as "Given a cursor source coordinate, rotate to a screen coordinate" which is e

Re: [PATCH v5 xserver 5/7] xf86Cursor: Fix xf86_crtc_rotate_coord_back using width/height wrongly

2016-09-08 Thread Michel Dänzer
On 08/09/16 04:18 PM, Hans de Goede wrote: > On 08-09-16 07:59, Michel Dänzer wrote: >> On 08/09/16 02:32 PM, Hans de Goede wrote: >>> On 08-09-16 03:10, Michel Dänzer wrote: On 08/09/16 12:43 AM, Hans de Goede wrote: > [0] BTW, do we really need two functions? The method used in

Re: [PATCH v5 xserver 5/7] xf86Cursor: Fix xf86_crtc_rotate_coord_back using width/height wrongly

2016-09-08 Thread Hans de Goede
Hi, On 08-09-16 09:24, Michel Dänzer wrote: On 08/09/16 04:18 PM, Hans de Goede wrote: On 08-09-16 07:59, Michel Dänzer wrote: On 08/09/16 02:32 PM, Hans de Goede wrote: On 08-09-16 03:10, Michel Dänzer wrote: On 08/09/16 12:43 AM, Hans de Goede wrote: [0] BTW, do we really need two funct

[PATCH v2 xserver] glamor: Fix crash when master gpu is using glamor and another gpu is hotplugged

2016-09-08 Thread Hans de Goede
When a GPU gets hotplugged while X is already running, glamor_egl_init() gets called and changes the current egl context, without updating lastGLContext, potentially causing the next glamor call on another GPU to run in the wrong context. This causes glamor to e.g. crash in the next glamor_create_

[PATCH v7 xserver 5/7] xf86Cursor: Fix xf86_crtc_rotate_coord using width/height wrongly

2016-09-08 Thread Hans de Goede
xf86_crtc_rotate_coord should be the exact inverse operation of xf86_crtc_rotate_coord_back, but when calculating x / y for 90 / 270 degrees rotation it was using height to calculate x / width to calculate y, instead of the otherway around. This was likely not noticed before since xf86_crtc_rotate

[PATCH v7 xserver 4/7] xf86Cursor: Fix xf86CurrentCursor to work on slave GPU Screens

2016-09-08 Thread Hans de Goede
The CurrentCursor is always attached to the master GPU. Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer --- hw/xfree86/ramdac/xf86Cursor.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 0

[PATCH v7 xserver 2/7] randr: Add RRHasScanoutPixmap helper function

2016-09-08 Thread Hans de Goede
This is a preparation patch for adding prime hw-cursor support. Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer --- randr/randrstr.h | 6 ++ randr/rrcrtc.c | 19 +++ 2 files changed, 25 insertions(+) diff --git a/randr/randrstr.h b/randr/randrstr.h index 1baa912.

[PATCH v7 xserver 1/7] dix: Add dixPrivatesCreated helper function

2016-09-08 Thread Hans de Goede
From: Dave Airlie This is a preparation patch for adding prime hw-cursor support. Signed-off-by: Dave Airlie Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer --- dix/privates.c | 9 + include/privates.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/dix/privates.

[PATCH v7 xserver 3/7] xf86Cursor: Add xf86CheckHWCursor() helper function

2016-09-08 Thread Hans de Goede
From: Dave Airlie This is a preparation patch for adding prime hw-cursor support. Signed-off-by: Dave Airlie Signed-off-by: Hans de Goede --- Changes in v6 (Hans de Goede): -Do not remove xorg_list_is_empty(&pScreen->pixmap_dirty_list) check from xf86CursorSetCursor() Changes in v5 (Hans de

[PATCH v7 xserver 6/7] xf86Cursor: Deal with rotation on GPU screens using a hw-cursor

2016-09-08 Thread Hans de Goede
When a slave-output is rotated the transformation is done on the blit from master to slave GPU, so crtc->transform_in_use is not set, but we still need to adjust the mouse position for things to work. This commit modifies xf86_crtc_transform_cursor_position to not rely on crtc->f_framebuffer_to_cr

Re: [PATCH v6 xserver 7/7] xf86Cursor: Add hw cursor support for prime

2016-09-08 Thread Hans de Goede
Hi, On 08-09-16 01:32, Alex Goins wrote: Hi Hans, Thanks for this, it will definitely be a big improvement. I've been testing these patches against the NVIDIA driver. Some concerns - What would be the best way to query from the master if the slave is using a HW cursor? We typically composite

[PATCH v7 xserver 7/7] xf86Cursor: Add hw cursor support for prime

2016-09-08 Thread Hans de Goede
From: Dave Airlie Currently with PRIME if we detect a secondary GPU, we switch to using SW cursors, this isn't optimal, esp for the intel/nvidia combinations, we have no choice for the USB offload devices. This patch checks on each slave screen if hw cursors are enabled, and also calls set curso

Re: Proposed X server 1.19 schedule

2016-09-08 Thread Laércio de Sousa
Please consider reviewing my latest Xephyr patches (at least the latest one - I'm afraid things may break in Xephyr running in mui-seat mode after Keith's new event-handling API): https://patchwork.freedesktop.org/patch/89109/ https://patchwork.freedesktop.org/patch/89110/ https://patchwork.freede

[PATCH xserver 04/12] xwayland: Bind the relative pointer manager

2016-09-08 Thread Jonas Ådahl
Will be used for getting unaccelerated motion events and later for relative motions used by a pointer warp emulator. Signed-off-by: Jonas Ådahl --- configure.ac | 4 +++- hw/xwayland/.gitignore | 2 ++ hw/xwayland/Makefile.am | 21 + hw/xwayland/x

[PATCH xserver 02/12] dix: Incroduce CursorConfinedTo vfunc in Screen

2016-09-08 Thread Jonas Ådahl
This function will be called when a pointer is grabbed non-root window set as the 'confineTo'. This will enable the ddx to handle the confinement their own way. Signed-off-by: Jonas Ådahl --- dix/events.c | 5 + include/scrnintstr.h | 5 + 2 files changed, 10 insertions(+) diff

[PATCH xserver 07/12] xwayland: Dispatch pointer motion events on wl_pointer.frame if possible

2016-09-08 Thread Jonas Ådahl
Wait until wl_pointer.frame with dispatching the pointer motion event, if wl_pointer.frame is supported by the compositor. This will later be used to combine unaccelerated motion deltas with the absolute motion delta. Signed-off-by: Jonas Ådahl --- hw/xwayland/xwayland-input.c | 75 +

[PATCH xserver 09/12] xwayland: Put getting a xwl_window from a Window in a helper

2016-09-08 Thread Jonas Ådahl
Signed-off-by: Jonas Ådahl --- hw/xwayland/xwayland.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index 847321e..5ceab0f 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -102,6 +102,12 @@ static De

[PATCH xserver 11/12] xwayland: Translate a pointer grab with confineTo to pointer confinement

2016-09-08 Thread Jonas Ådahl
Translate grabbing a pointer device with confineTo set to a window into confining the Wayland pointer using the pointer constraints protocol. This makes clients that depend on the pointer not going outside of the window region, such as certain games and virtual machines viewers, to function more pr

[PATCH xserver 08/12] xwayland: Set unaccelerated pointer motion delta if available

2016-09-08 Thread Jonas Ådahl
If there was an relative pointer motion within the same frame as an absolute pointer motion, provide both the absolute coordinate and the unaccelerated delta when setting the valuator mask. If a frame contained only a relative motion, queue an absolute motion with an unchanged position, but still

[PATCH xserver 03/12] dix: Add valuator_mask_set_absolute_unaccelerated

2016-09-08 Thread Jonas Ådahl
Add a valuator mask setter for setting absolute coordinate combined with unaccelerated motion deltas. This will later be used by Xwayland to combine a wl_pointer.motion() event with the unaccelerated delta of a wp_relative_pointer.relative_motion() event. Signed-off-by: Jonas Ådahl --- dix/input

[PATCH xserver 12/12] xwayland: Add pointer warp emulator

2016-09-08 Thread Jonas Ådahl
Emulate pointer warps by locking the pointer and sending relative motion events instead of absolute. X will keep track of the "fake" pointer cursor position given the relative motion events, and the client warping the cursor will warp the faked cursor position. Various requirements need to be met

[PATCH xserver 01/12] dix: Introduce CursorWarpedTo vfunc in Screen

2016-09-08 Thread Jonas Ådahl
This new vfunc will be called, if set, after a client has issued a WarpPointer request. This is necessary for implementing pointer warp emulation in Xwayland. Signed-off-by: Jonas Ådahl --- dix/events.c | 3 +++ include/scrnintstr.h | 9 + 2 files changed, 12 insertions(+) diff

[PATCH xserver 00/12] xwayland: Pointer confinement and warping

2016-09-08 Thread Jonas Ådahl
Hi, This series adds support for raw pointer events, pointer confinement and introduces pointer warp emulation to implement pointer-lock like features clients use pointer warping for. Raw pointer events is done by adding a new valuator mask setter that takes both an absolute value and an unaccele

[PATCH xserver 05/12] xwayland: Split up device class init/release into functions

2016-09-08 Thread Jonas Ådahl
Put device class initialization in init_[device_class](xwl_seat) and releasing in release_[device class](xwl_seat). The purpose is to make it easier to add more type of initialization here later, without making the function too large. Signed-off-by: Jonas Ådahl --- hw/xwayland/xwayland-input.c |

[PATCH xserver 06/12] xwayland: Add a new input device used for pointer warping/locking

2016-09-08 Thread Jonas Ådahl
From: Krzysztof Sobiecki Generating relative and absolute movement events from the same input device is problematic, because an absolute pointer device doesn't expect to see any relative motion events. To be able to generate relative pointer motion events including unaccelerated deltas, create a

[PATCH xserver 10/12] xwayland: Bind pointer constraints global

2016-09-08 Thread Jonas Ådahl
Will be used by the pointer warp emulator. Signed-off-by: Jonas Ådahl --- hw/xwayland/.gitignore | 2 ++ hw/xwayland/Makefile.am | 9 - hw/xwayland/xwayland-input.c | 13 + hw/xwayland/xwayland.h | 2 ++ 4 files changed, 25 insertions(+), 1 deletion(-) di

Re: [PATCH v2 xserver] glamor: Fix crash when master gpu is using glamor and another gpu is hotplugged

2016-09-08 Thread Keith Packard
Hans de Goede writes: > Signed-off-by: Hans de Goede > --- > Changes in v2: > -Set lastGLContext to NULL instead of saving and restoring the current > context Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ xorg-

[PATCH xserver] config: fix GPUDevice fail when AutoAddGPU off + BusID

2016-09-08 Thread Qiang Yu
This fix is for the following xorg.conf can work: Section "ServerFlags" Option "AutoAddGPU" "off" EndSection Section "Device" Identifier "Amd" Driver "ati" BusID "PCI:1:0:0" EndSection Section "Device" Identifier "Intel" Driver "modesetting"

[PATCH xserver 0/2] Hold input lock around all input device funcs

2016-09-08 Thread Keith Packard
Two patches which ensure that input drivers aren't re-entered from the xserver, the first is for deviceProc, the second for setProperty. Reading input events is already taken care of by the input thread. -- -keith ___ xorg-devel@lists.x.org: X.Org develo

[PATCH xserver 2/2] Hold input lock while calling input device SetProperty callback

2016-09-08 Thread Keith Packard
This keeps the input driver SetProperty function from being called while input events are being processed. Signed-off-by: Keith Packard --- Xi/xiproperty.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index 26d1206..b7a1f59 100644 --- a/Xi/xiproperty.c

[PATCH xserver 1/2] Hold input lock for deviceProc

2016-09-08 Thread Keith Packard
This ensures that the deviceProc is never called while the input thread is processing data from the device. Signed-off-by: Keith Packard --- dix/devices.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 9de84a6..56aa

vmware_drv broken? (missing letters in emacs, etc.)

2016-09-08 Thread Gordon Ross
After updating to Xorg server 1.14.7 (from something much older) I'm seeing letters disappear (become blank background) and reappear, typically when the cursor is moving over them and flashing. This is on an OpenIndiana.org system running under vmware, and using the vmware_drv para-virtual driver.

Re: [PATCH v6 xserver 7/7] xf86Cursor: Add hw cursor support for prime

2016-09-08 Thread Alex Goins
Thanks Hans for the insight into detecting HW cursor usage. +Daniel Vetter, could you comment on this possible issue with drmModeMoveCursor() and drmModePageFlip() interfering with each other on i915? > I'm encountering some very strange issues when running these with PRIME > Synchronization enab

Re: [PATCH v7 xserver 6/7] xf86Cursor: Deal with rotation on GPU screens using a hw-cursor

2016-09-08 Thread Michel Dänzer
On 08/09/16 07:08 PM, Hans De Goede wrote: > When a slave-output is rotated the transformation is done on the blit > from master to slave GPU, so crtc->transform_in_use is not set, but we > still need to adjust the mouse position for things to work. > > This commit modifies xf86_crtc_transform_cur

Re: [PATCH xserver] Add SyncSharedPixmap ScreenRec hook

2016-09-08 Thread Michel Dänzer
On 01/09/16 12:27 AM, Alex Deucher wrote: > On Wed, Aug 31, 2016 at 4:56 AM, Michel Dänzer wrote: >> From: Michel Dänzer >> >> Signed-off-by: Michel Dänzer > > Reviewed-by: Alex Deucher Thanks, Alex. If there are no objections, I'll push this change next week. -- Earthling Michel Dänzer

Re: [PATCH xserver 1/2] Hold input lock for deviceProc

2016-09-08 Thread Peter Hutterer
On Thu, Sep 08, 2016 at 11:02:30AM -0600, Keith Packard wrote: > This ensures that the deviceProc is never called while the input > thread is processing data from the device. > > Signed-off-by: Keith Packard > --- > dix/devices.c | 22 +++--- > 1 file changed, 19 insertions(+), 3

Re: [PATCH xserver 2/2] Hold input lock while calling input device SetProperty callback

2016-09-08 Thread Peter Hutterer
On Thu, Sep 08, 2016 at 11:02:31AM -0600, Keith Packard wrote: > This keeps the input driver SetProperty function from being called > while input events are being processed. > > Signed-off-by: Keith Packard > --- > Xi/xiproperty.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Xi/xi