Commit Graph

8 Commits

Author SHA1 Message Date
Michel Dänzer 0ce93e5ba7 dri3: Include dix-config.h instead of xorg-config.h
This is DIX code.
2020-09-15 11:38:55 +02:00
Eric Anholt ef95331603 dri3: Switch fds_from_pixmap to stdint types.
Again, this was causing 32-bit build warnings due to mixing CARD* and
stdint.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-05-08 11:59:41 -04:00
Emil Velikov 9a159f37e0 dri3: annotate fds/strides/offsets arrays as const
It makes it perfectly clear that we should not be modifying them.
Should help highlight issues like the one fixed with previous commit.

Fixes: cef12efc15 ("glamor: Implement GetSupportedModifiers")
Cc: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Cc: Daniel Stone <daniels@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-04-10 15:42:40 -04:00
Emil Velikov 66b632bb06 dri3: annotate the dri3_screen_info data as const
dri3_screen_info is the user provide dispatch. Something that we do
not and should not change.

When using the _ptr typecast + const the compiler barfs at us
(rightfully so), so use the _rec one.

[Silence a new const mismatch warning too - ajax]

Fixes: 5631382988 ("dri3: Add DRI3 extension")
Cc: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-04-10 15:42:23 -04:00
Daniel Stone 75bba3aedc dri3: Use single-FD screen call for single-FD request
When importing client buffers into Pixmaps, we can use the fds_to_pixmap
hook for both single-FD and multi-FD client requests without any harm.

For the other direction of exporting Pixmap buffers to client FDs,
create a new helper which calls the old pixmap_to_fd hook if available.
This allows the implementation to ensure that the Pixmap storage is
accessible to clients not aware of multiple planes or modifiers, e.g. by
reallocating and copying.

This makes it possible to run a compositing manager on an old GLX/EGL
stack on top of an X server which allocates internal buffer storage
using exotic modifiers from modifier-aware GBM/EGL/KMS.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reported-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-04-04 13:46:57 -04:00
Louis-Francis Ratté-Boulianne 6e7c40f62d dri3: Add multi-planar/modifier buffer requests
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>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-03-05 13:27:20 -05:00
Adam Jackson c4a0d6c913 dri3: static cleanup
Also remove unused window private key.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:57 -04:00
Keith Packard 5631382988 dri3: Add DRI3 extension
Adds DRM compatible fences using futexes.
Uses FD passing to get pixmaps from DRM applications.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31 16:58:30 -07:00