[PATCH xserver 1/1] modesetting: Fix GBM objects leak when checking for flip

2018-04-26 Thread Louis-Francis Ratté-Boulianne
GBM objects were never destroyed after looking for format and modifier compatibility when deciding whether flipping or copying a presented pixmap. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106106 Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/x

Re: [PATCH xserver] modesetting: Only use modifiers on kms drivers which do support them.

2018-04-20 Thread Louis-Francis Ratté-Boulianne
> NVidia Pascal. > > Fixes: 2f807c2324b4 ("modesetting: Add support for multi-plane > pixmaps when page-flipping") > Signed-off-by: Mario Kleiner <mario.kleiner...@gmail.com> > Cc: Daniel Stone <dani...@collabora.com> Reviewed-by: Louis-Francis Ratté-Boulia

Re: [PATCH xserver] dri3: Fix dri3_buffers_from_pixmap request.

2018-04-16 Thread Louis-Francis Ratté-Boulianne
siting under DRI3 under, > e.g., KDE Plasma 5. > > Fixes: 6e7c40f62db6 ("dri3: Add multi-planar/modifier buffer > requests") > Signed-off-by: Mario Kleiner <mario.kleiner...@gmail.com> > Cc: Daniel Stone <dani...@collabora.com> Reviewed-by: Louis-Francis

[PATCH xserver 2/2] modesetting: Have consistent state when using atomic modesetting

2018-04-03 Thread Louis-Francis Ratté-Boulianne
to avoid an inconsistent state. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 66 ++-- hw/xfree86/drivers/modesetting/drmmode_display.h | 1 + 2 files changed, 64 insertions(+), 3 deletions(-)

[PATCH xserver 1/2] modesetting: Use atomic modesetting to set DPMS mode

2018-04-03 Thread Louis-Francis Ratté-Boulianne
CRTCs and outputs needs to be enabled/disabled when the current DPMS mode is changed. We also try to do it in an atomic commit when possible. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/driver.c | 5 +- hw/xfree86/d

[PATCH xserver 1/2] modesetting: Ignore alpha channel when importing BOs for modesetting

2018-03-28 Thread Louis-Francis Ratté-Boulianne
Fixes a regression caused by modifiers support. For some hw to continue working even if not supporting ARGB and ARGB2101010 formats, we assume that all imported BOs are opaque. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modes

[PATCH xserver 2/2] modesetting: Fix reported size when using atomic modesetting

2018-03-28 Thread Louis-Francis Ratté-Boulianne
The framebuffer can include multiple CRTCs in multi-monitors setup. So we shouldn't use the buffer size but the CRTC size instead. Rotated displays are shadowed, so we don't need to worry about it there. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/d

Re: [PATCH xserver] modesetting: Fix page flipping under DRI 3.2.

2018-03-27 Thread Louis-Francis Ratté-Boulianne
Hi Mario, Could you try with the following patch and let me know how things are working out: https://gitlab.collabora.com/lfrb/xserver/commit/d26b45afc19547ab3ff689 581db2b01abb4e1ed2 It shouldn't differ much from your patch though and I still don't understand why pageflip would fail for you.

Re: [PATCH xserver] modesetting: Fix page flipping under DRI 3.2.

2018-03-25 Thread Louis-Francis Ratté-Boulianne
Hi, What do you mean by pageflipping not properly working? I've tried to reproduce the issue, and pageflipping seems to work fine. Also, we can't unfortunately just use always XRGB formats in glamor (we need to check wheither depth is 24 or 32) as it would break actual partly-transparent or

Re: [PATCH xserver 2/5] Remove always true GLAMOR_HAS_DRM_* guards

2018-03-21 Thread Louis-Francis Ratté-Boulianne
uards always evaluate to true. > > Fixes: e4e3447603b ("Add RandR leases with modesetting driver support > [v6]") > Cc: Keith Packard <kei...@keithp.com> > Cc: Daniel Stone <dani...@collabora.com> > Cc: Louis-Francis Ratté-Boulianne <l...@collabor

[RFC xserver v7 11/14] glamor: Implement PixmapFromBuffers and BuffersFromPixmap

2018-02-27 Thread Louis-Francis Ratté-Boulianne
It relies on GBM >= 17.1.0 where we can import BO with multiple planes and a format modifier (GBM_BO_IMPORT_FD_MODIFIER). v2: Properly free fds in Xwayland Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --

