Commit Graph

23 Commits

Author SHA1 Message Date
Pekka Paalanen ecbdcfd373 Rename zalloc.h to libweston/zalloc.h
It is a public installed header used by libweston.h.

See "Rename compositor.h to libweston/libweston.h" for rationale.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-04-18 12:31:46 +03:00
ant8me f99fac22ab clients: use xdg_shell stable instead of v6
Now that Weston supports the stable revision, use it. Better to excercise the
current rather than outdated protocol.

Pekka:
- split the patch, rewrote commit message
- rename xdg_shell_ping to xdg_wm_base_ping
- rename xdg_shell_listener to wm_base_listener
- rename shell to wm_base
- fix continued line alignment
- drop unrelated change of adding parentheses around bit-wise and

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-02-15 11:18:38 +00:00
orbitcowboy 1f3fae2f1a Fixed potential memory leaks in simple-dmabuf-drm.c found by Cppcheck. 2018-11-02 13:34:35 +00:00
Emilio Pozuelo Monfort cce820dcaf simple-dmabuf-drm: fix build with --disable-egl
Just rely on getting the supported formats through the dmabuf
extension.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-07-13 16:13:32 +01:00
Emilio Pozuelo Monfort 1166f8e9a1 simple-dmabuf-drm: require zwp_linux_dmabuf_v1 v3
We effectively require it as we don't react to dmabuf_format,
only to dmabuf_modifiers, so there's a chance we may not get
the supported formats information at all.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-07-13 16:13:23 +01:00
Daniel Stone 3a80ca0629 simple-dmabuf-drm: Fallback DRM_FORMAT_MOD_LINEAR definition
Just in case we're running on something quite old.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2018-06-07 08:55:39 +01:00
Guido Günther da1888356e simple-dmabuf-drm: support DRM_FORMAT_LINEAR for NV12 as well
This makes --import-format=NV12 testable on e.g. intel

We only set nv12_format_found to true if we found that format and at
least one understood modifier. Store modifier verbatim instead of using
a boolean flag. Last advertised and supported modifier currently wins.

The NV12 DRM_FORMAT_LINEAR image should be green in the upper left
corner and white in the lower right.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-05-29 11:43:03 +03:00
Guido Günther 577b346412 simple-dmabuf-drm: don't exit from create_display
Only exit from main so control flow is in one place.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-05-28 15:54:53 +03:00
Guido Günther f7d035b28c simple-dmabuf-drm: drop superfluous declaration
variable is defined in simple-dmabuf-drm.h

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-05-28 15:54:53 +03:00
Guido Günther bff906304f simple-dmabuf-drm: support etnaviv drm as well
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-05-28 15:24:15 +03:00
Guido Günther f9f5953b2d simple-dmabuf-drm: simplify fd_map_bo
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-05-28 15:24:15 +03:00
Guido Günther 324cdf294d simple-dmabuf-drm: 0 is a valid fd (freedreno)
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-05-28 15:24:15 +03:00
Guido Günther 3ed7a00008 simple-dmabuf-drm: use appropriately sized buffer (freedreno)
Use stride instead of width for buffer calculation.

[Derek Foreman edited the commit log and removed the leftover
initialization of 'size']

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2018-03-19 14:26:52 -05:00
Guido Günther dc0e65413e simple-dmabuf-drm: Always define ALIGN
Other backends might want to use it.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2018-03-19 12:20:02 -05:00
Guido Günther 60970ec27c simple-dmabuf-drm: use getopt_long
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-03-19 12:00:09 +02:00
Guido Günther 2e24198974 simple-dmabuf-drm: use opt bitmask instead of is_immediate
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-03-19 12:00:09 +02:00
Guido Günther a4e206e170 Allow simple-dmabuf-drm to pass y_inverted flag
This allows to check if ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT is
interpreted correctly by the compositor.

We introduce an OPT_* bitmask to hold this flag and possible future
command line flags.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-03-19 12:00:09 +02:00
Guido Günther 4fc3a679eb simple-dmabuf-drm: use vfunc for drm_device_destroy
Remove ifdef clutter and makes sure it's only called for the active
backend.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-03-16 13:39:49 +02:00
Guido Günther 512d29f828 simpla-dmabuf-drm: Use more weston like coding style
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-03-16 13:39:23 +02:00
Guido Günther 6ed5700da5 simple-dmabuf-drm: allow multiple backends
This allows to enable freedreno and intel backends at the same time
building the prerequisites for adding further ones.

[Pekka: fix configure.ac if statements]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-03-16 13:39:10 +02:00
Varad Gautam ee58911912 clients/simple-dmabuf-drm: import with dmabuf modifiers
mesa's freedreno driver supports importing dmabufs with format
DRM_FORMAT_NV12 and DRM_FORMAT_MOD_SAMSUNG_64_32_TILE modifier.
demonstrate weston modifier advertising and import path using this
combination when run with --import-format=NV12.

v2:
 - hard code format if platform doesn't implement
   EGL_EXT_image_dma_buf_import_modifiers and cannot advertise
   format/modifier support.
 - squash using valid frame data to fill dmabuf planes

Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-06-12 10:39:01 +01:00
Varad Gautam f7b3a39625 clients/simple-dmabuf-drm: add freedreno support alongside intel
abstract drm specific bits to struct drm_device and support running on
freedreno. introduce 'modifier' event.

v2: rebase to master, deprecate 'format' event.

Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-06-12 10:38:03 +01:00
Varad Gautam f9dec67990 clients/simple-dmabuf-intel: rename to simple-dmabuf-drm
this will allow adding other drm backends later.

Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-06-12 10:37:38 +01:00