[RFC v2 01/13] Build: Use dri3proto CFLAGS

2017-07-14 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Make sure we get the CFLAGS required for building dri3proto into the command line. Signed-off-by: Daniel Stone --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index

[RFC v2 13/13] modesetting: Create scanout buffers using supported modifiers

2017-07-14 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- glamor/glamor.h | 7 ++ glamor/glamor_egl.c | 2 +- hw/xfree86/drivers/modesetting/drmmode_display.c | 111 --- 3 files change

[RFC v2 12/13] modesetting: Get supported formats/modifiers for scanout

2017-07-14 Thread Louis-Francis Ratté-Boulianne
Retrieve IN_FORMATS property Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 5 + hw/xfree86/drivers/modesetting/drmmode_display.c | 115 ++- hw/xfree86/drivers/modesetting/drmmode_display.h

[RFC v2 11/13] modesetting: Use atomic modesetting to configure output/CRTCs

2017-07-14 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 395 +-- hw/xfree86/drivers/modesetting/drmmode_display.h | 29 +- hw/xfree86/drivers/modesetting/pageflip.c| 3 +- 3 files change

[RFC v2 03/13] glamor: Implement PixmapFromBuffers and BuffersFromPixmap

2017-07-14 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- glamor/glamor.c | 93 ++-- glamor/glamor.h | 64 ++- glamor/glamor_egl.c | 146 + glamor/glamor_egl.h | 84 ++

[RFC v2 09/13] modesetting: Ignore CRTC_ID property in RandR properties

2017-07-14 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c

[RFC v2 04/13] glamor: Implement GetSupportedFormats and GetSupportedModifiers

2017-07-14 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- dri3/dri3.c | 92 dri3/dri3.h | 12 + glamor/glamor.h | 10 glamor/glamor_egl.c | 69 ++

[RFC v2 10/13] modesetting: Add support for multi-plane pixmaps when page-flipping

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

[RFC v2 02/13] dri3: Add multi-planar/modifier buffer requests

2017-07-14 Thread Louis-Francis Ratté-Boulianne
Initial implementation for DRI3 v1.1. Only the DRI3 implementation is there, backends need to implement the proper hooks. Version is still set to 1.0 so clients shouldn't use the new requests yet. Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulia

[RFC v2 05/13] dri3: Enable DRI3 version 1.1

2017-07-14 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- include/protocol-versions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/protocol-versions.h b/include/protocol-versions.h index b4498927b..27cb10c74 100644 --- a/include/protocol-versions.h

[RFC v2 08/13] modesetting: Use atomic modesetting API for pageflip if available

2017-07-14 Thread Louis-Francis Ratté-Boulianne
with the atomic API. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 3 + hw/xfree86/drivers/modesetting/driver.c | 6 + hw/xfree86/drivers/modesetting/driver.h | 1 + hw/xfree86/drivers/modes

[RFC v2 00/13] DRI3 v1.1: modifiers and multi-plane

2017-07-14 Thread Louis-Francis Ratté-Boulianne
. There are still some FIXME and questions in there. Any opinion about those is welcome. Daniel Stone (1): Build: Use dri3proto CFLAGS Louis-Francis Ratté-Boulianne (12): dri3: Add multi-planar/modifier buffer requests glamor: Implement PixmapFromBuffers and BuffersFromPixmap glamor

[RFC v2 07/13] modesetting: Add helper functions to retrieve DRM properties

2017-07-14 Thread Louis-Francis Ratté-Boulianne
These functions have been borrowed from Weston and will be used in following patches. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 171 +++ hw/xfree86/drivers/modesetting/drmmode_display.h | 13

[RFC v2 06/13] glamor: Use gbm_bo_create_with_modifiers for internal pixmap allocation

2017-07-14 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac | 4 +++ glamor/glamor_egl.c | 73 +-- hw/xwayland/xwayland-glamor.c | 22 +++-- include/dix-config.h.in | 3 ++ 4 files c

Re: [RFC dri3proto v2 1/10] Add modifier/multi-plane requests, bump to v1.1

2017-09-20 Thread Louis-Francis Ratté-Boulianne
Hi, On Wednesday, August 30, 2017 02:26 EDT, Michel Dänzer wrote: > It doesn't seem to get assigned by the xserver code either. A leftover? > (I just happened to notice this, there might be other similar issues) It was indeed a leftover, it is now fixed in the repository.

Re: [RFC xserver 06/12] present: Check the whole exec queue on event