[RFC xserver v7 09/14] modesetting: Create scanout buffers using supported modifiers

2018-02-27 Thread Louis-Francis Ratté-Boulianne
Use most optimal buffer format (e.g. tiled/compressed) available for scanout. v2: Don't use multi-plane modifier to create scanout buffer v3: Add flag to retrieve modifiers set from enabled CRTCs only v4: Fix uses when GBM/EGL driver doesn't support modifiers Signed-off-by: Louis-Francis Ratté

[RFC xserver v7 05/14] modesetting: Use atomic modesetting API for pageflip if available

2018-02-27 Thread Louis-Francis Ratté-Boulianne
with the atomic API. The helper functions to retrieve DRM properties have been borrowed from Weston. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- configure.ac | 3 + hw/xfr

[RFC xserver v7 12/14] glamor: Implement GetSupportedModifiers

2018-02-27 Thread Louis-Francis Ratté-Boulianne
and (uninitialized pointer) Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- configure.ac | 4 + glamor/glamor.c | 25 +

[RFC xserver v7 03/14] dri3: Add multi-planar/modifier buffer requests

2018-02-27 Thread Louis-Francis Ratté-Boulianne
Add screen/drawable modifier sets v4: Free array returned by 'get_drawable_modifiers()' v5: Fix FD leak Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 2 +-

[RFC xserver v7 10/14] modesetting: Check if buffer format is supported when flipping

2018-02-27 Thread Louis-Francis Ratté-Boulianne
Add support for 'check_flip2' so that the present core can know why it is impossible to flip in that scenario. The core can then let know the client that the buffer format/modifier is suboptimal. v2: No longer need to implement 'check_flip' Signed-off-by: Louis-Francis Ratté-Boulianne &l

[RFC xserver v7 13/14] glamor: Use gbm_bo_create_with_modifiers for internal pixmap allocation

2018-02-27 Thread Louis-Francis Ratté-Boulianne
Using modifier might allow the driver to use a more optimal format (e.g. tiled/compressed). Let's try to use those if possible. v2: Don't filter out multi-plane modifiers Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@coll

[RFC xserver v7 14/14] dri3: Enable DRI3 version 1.1

2018-02-27 Thread Louis-Francis Ratté-Boulianne
Enable DRI3 v1.1 now that all functions have been implemented and that there is at least one backend implementing the driver hooks (modesetting/glamor). Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- incl

[RFC xserver v7 06/14] modesetting: Add support for multi-plane pixmaps when page-flipping

2018-02-27 Thread Louis-Francis Ratté-Boulianne
This allows the uses of CCS compressed or tiled pixmaps as BOs when page-flipping. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 49

[RFC xserver v7 08/14] modesetting: Get supported formats/modifiers for scanout

2018-02-27 Thread Louis-Francis Ratté-Boulianne
Retrieve IN_FORMATS property from the plane. It gives the allowed formats and modifiers for BO allocation. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- configure.ac | 4 +

[RFC xserver v7 1/2] dri3: Add modifier/multi-plane requests, bump to v1.1

2018-02-27 Thread Louis-Francis Ratté-Boulianne
DRI3 version 1.1 adds support for explicit format modifiers, including multi-planar buffers. Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- dri3proto.pc.in| 2 +- d

[RFC xserver v7 04/14] present: Send PresentCompleteModeSuboptimalCopy appropriately

2018-02-27 Thread Louis-Francis Ratté-Boulianne
and check driver version before using 'check_flip2'. v3: Only require one of 'check_flip' or 'check_flip2' to be implemented by the driver. Refactor reasons list to enum Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@coll

[RFC xserver v7 07/14] modesetting: Use atomic modesetting to configure output/CRTCs

2018-02-27 Thread Louis-Francis Ratté-Boulianne
To make sure we also use the same primary plane and to avoid mixing uses of two APIs, it is better to always use the atomic modesetting API when possible. v2: Don't use mode_output->connector_id Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel St

[RFC xorgproto v7 02/14] presentproto: PresentCompleteModeSuboptimalCopy flag

2018-02-27 Thread Louis-Francis Ratté-Boulianne
is to allow clients to re-fetch DRI3 format modifiers as some modifiers might allow direct scanout. Bump presentproto version to 1.2. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- include/X11/extensions/presentt

