- Nov 07, 2017
-
-
Louis-Francis Ratté-Boulianne authored
Create out-fence using eglCreateSyncKHR or OUT_FENCE_PTR DRM property when page-flipping. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
Drivers need to implement flip_with_fence and flush_with_fence to create out-fences. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 Ratté-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
Enable support for DMA fences in Glamor backend. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
Bump DRI3 version to v1.2 that adds requests: * FenceFromDMAFenceFD is used to create a sync fence from a sync file fence. * DMAFenceFDFromFence is used to retrieve the sync file fd from a fence. Drivers need to check the SyncFence type to make use of it when possible. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
Needed so multiple types of sync fences can exist (SHM and DMA). v2: Remove unused miSyncGetFenceType Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 Ratté-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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é-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
Retrieve IN_FORMATS property from the plane. It gives the allowed formats and modifiers for BO allocation. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
This allows the uses of CCS compressed or tiled pixmaps as BOs when page-flipping. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 the atomic API. The helper functions to retrieve DRM properties have been borrowed from Weston. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 and check driver version before using 'check_flip2'. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
-
Louis-Francis Ratté-Boulianne authored
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 Add screen/drawable modifier sets v4: Free array returned by 'get_drawable_modifiers()' v5: Fix FD leak Signed-off-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
-
- Nov 06, 2017
-
-
Adam Jackson authored
Your libc has ffs, I promise. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
Adam Jackson authored
This was always wide enough to work on an fd_mask ("mask" ffs presumably). We don't operate on fd_masks anymore, so this can go. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-
Giuseppe Bilotta authored
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
-
Giuseppe Bilotta authored
Running Xephyr under valgrind reveals that we're sending some uninitialized memory over the wire (particularly, the leftover padding that comes from rounding extraLen to the next 32-bit multiple). Solve by calloc()ing the memory instead of malloc()ing (the alternative would be to memset just the padding, but I'm not sure it's more convenient.) Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-
Giuseppe Bilotta authored
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-
Giuseppe Bilotta authored
This fixes some “Conditional jump depends on uninitialized value(s)” errors spotted by valgrind. Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
-
Giuseppe Bilotta authored
Reviewed-by: Adam Jackson <ajax@redhat.com>
-
- Nov 03, 2017
-
-
Thomas Hellstrom authored
Previously, before GLX_OML_swap_method was fixed, both the X server and client ignored the swapMethod fbconfig value, which meant that, if the dri driver thought it exposed more than one swapMethod, it actually just exported a duplicated set of fbconfigs. When fixing GLX_OML_swap_method and restricting the choice for built-in visuals to a single swap method that meant we didn't have that many fbconfigs to choose from when pairing the compositing visual with an fbconfig, resulting in the fbconfig paired with the compositing visual becoming too restrictive for some applications, (at least for kwin). This problem would also happen if the dri driver only exposed a single swap method to begin with. So, to make sure the compositing visual gets a good enough fbconfig, duplicate fbconfigs that are suitable for compositing visuals and make sure these duplicated fbconfigs can be used only by compositing visuals. For duplicated fbconfigs not paired with a compositing visual, construct new compositing visuals, making compositing clients able to choose visuals / fbconfig more adapted to their needs. This is in some sense equivalent to adding a new "TRUECOLOR_COMPOSITING" GLX visualtype. Fixes: 4486d199 ("glx: Fix visual fbconfig matching with respect to swap method") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102806 Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Tested-By: Nick Sarnie <commendsarnex@gmail.com> Tested-by: Fredrik Höglund <fredrik@kde.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
-
- Nov 01, 2017
-
-
Eric Anholt authored
I don't know how many times I've had a broken server due to a bad directory to xkbcomp, and only finding the whole path has shown me where I went wrong. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-
Eric Anholt authored
The failing struct comes from the python test written by Michal Srb <msrb@suse.com>. v2: Use a drawable (root window) and gc, so that PolyLines hopefully actually tries processing things. However, the request seems to process successfully so the poll() just stalls out. However, this does let us distinguish between detecting the bigrequests error and not, at least. v3: Clean up the description of what we expect the poll() call to do. v4: Use XI2 instead of PolyLine to trigger a predictable error. We know the server replies with BadValue for a zero num_masks argument. So if we send a bigreq with a num_masks 0 and a length 0, we can just check whether we get killed (good) or a BadValue (bad). It doesn't test for specific memory overflows or crashes, but based on the assumption that we shouldn't look at *any* BigReq of size 0, this seems to be sufficient. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-
- Oct 31, 2017
-
-
Peter Hutterer authored
Historically we didn't need to care about this case but more devices are having invalid types set and they cannot be unset with a hwdb entry (which doesn't handle the empty string). Allow for "0" to mean "unset" because anything else would be crazy anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-
- Oct 30, 2017
-
-
Daniel Martin authored
Roundhouse kick replacing the various (sizeof(foo)/sizeof(foo[0])) with the ARRAY_SIZE macro from dix.h when possible. A semantic patch for coccinelle has been used first. Additionally, a few macros have been inlined as they had only one or two users. Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-
Daniel Martin authored
unsigned_tests[] was used to compute the amount of signed numbers to test. Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-
Daniel Martin authored
input.c: In function ‘dix_event_to_core’: ../include/inputstr.h:61:55: warning: ‘*((void *)&ev+80)’ is used uninitialized in this function [-Wuninitialized] #define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7))) ^~ Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-
Daniel Martin authored
If one misconfigures a ZaphodHeads value (more than 20 characters without a delimiter), we get an overflow of our buffer. Use xstrtokenize() instead of writing/fixing our own tokenizer. Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-
Adam Jackson authored
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
-
Adam Jackson authored
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
-
Adam Jackson authored
Effectively always true anyway. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
-
- Oct 27, 2017
-
-
Alex Goins authored
Change 677c32bc refactored all usages of drmWaitVBlank() into a helper function, ms_queue_vblank(). ms_queue_vblank() takes in an MS_QUEUE_RELATIVE flag to indicate that the sequence number is relative rather than absolute, but still treats the actual sequence number as absolute, passing it through ms_crtc_msc_to_kernel_msc() unconditionally before calling drmWaitVBlank(). ms_crtc_msc_to_kernel_msc() works by subtracting a vblank offset from the provided sequence number, which only makes sense for absolute sequence numbers. In the case of PRIME Sync, drmmode_SharedPixmapPrsentOnVBlank() passes in 1, which results in a large negative vblank offset. After subtracting, we're left with a relative sequence number of 100,000+, i.e. wait for 100,000+ vblanks... In the relative case we want to pass in the sequence number unmodified. Simply add a check to do this. Signed-off-by: Alex Goins <agoins@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
-