summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel van Vugt <daniel.van.vugt@canonical.com>2022-10-13 16:06:57 +0800
committerDaniel van Vugt <daniel.van.vugt@canonical.com>2022-10-13 16:06:57 +0800
commit100c02e5146be08647e2e5a09fda85c42e3a234b (patch)
tree5059f4313e6fdfcbd95d1daec56a64aefecd35b4 /src
parent21cddbae950715189d2a481cc95058660d86c4be (diff)
downloadmutter-100c02e5146be08647e2e5a09fda85c42e3a234b.tar.gz
drm-buffer: Clarify misleading error message on drmModeAddFB2 failure
The real error is more likely to do with the drmModeAddFB2 failure than the format not being compatible with drmModeAddFB. Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2379 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2656>
Diffstat (limited to 'src')
-rw-r--r--src/backends/native/meta-drm-buffer.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backends/native/meta-drm-buffer.c b/src/backends/native/meta-drm-buffer.c
index 86dfb16da..c7eeca4f6 100644
--- a/src/backends/native/meta-drm-buffer.c
+++ b/src/backends/native/meta-drm-buffer.c
@@ -127,10 +127,12 @@ meta_drm_buffer_do_ensure_fb_id (MetaDrmBuffer *buffer,
{
g_set_error (error,
G_IO_ERROR,
- G_IO_ERROR_FAILED,
- "drmModeAddFB does not support format '%s' (0x%x)",
- meta_drm_format_to_string (&tmp, fb_args->format),
- fb_args->format);
+ g_io_error_from_errno (errno),
+ "drmModeAddFB2 failed (%s) and drmModeAddFB cannot be "
+ "used as a fallback because format=0x%x (%s).",
+ g_strerror (errno),
+ fb_args->format,
+ meta_drm_format_to_string (&tmp, fb_args->format));
return FALSE;
}