[RFC xserver v7 00/14] DRI3 v1.1: modifiers and multi-plane

2018-02-27 Thread Louis-Francis Ratté-Boulianne
Hello, This is the RFC v7 for DRI3 v1.1 (X11 modifiers and multi-plane). For context, please check previous submissions: https://lists.x.org/archives/xorg-devel/2017-June/053854.html https://lists.x.org/archives/xorg-devel/2017-August/054436.html

[RFC xorgproto v7 01/14] dri3proto: Add modifier/multi-plane requests, bump to v1.1

2018-02-27 Thread Louis-Francis Ratté-Boulianne
DRI3 version 1.1 adds support for explicit format modifiers, including multi-planar buffers. Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- dri3proto.pc.in| 2 +- d

Re: [RFC dri3proto v6 01/14] Add modifier/multi-plane requests, bump to v1.1

2018-02-22 Thread Louis-Francis Ratté-Boulianne
Hi, On Wed, 2018-02-21 at 11:32 -0800, Keith Packard wrote: > Louis-Francis Ratté-Boulianne <l...@collabora.com> writes: > > I'll review just the specification today; once we've got that wired, > I'll go ahead and verify that the encoding matches this spec. > > > d

[RFC xserver v6 13/14] glamor: Use gbm_bo_create_with_modifiers for internal pixmap allocation

2018-02-15 Thread Louis-Francis Ratté-Boulianne
Using modifier might allow the driver to use a more optimal format (e.g. tiled/compressed). Let's try to use those if possible. v2: Don't filter out multi-plane modifiers Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@coll

[RFC xserver v6 14/14] dri3: Enable DRI3 version 1.1

2018-02-15 Thread Louis-Francis Ratté-Boulianne
Enable DRI3 v1.1 now that all functions have been implemented and that there is at least one backend implementing the driver hooks (modesetting/glamor). Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- incl

[RFC xserver v6 00/14] DRI3 v1.1: modifiers and multi-plane

2018-02-15 Thread Louis-Francis Ratté-Boulianne
Hello, This is the RFC v6 for DRI3 v1.1 (X11 modifiers and multi-plane). For context, please check previous submissions: https://lists.x.org/archives/xorg-devel/2017-June/053854.html https://lists.x.org/archives/xorg-devel/2017-August/054436.html

[RFC xserver v6 10/14] modesetting: Check if buffer format is supported when flipping

2018-02-15 Thread Louis-Francis Ratté-Boulianne
Add support for 'check_flip2' so that the present core can know why it is impossible to flip in that scenario. The core can then let know the client that the buffer format/modifier is suboptimal. v2: No longer need to implement 'check_flip' Signed-off-by: Louis-Francis Ratté-Boulianne &l

[RFC xserver v6 03/14] dri3: Add multi-planar/modifier buffer requests

2018-02-15 Thread Louis-Francis Ratté-Boulianne
Add screen/drawable modifier sets v4: Free array returned by 'get_drawable_modifiers()' v5: Fix FD leak v6: Fix FD leak on error Add some checks Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> ---

[RFC xserver v6 11/14] glamor: Implement PixmapFromBuffers and BuffersFromPixmap

2018-02-15 Thread Louis-Francis Ratté-Boulianne
It relies on GBM >= 17.1.0 where we can import BO with multiple planes and a format modifier (GBM_BO_IMPORT_FD_MODIFIER). v2: Properly free fds in Xwayland Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --

[RFC xserver v6 09/14] modesetting: Create scanout buffers using supported modifiers

2018-02-15 Thread Louis-Francis Ratté-Boulianne
Use most optimal buffer format (e.g. tiled/compressed) available for scanout. v2: Don't use multi-plane modifier to create scanout buffer v3: Add flag to retrieve modifiers set from enabled CRTCs only v4: Fix uses when GBM/EGL driver doesn't support modifiers Signed-off-by: Louis-Francis Ratté

[RFC xserver v6 06/14] modesetting: Add support for multi-plane pixmaps when page-flipping

2018-02-15 Thread Louis-Francis Ratté-Boulianne
This allows the uses of CCS compressed or tiled pixmaps as BOs when page-flipping. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 49

[RFC xserver v6 07/14] modesetting: Use atomic modesetting to configure output/CRTCs

2018-02-15 Thread Louis-Francis Ratté-Boulianne
ish properties fetcher/helper Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 264 +++ hw/xfree86/drivers/modesetting/drmmode_display.h | 32

