diff options
author | Anton Kindestam <antonki@kth.se> | 2020-04-28 19:32:25 +0200 |
---|---|---|
committer | Anton Kindestam <antonki@kth.se> | 2020-05-08 21:26:25 +0200 |
commit | c0bc8bf5d3d567c72abf4b8a5d2732fc9e14144c (patch) | |
tree | a3ca4efad64c19cc76c7fb1bf7732d602c093ecd /video/out/drm_prime.c | |
parent | 5676e5ba3998b5059d358ede05ee54c059ed49db (diff) | |
download | mpv-c0bc8bf5d3d567c72abf4b8a5d2732fc9e14144c.tar.bz2 mpv-c0bc8bf5d3d567c72abf4b8a5d2732fc9e14144c.tar.xz |
drm_prime: print out errno in error message
It is interesting to know why drmModeAddFB2WithModifiers failed.
Diffstat (limited to 'video/out/drm_prime.c')
-rw-r--r-- | video/out/drm_prime.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>. */ +#include <errno.h> #include <unistd.h> #include <xf86drm.h> #include <xf86drmMode.h> #include <drm_mode.h> +#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++) { |