From c0bc8bf5d3d567c72abf4b8a5d2732fc9e14144c Mon Sep 17 00:00:00 2001 From: Anton Kindestam Date: Tue, 28 Apr 2020 19:32:25 +0200 Subject: [PATCH] drm_prime: print out errno in error message It is interesting to know why drmModeAddFB2WithModifiers failed. --- video/out/drm_prime.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/video/out/drm_prime.c b/video/out/drm_prime.c index d29837e53d..46971d35b8 100644 --- a/video/out/drm_prime.c +++ b/video/out/drm_prime.c @@ -15,11 +15,13 @@ * License along with mpv. If not, see . */ +#include #include #include #include #include +#include "common/common.h" #include "common/msg.h" #include "drm_common.h" #include "drm_prime.h" @@ -72,7 +74,8 @@ int drm_prime_create_framebuffer(struct mp_log *log, int fd, modifiers, &framebuffer->fb_id, DRM_MODE_FB_MODIFIERS); if (ret < 0) { - mp_err(log, "Failed to create framebuffer on layer %d.\n", 0); + mp_err(log, "Failed to create framebuffer on layer %d: %s\n", + 0, mp_strerror(errno)); goto fail; } for (int plane = 0; plane < AV_DRM_MAX_PLANES; plane++) {