[RFC xserver v6 04/14] present: Send PresentCompleteModeSuboptimalCopy appropriately

2018-02-15 Thread Louis-Francis Ratté-Boulianne
and check driver version before using 'check_flip2'. v3: Only require one of 'check_flip' or 'check_flip2' to be implemented by the driver. Refactor reasons list to enum Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@coll

[RFC xserver v6 05/14] modesetting: Use atomic modesetting API for pageflip if available

2018-02-15 Thread Louis-Francis Ratté-Boulianne
with the atomic API. The helper functions to retrieve DRM properties have been borrowed from Weston. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- configure.ac | 3 + hw/xfr

[RFC xserver v6 12/14] glamor: Implement GetSupportedModifiers

2018-02-15 Thread Louis-Francis Ratté-Boulianne
and (uninitialized pointer) Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- configure.ac | 4 + glamor/glamor.c | 25 +

[RFC xserver v6 08/14] modesetting: Get supported formats/modifiers for scanout

2018-02-15 Thread Louis-Francis Ratté-Boulianne
Retrieve IN_FORMATS property from the plane. It gives the allowed formats and modifiers for BO allocation. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone <dani...@collabora.com> --- configure.ac | 4 +

[RFC presentproto v6 02/14] Add PresentCompleteModeSuboptimalCopy flag for Complete event

2018-02-15 Thread Louis-Francis Ratté-Boulianne
is to allow clients to re-fetch DRI3 format modifiers as some modifiers might allow direct scanout. v2: Add PresentOptionSuboptimal Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- presentproto.txt | 36 ++-- presenttokens.h | 13 --

[RFC dri3proto v6 01/14] Add modifier/multi-plane requests, bump to v1.1

2018-02-15 Thread Louis-Francis Ratté-Boulianne
DRI3 version 1.1 adds support for explicit format modifiers, including multi-planar buffers. Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 2 +- dri3pro

Re: [RFC xserver v3 00/11] DRI3 v1.2: DMA fences

2017-11-09 Thread Louis-Francis Ratté-Boulianne
ent, > and > hand it off to the driver thread to be signaled once previous GL > commands have completed. > > Cheers, > Nicolai > > > On 06.11.2017 22:42, Louis-Francis Ratté-Boulianne wrote: > > Hello, > > > > This patchset implements of what we

Re: [RFC xserver v5 07/14] modesetting: Use atomic modesetting to configure output/CRTCs

2017-11-07 Thread Louis-Francis Ratté-Boulianne
Hi, On Tue, 2017-11-07 at 09:54 -0500, Adam Jackson wrote: > On Mon, 2017-11-06 at 16:30 -0500, Louis-Francis Ratté-Boulianne > wrote: > This conflicts with the changes added in: > > commit f44935cdb7321af242ce9f242975f096807b97f7 > Author: Daniel Martin <consume.no...@gma

[RFC xserver v3 06/11] glamor: Initialize DMA sync fences

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Enable support for DMA fences in Glamor backend. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- glamor/glamor_sync.c | 4 1 file changed, 4 insertions(+) diff --git a/glamor/glamor_sync.c b/glamor/glamor_sync.c index 71835fcc4..a812d9219 100644 --- a/

[RFC xserver v3 07/11] present: Allow present implementations to wait on fences

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Instead of relying on the present module to wait on in-fences, we added some hooks to allow the drivers/hardware to do the work. Drivers need to implement can_wait_fence, wait_fence and flip_with_fence to handle it. v2: Rename hooks to can_wait_fence and wait_fence Signed-off-by: Louis-Francis

[RFC xserver v3 11/11] modesetting: Add implementation for out-fences

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Create out-fence using eglCreateSyncKHR or OUT_FENCE_PTR DRM property when page-flipping. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- glamor/glamor.c | 9 ++ glamor/glamor.h | 2 ++

[RFC xserver v3 03/11] sync: Move fence destroy call to object specific function

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Needed so multiple types of sync fences can exist (SHM and DMA). v2: Remove unused miSyncGetFenceType Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- miext/sync/misync.c| 25 - miext/sync/misync.h| 10 +- miext/sync/misyncshm.