2017-09-20 Thread Louis-Francis Ratté-Boulianne
Hi, On Wednesday, August 30, 2017 03:19 EDT, Michel Dänzer <mic...@daenzer.net> wrote: > On 30/08/17 02:16 PM, Louis-Francis Ratté-Boulianne wrote: > > Later events are sometimes added in front of the queue (e.g. > > if page flipping fails) so we need to check the who

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

[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 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 xserver 02/12] sync: Move fence destroy call to object specific function

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

[RFC xserver v2 07/10] modesetting: Add support for multi-plane pixmaps when page-flipping

2017-08-30 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 xserver 03/12] sync: Add support for DMA fences

2017-08-30 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. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- Xext/sync.c| 34 +++- Xext/syn

[RFC xserver v2 10/10] modesetting: Create scanout buffers using supported modifiers

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Use most optimal buffer format (e.g. tiled/compressed) available for scanout. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 56 1 file changed, 56 insertions(+) diff --git a/hw/xfree86/d

[RFC xserver v2 08/10] modesetting: Use atomic modesetting to configure output/CRTCs

2017-08-30 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 10/12] modesetting: Add implementation for in-fences

2017-08-30 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 v2 06/10] modesetting: Use atomic modesetting API for pageflip if available

2017-08-30 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 12/12] dri3: Enable DRI3 version 1.1

2017-08-30 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 v2 09/10] modesetting: Get supported formats/modifiers for scanout

2017-08-30 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 presentproto 1/1] Add capability and option for IdleFence

2017-08-30 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. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- presenttokens.h | 8 ++-- 1 file chan

[RFC 00/12] DRI3 v1.1: DMA fences

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Hi, This patchset implements the second part of what we would like to see become DRI3 v1.1, that is the implementation of DMA fences. For some context, please see initial submission for DRI3 v1.1 work: https://lists.x.org/archives/xorg-devel/2017-June/053854.html This also implements some use

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

2017-08-30 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> --- present/present.c | 34 ++ present/present.h | 8 present/present_priv.h

[RFC xserver 05/12] glamor: Initialize DMA sync fences

2017-08-30 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 907e0c613..58a0a36d5 100644 --- a/

[RFC xserver v2 02/10] dri3: Add multi-planar/modifier buffer requests

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Initial implementation for DRI3 v1.1. Only the DRI3 implementation is there, backends need to implement the proper hooks. Version is still set to 1.0 so clients shouldn't use the new requests yet. Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulia

[RFC dri3proto v2 1/10] Add modifier/multi-plane requests, bump to v1.1

2017-08-30 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone <dani...@collabora.com> 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> --- d

[RFC xserver v2 04/10] glamor: Implement GetSupportedModifiers

2017-08-30 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. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- configure.ac

[RFC xserver v2 05/10] glamor: Use gbm_bo_create_with_modifiers for internal pixmap allocation

2017-08-30 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 | 27 ++- hw/xwayland/xwayland-glamor.

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

2017-08-30 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, wait and flip_with_fence to handle it. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- present/pre

[RFC xserver v2 03/10] glamor: Implement PixmapFromBuffers and BuffersFromPixmap

2017-08-30 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 06/12] present: Check the whole exec queue on event

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Later events are sometimes added in front of the queue (e.g. if page flipping fails) so we need to check the whole queue on event. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- present/present.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/present/prese

[RFC xserver 04/12] dri3: Implement FenceFromDMAFenceFD and DMAFenceFDFromFence

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- dri3/dri3_request.c | 58 +++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c index f111dc46b..4192b3521

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

2017-08-30 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 v2 00/10] DRI3 v1.1: modifiers and multi-plane

2017-08-30 Thread Louis-Francis Ratté-Boulianne
Hi, This is the RFC v2 for DRI3 v1.1 (minus the DMA fence part of it). For context, please see: https://lists.x.org/archives/xorg-devel/2017-June/053854.html The main changes apart from bug fixes and cleanup are: - DRI3 advertised version is not bumped in this serie. It will wait for all

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

2017-08-30 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

Re: [RFC dri3proto v2 1/10] Add modifier/multi-plane requests, bump to v1.1

2017-08-31 Thread Louis-Francis Ratté-Boulianne
Hi, On Wednesday, August 30, 2017 02:26 EDT, Michel Dänzer <mic...@daenzer.net> wrote: > On 30/08/17 01:45 PM, Louis-Francis Ratté-Boulianne wrote: > > From: Daniel Stone <dani...@collabora.com> > > > > DRI3 version 1.1 adds support for explicit format modi

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

2017-09-27 Thread Louis-Francis Ratté-Boulianne
Initial implementation for DRI3 v1.1. Only the DRI3 implementation is there, backends need to implement the proper hooks. Version is still set to 1.0 so clients shouldn't use the new requests yet. Signed-off-by: Daniel Stone <dani...@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulia

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

