[PATCH v4 10/13] modesetting: Blacklist UDL from PRIME sync

2016-03-03 Thread Alex Goins
UDL (USB 2.0 DisplayLink DRM driver) has strange semantics when it comes to vblank events and damage tracking when page flipping. When doing a page flip, it will instantly raise a vblank event without waiting for vblank. However, it has no support for DRM_IOCTL_WAIT_VBLANK. It also seems to have

[PATCH v4 13/13] modesetting: Implement PRIME syncing as a source

2016-03-03 Thread Alex Goins
Implements (Start/Stop)FlippingPixmapTracking, PresentSharedPixmap, and RequestSharedPixmapNotifyDamage, the source functions for PRIME synchronization and double buffering. Allows modesetting driver to be used as a source with PRIME synchronization. v1: N/A v2: N/A v3: N/A v4: Initial commit

[PATCH v4 03/13] randr/xf86: Add PRIME Synchronization / Double Buffer

2016-03-03 Thread Alex Goins
Changes PRIME to use double buffering and synchronization if all required driver functions are available. rrcrtc.c: Changes rrSetupPixmapSharing() to use double buffering and synchronization in the case that all required driver functions are available. Otherwise, falls back to

[PATCH v4 08/13] modesetting: Fix mmap leak in scanout_pixmap_cpu

2016-03-03 Thread Alex Goins
drmmode_set_scanout_pixmap_cpu() uses drmmode_map_slave_bo(), which maps a dumb bo. However, when cleaning up scanout pixmaps, it never destroys it, leading to a leak of mapped memory. With enough modesets, this can result in an insane amount of memory being mapped. Add dumb_bo_destroy() of the

[PATCH v4 12/13] modesetting: Consistent whitespace in driver.c

2016-03-03 Thread Alex Goins
For some reason a couple of the dirty functions in driver.c used 8 spaces per tab instead of 4 like the rest of the file. Fix this to make it more consistent and give me more room to work in ms_dirty_update in subsequent commits. v1: N/A v2: N/A v3: N/A v4: Initial commit Signed-off-by: Alex

[PATCH v4 07/13] modesetting: Implement PRIME syncing as a sink

2016-03-03 Thread Alex Goins
Implements (Enable/Disable)SharedPixmapFlipping and SharedPixmapNotifyDamage, the sink functions for PRIME synchronization and double buffering. Allows modesetting driver to be used as a sink with PRIME synchronization. Changes dispatch_slave_dirty to flush damage from both scanout pixmaps.

[PATCH v4 04/13] randr: Add ability to turn PRIME sync off

2016-03-03 Thread Alex Goins
Adds an output parameter to disable PRIME synchronization. Output parameter is created when the user calls 'xrandr --setprovideroutputsource ' to prevent polluting output parameters of non-PRIME configurations. Defaults to on, so if the user wants PRIME synchronization they don't need to do

[PATCH v4 02/13] modesetting: scanout_pixmap_gpu one call only

2016-03-03 Thread Alex Goins
Subsequent commits will involve multiple calls to rrCrtcSetScanoutPixmap(ppix) without a call to rrCrtcSetScanoutPixmap(NULL) in between. This causes drmmode_set_scanout_pixmap_gpu() to track damage multiple times but ultimately only stop tracking on one, which could lead to dangling pointers. I

[PATCH v4 09/13] modesetting: Suspend and resume flipping with DPMS

2016-03-03 Thread Alex Goins
DPMS would prevent page flip / vblank events from being raised, freezing the screen until PRIME flipping was reinitialized. To handle DPMS cleanly, suspend PRIME page flipping when DPMS mode is not on, and resume it when DPMS mode is on. v1: Initial commit v2: Moved flipping_active check from

[PATCH v4 01/13] xf86: Add PRIME flipping functions to Screen

2016-03-03 Thread Alex Goins
Adds typedefs for (*RRStartFlippingPixmapTrackingProcPtr), (*RREnableSharedPixmapFlippingProcPtr), and (*RRDisableSharedPixmapFlippingProcPtr) in randrstr.h. Adds typedefs for (*PresentSharedPixmapProcPtr), (*SharedPixmapNotifyDamageProcPtr), (*RequestSharedPixmapNotifyDamageProcPtr), and

[PATCH v4 00/13] PRIME Synchronization

2016-03-03 Thread Alex Goins
Hello all, These patches change the xserver to support setting up PRIME with double buffering, and implement double buffered PRIME sink and source support in the modesetting driver. In addition to these changes, I've upstreamed a couple of patches to the i915 DRM driver that mesh with these, and

[PATCH v4 06/13] modesetting: Properly clean up w/ PRIME syncing

2016-03-03 Thread Alex Goins
With PRIME synchronization, there is a second scanout buffer, scanout_pixmap_back, that needs to be cleaned up when destroying scanout pixmaps. PRIME synchronization currently shouldn't apply to reverse PRIME, so only apply to scanout_pixmap_cpu(). v1: Initial commit v2: Unchanged v3: Unchanged

[PATCH v4 11/13] modesetting: Disable Reverse PRIME for i915

2016-03-03 Thread Alex Goins
Reverse PRIME seems to be designed with discrete graphics as a sink in mind, designed to do an extra copy from sysmem to vidmem to prevent a discrete chip from needing to scan out from sysmem. The criteria it used to detect this case is if we are a GPU screen and Glamor accelerated. It's possible

[PATCH v4 05/13] randr: Cleanup rrSetupPixmapSharing()

2016-03-03 Thread Alex Goins
protopix is completely redundant with mscreenpix. Get rid of it. We don't need rrScrPriv, so remove it. v1: Initial commit v2: Unchanged v3: Unchanged v4: Unchanged Signed-off-by: Alex Goins --- randr/rrcrtc.c | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [PATCH xserver] build: Enable vidmode independently from Xorg

2016-03-03 Thread Emil Velikov
Hi Rui, On 3 March 2016 at 21:00, Rui Matos wrote: > This allows building Xwayland without Xorg and still include the > vidmode extension. > > Signed-off-by: Rui Matos > --- > configure.ac | 20 +--- > 1 file changed, 13

Re: [PATCH 2/2] pixmap: add wait shared pixmap

2016-03-03 Thread Keith Packard
Dave Airlie writes: > Signed-off-by: Dave Airlie Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives:

Re: [PATCH 1/2] present: fail flipping if we have any slave outputs.

2016-03-03 Thread Keith Packard
Dave Airlie writes: > Due to the way present currently works, we don't ever > check with the secondary adapters if we can flip at all. > > We shouldn't flip if the secondary adapters are attached > to the pixmap currently, however using the current check_flip > callback isn't

[PATCH xserver] build: Enable vidmode independently from Xorg

2016-03-03 Thread Rui Matos
This allows building Xwayland without Xorg and still include the vidmode extension. Signed-off-by: Rui Matos --- configure.ac | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index c166841..d157b22 100644