[RFC xserver v3 00/11] DRI3 v1.2: DMA fences

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Hello, This patchset implements of what we would like to see become DRI3 v1.2, that is the implementation of DMA fences. For some context, please see previous submissions: https://lists.x.org/archives/xorg-devel/2017-August/054439.html

[RFC xserver v3 04/11] sync: Add support for DMA fences

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Functions are available to create a SyncFence from a DMA fence fd and to retrieve the file descriptor from a SyncFence. DMA fences can't be triggered/reset externally. v2: Make SetTriggered and Reset return a status and remove fence type Signed-off-by: Louis-Francis Ratté-Boulianne &l

[RFC xserver v5 13/14] glamor: Use gbm_bo_create_with_modifiers for internal pixmap allocation

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Using modifier might allow the driver to use a more optimal format (e.g. tiled/compressed). Let's try to use those if possible. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- glamor/glamor_egl.c | 44 ++- hw/xw

[RFC dri3proto v3 01/11] Add DMA fences requests, bump to v1.2

2017-11-06 Thread Louis-Francis Ratté-Boulianne
DRI3 version 1.2 adds support for creating DMA fences and retrieving the file descriptor backing one. Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 2 +- dri3pr

[RFC xserver v3 08/11] present: Add hooks for the drivers to create out-fences

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Drivers need to implement flip_with_fence and flush_with_fence to create out-fences. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac| 2 +- include/protocol-versions.h | 2 +- present/meson.build | 2 +- present/pre

[RFC xserver v3 10/11] modesetting: Add implementation for in-fences

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Allow the modesetting present implementation to wait on in-fences using ANDROID_native_fence_sync if the fence was created with DRI3 FenceFromDMAFenceFD. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 1 +

[RFC xserver v5 03/14] dri3: Add multi-planar/modifier buffer requests

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Add screen/drawable modifier sets v4: Free array returned by 'get_drawable_modifiers()' v5: Fix FD leak Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> fixup: add multi-planar/modifier buffer requests ---

[RFC xserver v5 04/14] present: Send PresentCompleteModeSuboptimalCopy appropriately

2017-11-06 Thread Louis-Francis Ratté-Boulianne
and check driver version before using 'check_flip2'. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac| 2 +- include/protocol-versions.h | 2 +- present/meson.build | 2 +- present/present.c

[RFC presentproto v3 02/11] Add capability and option for IdleFence

2017-11-06 Thread Louis-Francis Ratté-Boulianne
If the server has that capability, and the client is using this option, the idle fence given to PresentPixamp can be modified to point to an out-fence created by the driver. Bump version to 1.2. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac

[RFC xserver v3 09/11] modesetting: Check if DMA fences are supported

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Modesetting/glamor can handle DMA fences if extensions EGL_KHR_wait_sync and EGL_ANDROID_native_fence_sync are available and if IN_FENCE_FD and OUT_FENCE_PTR DRM properties are implemented. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- glamor/gl

[RFC xserver v3 05/11] dri3: Add DMA fences requests

2017-11-06 Thread Louis-Francis Ratté-Boulianne
. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- dri3/dri3_request.c | 94 + include/protocol-versions.h | 2 +- 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c

[RFC xserver v5 07/14] modesetting: Use atomic modesetting to configure output/CRTCs

2017-11-06 Thread Louis-Francis Ratté-Boulianne
To make sure we also use the same primary plane and to avoid mixing uses of two APIs, it is better to always use the atomic modesetting API when possible. v2: Don't use mode_output->connector_id Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/mo

[RFC xserver v5 09/14] modesetting: Create scanout buffers using supported modifiers

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Use most optimal buffer format (e.g. tiled/compressed) available for scanout. v2: Don't use multi-plane modifier to create scanout buffer v3: Add flag to retrieve modifiers set from enabled CRTCs only v4: Fix uses when GBM/EGL driver doesn't support modifiers Signed-off-by: Louis-Francis Ratté

[RFC dri3proto v5 01/14] Add modifier/multi-plane requests, bump to v1.1

2017-11-06 Thread Louis-Francis Ratté-Boulianne
DRI3 version 1.1 adds support for explicit format modifiers, including multi-planar buffers. Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 2 +- dri3pro

[RFC xserver v5 11/14] glamor: Implement PixmapFromBuffers and BuffersFromPixmap

2017-11-06 Thread Louis-Francis Ratté-Boulianne
It relies on GBM >= 17.1.0 where we can import BO with multiple planes and a format modifier (GBM_BO_IMPORT_FD_MODIFIER). Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 4 + glamor/glamor.c | 34 --- glamor

