1
0
Fork 0

onscreen/native: Promote "Zero-copy disabled" message to a warning

Hiding it in debug logging was a little too hidden. Someone might want
to know why performance has degraded without having to restart in debug
mode hoping they can reproduce the issue.

Also remove an assertion that would issue spurious warnings. We should not
always expect IMPORT_STATUS_NONE (implying the first failure must be on
the first frame). Instead we might start with IMPORT_STATUS_OK for a number
of frames and then have a sporadic failure some time later.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3928>
This commit is contained in:
Daniel van Vugt 2024-08-07 15:40:47 +08:00 committed by Marge Bot
parent 31e280c147
commit a393bd0ad6

View file

@ -806,14 +806,9 @@ import_shared_framebuffer (CoglOnscreen *onscreen,
&error);
if (!imported_buffer)
{
meta_topic (META_DEBUG_KMS,
"Zero-copy disabled for %s, "
"meta_drm_buffer_import_new failed: %s",
meta_render_device_get_name (render_device),
error->message);
g_warn_if_fail (secondary_gpu_state->import_status ==
META_SHARED_FRAMEBUFFER_IMPORT_STATUS_NONE);
g_warning ("Zero-copy disabled for %s, import failed: %s",
meta_render_device_get_name (render_device),
error->message);
secondary_gpu_state->import_status =
META_SHARED_FRAMEBUFFER_IMPORT_STATUS_FAILED;
return NULL;