[PATCH xserver] os: avoid uninitialized offsets in backtrace

2018-02-15 Thread Jeff Smith
When xorg_backtrace calls unw_get_proc_name and an error occurs, offset might not be set for the current frame. Initialize offset for each frame so that the offset from another frame cannot be used inadvertently. Signed-off-by: Jeff Smith --- os/backtrace.c | 1 + 1 file

[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 Reviewed-by: Daniel Stone ---

[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 Reviewed-by: Daniel Stone ---

[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

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

2018-02-15 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. v2: Use depth/bpp instead of DRM formats in requests v3: Remove DMA fence requests from v1.1

[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 Reviewed-by: Daniel Stone --- configure.ac

[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

[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 Reviewed-by: Daniel Stone --- 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
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 v3: Only use the new properties cache for atomic modesetting as to not conflict with the newish

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

2018-02-15 Thread Louis-Francis Ratté-Boulianne
Add 'check_flip2' hook for driver to let know the core about why flipping is not possible ('reason'). If it is because of unsupported buffer format/modifier, a PresentCompleteNotify event is sent to the client with the PresentCompleteModeSuboptimalCopy mode. v2: Check for PresentOptionSuboptimal

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

2018-02-15 Thread Louis-Francis Ratté-Boulianne
In order to flip between compressed and uncompressed buffers - something drmModePageFlip explicitly bans us from doing - we need to port use the atomic modesetting API. It's only 'fake' atomic though given we still commit for each CRTC separately and CRTC and connector properties are not set with

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

2018-02-15 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 v5: Fix memory corruption in XWayland

[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 Reviewed-by: Daniel Stone --- configure.ac | 4 +

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

2018-02-15 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. The client must explicitely inform the server that it understands this mode by adding the PresentOptionSuboptimal flag when calling PresentPixmap. Its main usage as of now is

[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 Signed-off-by: Louis-Francis Ratté-Boulianne --- configure.ac | 2 +- dri3proto.h | 86 -

Re: [PULL] branch for 1.19.7

2018-02-15 Thread Timo Aaltonen
On 14.02.2018 18:54, Adam Jackson wrote: > On Tue, 2018-02-13 at 23:53 +0200, Timo Aaltonen wrote: >> Adam Jackson kirjoitti 13.02.2018 klo 22:55: >>> On Tue, 2018-02-13 at 17:44 +0200, Timo Aaltonen wrote: xfree86: Add options support for OutputClass Options >>> >>> This one,

[PATCH xserver] modesetting: Do not close uninitialized dri2 screen

2018-02-15 Thread Jeff Smith
If a dri2 screen is not successfully initialized, attempting to close it results in a null dereference. Maintain a flag indicating whether the dri2 screen was successfully initialized, and check it before attempting to close the dri2 screen. https://bugzilla.redhat.com/show_bug.cgi?id=1485811