[RFC xserver v5 00/14] DRI3 v1.1: modifiers and multi-plane

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Hello, This is the RFC v5 for DRI3 v1.1 (X11 modifiers and multi-plane). For context, please check previous submissions: https://lists.x.org/archives/xorg-devel/2017-June/053854.html https://lists.x.org/archives/xorg-devel/2017-August/054436.html

[RFC xserver v5 10/14] modesetting: Check if buffer format is supported when flipping

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Add support for 'check_flip2' so that the present core can know why it is impossible to flip in that scenario. The core can then let know the client that the buffer format/modifier is suboptimal. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modes

[RFC presentproto v5 02/14] Add PresentCompleteModeSuboptimalCopy flag for Complete event

2017-11-06 Thread Louis-Francis Ratté-Boulianne
is to allow clients to re-fetch DRI3 format modifiers as some modifiers might allow direct scanout. v2: Add PresentOptionSuboptimal Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- presentproto.txt | 36 ++-- presenttokens.h | 13 --

[RFC xserver v5 14/14] dri3: Enable DRI3 version 1.1

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Enable DRI3 v1.1 now that all functions have been implemented and that there is at least one backend implementing the driver hooks (modesetting/glamor). Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- include/protocol-versions.h | 2 +- 1 file changed, 1 insertion

[RFC xserver v5 12/14] glamor: Implement GetSupportedModifiers

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Implement function added in DRI3 v1.1. A newest version of libepoxy (>= 1.4.4) is required as earlier versions use a problematic version of Khronos EXT_image_dma_buf_import_modifiers spec. v4: Only send scanout-supported modifiers if flipping is possible Signed-off-by: Louis-Francis Ra

[RFC xserver v5 06/14] modesetting: Add support for multi-plane pixmaps when page-flipping

2017-11-06 Thread Louis-Francis Ratté-Boulianne
This allows the uses of CCS compressed or tiled pixmaps as BOs when page-flipping. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 47 hw/xfree86/drivers/modesetting/drmmode_display.h | 4

[RFC xserver v5 08/14] modesetting: Get supported formats/modifiers for scanout

2017-11-06 Thread Louis-Francis Ratté-Boulianne
Retrieve IN_FORMATS property from the plane. It gives the allowed formats and modifiers for BO allocation. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 4 + hw/xfree86/drivers/modesetting/drmmode_display.c

[RFC xserver v5 05/14] modesetting: Use atomic modesetting API for pageflip if available

2017-11-06 Thread Louis-Francis Ratté-Boulianne
with the atomic API. The helper functions to retrieve DRM properties have been borrowed from Weston. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 3 + hw/xfree86/drivers/modesetting/driver.c | 6 + hw/x

[RFC xserver v4 12/14] glamor: Implement GetSupportedModifiers

2017-10-16 Thread Louis-Francis Ratté-Boulianne
Implement function added in DRI3 v1.1. A newest version of libepoxy (>= 1.4.4) is required as earlier versions use a problematic version of Khronos EXT_image_dma_buf_import_modifiers spec. v4: Only send scanout-supported modifiers if flipping is possible Signed-off-by: Louis-Francis Ra

[RFC xserver v4 10/14] modesetting: Check if buffer format is supported when flipping

2017-10-16 Thread Louis-Francis Ratté-Boulianne
Add support for 'check_flip2' so that the present core can know why it is impossible to flip in that scenario. The core can then let know the client that the buffer format/modifier is suboptimal. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modes

[RFC presentproto v4 02/14] Add PresentCompleteModeSuboptimalCopy flag for Complete event

2017-10-16 Thread Louis-Francis Ratté-Boulianne
If the Complete event has this mode, the client is not using the more optimal format/modifier for the buffer allocation. Its main usage as of now is to allow clients to re-fetch DRI3 format modifiers as some modifiers might allow direct scanout. Signed-off-by: Louis-Francis Ratté-Boulianne &l

[RFC xserver v4 11/14] glamor: Implement PixmapFromBuffers and BuffersFromPixmap

2017-10-16 Thread Louis-Francis Ratté-Boulianne
It relies on GBM >= 17.1.0 where we can import BO with multiple planes and a format modifier (GBM_BO_IMPORT_FD_MODIFIER). Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 4 + glamor/glamor.c | 34 --- glamor