2017-09-27 Thread Louis-Francis Ratté-Boulianne
Use most optimal buffer format (e.g. tiled/compressed) available for scanout. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 69 1 file changed, 69 insertions(+) diff --git a/hw/xfree86/d

[RFC v2 05/12] dri3: Add DMA fences requests

2017-09-27 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 v3 10/22] vulkan/wsi: Add multiple planes to wsi_image_base

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Not currently used. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 13 +++-- src/intel/vulkan/anv_wsi.c | 9 + src/vulkan/wsi/wsi_common.h | 9 +

[RFC v3 04/22] i965: Implement EGL_EXT_image_implicit_sync_control

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone --- src/mesa/drivers/dri/i965/brw_bufmgr.h | 3 +++ src/mesa/drivers/dri/i965/intel_screen.c | 16 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h

[RFC xserver v3 04/14] modesetting: Refactor xf86FindCrtcCoveringDrawable out of the driver

2017-09-27 Thread Louis-Francis Ratté-Boulianne
The functions will be needed outside of the driver. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- hw/xfree86/drivers/modesetting/dri2.c| 8 +- hw/xfree86/drivers/modesetting/driver.h | 4 - hw/xfree86/drivers/modesetting/drmmode_display.c

[RFC xserver v3 11/14] glamor: Implement GetSupportedModifiers

2017-09-27 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. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- con

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

2017-09-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> --- include/protocol-versions.h | 2 +- 1 file changed, 1 insertion

[RFC v2 03/12] sync: Move fence destroy call to object specific function

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

[RFC v3 05/22] dri: Add createImageWithModifiers2 to DRIimageExtension

2017-09-27 Thread Louis-Francis Ratté-Boulianne
It does the same as createImagewithModifiers but allow multiple modifiers set to be given. The modifier used to create the image should be selected from the first tranche if possible. If not, then the subsequent tranches should be used. Signed-off-by: Louis-Francis Ratté-Boulianne &l

[RFC v3 00/22] DRI3 v1.1, ANV dmabuf

2017-09-27 Thread Louis-Francis Ratté-Boulianne
Hi, With full support for modifiers in DRIimage, this patch series adds support for fully plumbing them through X11. This is the third revision, more context can be found here: https://lists.freedesktop.org/archives/mesa-dev/2017-June/158457.html

[RFC v3 09/22] vulkan/wsi: Rename needs_linear_copy to should_export

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone The only use for this boolean was to decide whether or not it should export a dmabuf FD. Simplify things a bit by giving that directly. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 6 --

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

2017-09-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.h | 86 - dri3pro

[RFC v3 06/22] RFC: egl/x11: Support DRI3 v1.1

2017-09-27 Thread Louis-Francis Ratté-Boulianne
Add support for DRI3 v1.1, which allows pixmaps to be backed by multi-planar buffers, or those with format modifiers. This is both for allocating render buffers, as well as EGLImage imports from a native pixmap (EGL_NATIVE_PIXMAP_KHR). Signed-off-by: Louis-Francis Ratté-Boulianne &l

[RFC v3 21/22] RFC: vulkan/wsi: Add support for DRI3 v1.1

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Adds support for multiple planes and buffer modifiers. --- src/vulkan/wsi/wsi_common_x11.c | 178 1 file changed, 160 insertions(+), 18 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_x11.c

[RFC v3 18/22] vulkan/wsi: Rename needs_linear_copy to different_gpu

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone That's what it actually means; the fact it generally means a linear copy is requires is incidental. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 10 +- src/intel/vulkan/anv_wsi.c | 2 +-

[RFC v3 11/22] radv/wsi: Move image allocation into helper function

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Create a new helper function which handles the actual image/memory allocations for a swapchain image, removing the bulk of radv_wsi_image_create. This will make it easier to move linear handling into radv in the next patch. Signed-off-by: Daniel Stone

[RFC v3 07/22] egl/x11: Reallocate buffer when the window moves to a different CRTC

2017-09-27 Thread Louis-Francis Ratté-Boulianne
The optimal modifier depends on the current CRTC as some modifiers might not allow direct scanout. When the window is moved to a different CRTC, available modifiers should be re-fetched and the buffers re-allocated. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- src/

[RFC v3 14/22] anv/wsi: Small code motion to prepare for modifiers

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Signed-off-by: Daniel Stone --- src/intel/vulkan/anv_wsi.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index f59d349b50..d8ffdfbab2

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

2017-09-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> --- configure.ac | 4 + hw/xfree86/drivers/modesetting/drmmode_display.c

