Compare commits

...

4 Commits

Author SHA1 Message Date
Alexandros Frantzis
4d4f54f78e Merge branch 'linux-dmabuf-v3-format-events' into 'main'
linux-dmabuf: Send format events for protocol version 3

See merge request wayland/weston!893
2024-06-26 05:34:08 +00:00
Daniel Stone
de669aeb60 doc: Tie Sphinx -W to Werror configuration
Only pass -W (warnings are fatal) to Sphinx if we've set Werror in
Meson.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Closes: wayland/weston#917
2024-06-25 17:45:37 +00:00
Michael Olbrich
f843ba34d1 drm-backend: limit reset/restart to output of a failed commit
When a commit fails, then only the outputs that where part of this commit should
be reset or restarted.

Otherwise an unrelated output that has another successful pending commit may be
restarted incorrectly. Then the output is in an inconsistent state and will
trigger an assertion:

weston: ../libweston/backend-drm/state-propose.c:627: drm_output_propose_state: Assertion `!output->state_last' failed.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
2024-06-21 21:39:32 +02:00
Alexandros Frantzis
f2d2313693 linux-dmabuf: Send format events for protocol version 3
The linux-dmabuf-unstable-v1 specification does not deprecate "format"
events in version 3 of the protocol. Therefore the compositor must send
both "format" and "modifier" events if version 3 is bound.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
2022-06-03 11:51:41 +03:00
4 changed files with 20 additions and 12 deletions

View File

@ -55,6 +55,7 @@ script_data.set('DOCTREES_DIR', meson.current_build_dir() + '/doctrees')
script_data.set('DOXYGEN_CONF', meson.current_build_dir() + '/doxygen.ini')
script_data.set('DOXYGEN_CMD', doxygen.full_path())
script_data.set('MESON_WERROR', get_option('werror') == true ? 'YES' : 'NO')
script_data.set('SPHINX_CMD', sphinx.full_path())
script_doxy_sphinx = configure_file(
input: 'run_doxygen_sphinx.sh.in',

View File

@ -1,2 +1,9 @@
#!/bin/sh
@DOXYGEN_CMD@ @DOXYGEN_CONF@ && @SPHINX_CMD@ -E -W -q -j auto -d @DOCTREES_DIR@ @SRCDIR@ @OUTDIR@
if [ "@MESON_WERROR@" = "YES" ]; then
SPHINX_WERROR="-W"
else
SPHINX_WERROR=""
fi
@DOXYGEN_CMD@ @DOXYGEN_CONF@ && @SPHINX_CMD@ $SPHINX_WERROR -E -q -j auto -d @DOCTREES_DIR@ @SRCDIR@ @OUTDIR@

View File

@ -946,7 +946,7 @@ drm_repaint_flush_device(struct drm_device *device)
{
struct drm_backend *b = device->backend;
struct drm_pending_state *pending_state;
struct weston_output *base;
struct drm_output_state *output_state;
int ret;
pending_state = device->repaint_data;
@ -964,15 +964,13 @@ drm_repaint_flush_device(struct drm_device *device)
if (ret == 0)
return;
wl_list_for_each(base, &b->compositor->output_list, link) {
struct drm_output *tmp = to_drm_output(base);
if (!tmp || tmp->device != device)
continue;
wl_list_for_each(output_state, &pending_state->output_list, link) {
struct drm_output *tmp = output_state->output;
if (ret == -EBUSY)
weston_output_schedule_repaint_restart(base);
weston_output_schedule_repaint_restart(&tmp->base);
else
weston_output_schedule_repaint_reset(base);
weston_output_schedule_repaint_reset(&tmp->base);
}
}

View File

@ -1064,6 +1064,12 @@ bind_linux_dmabuf(struct wl_client *client,
wl_array_for_each(fmt, &supported_formats->arr) {
modifiers = weston_drm_format_get_modifiers(fmt, &num_modifiers);
for (i = 0; i < num_modifiers; i++) {
if (modifiers[i] == DRM_FORMAT_MOD_LINEAR ||
modifiers[i] == DRM_FORMAT_MOD_INVALID) {
zwp_linux_dmabuf_v1_send_format(resource,
fmt->format);
}
if (version >= ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION) {
uint32_t modifier_lo = modifiers[i] & 0xFFFFFFFF;
uint32_t modifier_hi = modifiers[i] >> 32;
@ -1071,10 +1077,6 @@ bind_linux_dmabuf(struct wl_client *client,
fmt->format,
modifier_hi,
modifier_lo);
} else if (modifiers[i] == DRM_FORMAT_MOD_LINEAR ||
modifiers[i] == DRM_FORMAT_MOD_INVALID) {
zwp_linux_dmabuf_v1_send_format(resource,
fmt->format);
}
}
}