[RFC xserver v4 04/14] present: Send PresentCompleteModeSuboptimalCopy appropriately

2017-10-16 Thread Louis-Francis Ratté-Boulianne
for format renegotiation Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> squash: present send a PresentWindowCrtc --- configure.ac| 2 +- include/protocol-versions.h | 2 +- present/meson.build | 2 +- present/present.c

[RFC xserver v4 13/14] glamor: Use gbm_bo_create_with_modifiers for internal pixmap allocation

2017-10-16 Thread Louis-Francis Ratté-Boulianne
Using modifier might allow the driver to use a more optimal format (e.g. tiled/compressed). Let's try to use those if possible. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- glamor/glamor_egl.c | 44 ++- hw/xw

Re: [RFC v2 08/12] present: Allow present implementations to wait on fences

2017-10-16 Thread Louis-Francis Ratté-Boulianne
On Fri, 2017-09-29 at 18:24 +0200, Michel Dänzer wrote: > On 27/09/17 07:19 AM, Louis-Francis Ratté-Boulianne wrote: > > Instead of relying on the present module to wait on in-fences, > > we added some hooks to allow the drivers/hardware to do the work. > > Drivers need to imp

[RFC xserver v4 09/14] modesetting: Create scanout buffers using supported modifiers

2017-10-16 Thread Louis-Francis Ratté-Boulianne
Use most optimal buffer format (e.g. tiled/compressed) available for scanout. v3: Don't use multi-plane modifier to create scanout buffer v4: Add flag to retrieve modifiers set from enabled CRTCs only Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/d

[RFC xserver v4 07/14] modesetting: Use atomic modesetting to configure output/CRTCs

2017-10-16 Thread Louis-Francis Ratté-Boulianne
To make sure we also use the same primary plane and to avoid mixing uses of two APIs, it is better to always use the atomic modesetting API when possible. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c

[RFC xserver v4 05/14] modesetting: Use atomic modesetting API for pageflip if available

2017-10-16 Thread Louis-Francis Ratté-Boulianne
with the atomic API. The helper functions to retrieve DRM properties have been borrowed from Weston. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 3 + hw/xfree86/drivers/modesetting/driver.c | 6 + hw/x

Re: [RFC xserver v3 13/14] present: Send a PresentWindowCrtcNotify event appropriately

2017-10-16 Thread Louis-Francis Ratté-Boulianne
Hi, On Fri, 2017-09-29 at 18:45 +0200, Michel Dänzer wrote: > On 27/09/17 07:19 AM, Louis-Francis Ratté-Boulianne wrote: > > When the window has changed CRTC, send the event. > > This doesn't make sense to me I'm afraid. > With the current present implementation,

[RFC xserver v4 00/14] DRI3 v1.1: modifiers and multi-plane

2017-10-16 Thread Louis-Francis Ratté-Boulianne
Hello, This is the RFC v4 for DRI3 v1.1 (X11 modifiers and multi-plane). For context, please check previous submissions: https://lists.x.org/archives/xorg-devel/2017-June/053854.html https://lists.x.org/archives/xorg-devel/2017-August/054436.html

[RFC xserver v4 03/14] dri3: Add multi-planar/modifier buffer requests

2017-10-16 Thread Louis-Francis Ratté-Boulianne
Add screen/drawable modifier sets v4: Free array returned by 'get_drawable_modifiers()' Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 2 +- dri3/dri3.c |

[RFC xserver v4 08/14] modesetting: Get supported formats/modifiers for scanout

2017-10-16 Thread Louis-Francis Ratté-Boulianne
Retrieve IN_FORMATS property from the plane. It gives the allowed formats and modifiers for BO allocation. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 4 + hw/xfree86/drivers/modesetting/drmmode_display.c

[RFC xserver v4 06/14] modesetting: Add support for multi-plane pixmaps when page-flipping

2017-10-16 Thread Louis-Francis Ratté-Boulianne
This allows the uses of CCS compressed or tiled pixmaps as BOs when page-flipping. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 46 hw/xfree86/drivers/modesetting/drmmode_display.h | 4 +

[RFC dri3proto v4 01/14] Add modifier/multi-plane requests, bump to v1.1