[RFC v2 06/12] glamor: Initialize DMA sync fences

2017-09-27 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 907e0c613..58a0a36d5 100644 --- a/

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

2017-09-27 Thread Louis-Francis Ratté-Boulianne
Hello, This is the RFC v3 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 The main changes in this iteration are: -

[RFC presentproto v3 02/14] Add PresentWindowCrtcNotify event

2017-09-27 Thread Louis-Francis Ratté-Boulianne
Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- presentproto.h | 16 presenttokens.h | 5 - 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/presentproto.h b/presentproto.h index 08ddc05..c59f2c0 100644 --- a/presentproto.h

[RFC xserver v3 12/14] glamor: Use gbm_bo_create_with_modifiers for internal pixmap allocation

2017-09-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. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- glamor/glamor_egl.c | 44 ++- hw/xw

[RFC v3 01/22] i965: Only set planar_format if it's actually one

2017-09-27 Thread Louis-Francis Ratté-Boulianne
The planar_format image property was always set even for non-planar formats. This was breaking CCS support as intel_from_planar is now making sure we can't have both a modifier and an planar format. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> Reviewed-by: Daniel Stone

[PATCH xserver] sync: Fix delta value check

2017-09-27 Thread Louis-Francis Ratté-Boulianne
While transitionning from CARD64 to int64, the GreaterThan call as mistakenly been transformed into ">=". That was at least causing problems with Mutter. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- Xext/sync.c | 2 +- 1 file changed, 1 insertion(+),

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

2017-09-27 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> --- dri3proto.h | 45 -- d

[RFC v2 09/12] present: Add hooks for the drivers to create out-fences

2017-09-27 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> --- present/present.c | 68 +++ present/present.h | 8 ++ present/present_

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

2017-09-27 Thread Louis-Francis Ratté-Boulianne
When the window has changed CRTC, send the event. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- present/present.c | 5 + present/present_event.c | 35 +++ present/present_priv.h | 3 +++ 3 files changed, 43 insertions(+)

[RFC v2 00/12] DRI3 v1.2: DMA fences

2017-09-27 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 submission: https://lists.x.org/archives/xorg-devel/2017-August/054439.html The main changes in this iteration are: - The DMA fences

[RFC v2 04/12] sync: Add support for DMA fences

2017-09-27 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. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- Xext/sync.c| 34 +++- Xext/syn

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

2017-09-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> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 46 hw/xfree86/drivers/modesetting/drmmode_display.h | 4 +

[RFC v3 22/22] vulkan/wsi: Return VK_SUBOPTIMAL_KHR when X11 window is moved

2017-09-27 Thread Louis-Francis Ratté-Boulianne
optimal modifiers instead of just assuming they have changed. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- src/vulkan/wsi/wsi_common_x11.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_x

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

2017-09-27 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, wait and flip_with_fence to handle it. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- present/pre

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

2017-09-27 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 v3 02/22] egl: Add EGL_EXT_image_implicit_sync_control

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone Signed-off-by: Daniel Stone --- src/egl/main/eglapi.c | 1 + src/egl/main/egldisplay.h | 1 + src/egl/main/eglimage.c | 26 ++ src/egl/main/eglimage.h | 3 +++ 4 files changed, 31 insertions(+)

[RFC presentproto v2 02/12] Add capability and option for IdleFence

2017-09-27 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. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- presenttokens.h | 8 ++-- 1 file chan

[RFC v3 13/22] radv/wsi: Use image_free for alloc cleanup

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone If we fail in the alloc, just use the (mostly) identical radv_wsi_image_free() to clean up after us. Signed-off-by: Daniel Stone --- src/amd/vulkan/radv_wsi.c | 39 --- 1 file changed, 16

[RFC v3 20/22] vulkan/wsi/wayland: Add support for zwp_dmabuf

2017-09-27 Thread Louis-Francis Ratté-Boulianne
From: Daniel Stone zwp_linux_dmabuf_v1 lets us use multi-planar images and buffer modifiers. Signed-off-by: Daniel Stone --- src/vulkan/Makefile.am | 10 +++ src/vulkan/Makefile.sources | 4 +-

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

2017-09-27 Thread Louis-Francis Ratté-Boulianne
Later events are sometimes added in front of the queue (e.g. if page flipping fails) so we need to check the whole queue on event. Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com> --- present/present.c | 4 1 file changed, 4 deletions(-) diff --git a/present/prese

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

2017-09-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> --- configure.ac | 3 + hw/xfree86/drivers/modesetting/driver.c | 6 + hw/x

  1   2   >