2017-10-16 Thread Louis-Francis Ratté-Boulianne
DRI3 version 1.1 adds support for explicit format modifiers, including multi-planar buffers. Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 2 +- dri3pro

[RFC xserver v4 14/14] dri3: Enable DRI3 version 1.1

2017-10-16 Thread Louis-Francis Ratté-Boulianne
Enable DRI3 v1.1 now that all functions have been implemented and that there is at least one backend implementing the driver hooks (modesetting/glamor). Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- include/protocol-versions.h | 2 +- 1 file changed, 1 insertion

Re: [RFC v2 07/12] present: Check the whole exec queue on event

2017-10-05 Thread Louis-Francis Ratté-Boulianne
Thanks for saving me the trouble! On Wed, 2017-10-04 at 15:25 -0400, Adam Jackson wrote: > On Fri, 2017-09-29 at 18:22 +0200, Michel Dänzer wrote: > > > This is a bug fix which is independent of the rest of the series, > > so it > > should be submitted separately and applied for an upcoming

[RFC v3 12/22] vulkan/wsi: Move linear alloc into radv

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone This is pretty much radv-specific anyway. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 49 +++-- src/intel/vulkan/anv_wsi.c | 23 -

[RFC xserver v3 07/14] modesetting: Use atomic modesetting to configure output/CRTCs

2017-09-27 Thread Louis-Francis Ratté-Boulianne
To make sure we also use the same primary plane and to avoid mixing uses of two APIs, it is better to always use the atomic modesetting API when possible. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c

[RFC v3 16/22] intel/isl: Add field for suboptimal tiling flags

2017-09-27 Thread Louis-Francis Ratté-Boulianne
The caller might want to discriminate between two possible sets of tiling flags. For example, some tiling modes might allow direct scanout, and so should be preferred even if GPU operations are a little less performant. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --

[RFC v2 10/12] modesetting: Check if DMA fences are supported

2017-09-27 Thread Louis-Francis Ratté-Boulianne
Modesetting/glamor can handle DMA fences if extensions EGL_KHR_wait_sync and EGL_ANDROID_native_fence_sync are available and if IN_FENCE_FD and OUT_FENCE_PTR DRM properties are implemented. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- glamor/gl

[RFC xserver v3 10/14] glamor: Implement PixmapFromBuffers and BuffersFromPixmap

2017-09-27 Thread Louis-Francis Ratté-Boulianne
It relies on GBM >= 17.1.0 where we can import BO with multiple planes and a format modifier (GBM_BO_IMPORT_FD_MODIFIER). Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 4 + glamor/glamor.c | 34 --- glamor

[RFC v2 12/12] modesetting: Add implementation for out-fences

2017-09-27 Thread Louis-Francis Ratté-Boulianne
Create out-fence using eglCreateSyncKHR or OUT_FENCE_PTR DRM property when page-flipping. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- glamor/glamor.c | 9 ++ glamor/glamor.h | 2 ++

[RFC v3 17/22] vulkan/wsi: Add drm_modifier member to wsi_image

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Not yet used anywhere. Signed-off-by: Daniel Stone --- src/amd/vulkan/Makefile.am | 1 + src/amd/vulkan/radv_wsi.c | 2 ++ src/intel/vulkan/anv_wsi.c | 8 src/vulkan/wsi/wsi_common.h | 1 + 4 files changed, 12

[RFC v3 08/22] vulkan/wsi: Add wsi_image_base structure

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone This is used to hold information about the allocated image, rather than an ever-growing function argument list. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 31 ++

[RFC v3 15/22] intel/isl: Add ISL tiling -> modifier conversion

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Given a tiling mode and an aux usage, return the DRM modifier. Signed-off-by: Daniel Stone --- src/intel/isl/isl.h | 6 +- src/intel/isl/isl_drm.c | 17 + 2 files changed, 22 insertions(+), 1 deletion(-)

[RFC v3 19/22] vulkan/wsi: Add modifiers to wsi_image_create

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Allow the winsys to provide a set of acceptable modifiers to the driver when creating WSI images. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 36 +--

[RFC v3 03/22] dri: Add suppressImplicitSync to DRIimageExtension

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Provide a hook to inform the driver that implicit synchronization should be suppressed. --- include/GL/internal/dri_interface.h | 10 +- src/egl/drivers/dri2/egl_dri2.c | 27 +++ 2 files changed, 36 insertions(+), 1

  1   2   >