summaryrefslogtreecommitdiffstats
path: root/video/out/drm_common.h
diff options
context:
space:
mode:
authorAnton Kindestam <antonki@kth.se>2018-02-13 18:40:47 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-26 23:56:13 -0800
commit3325c7a912adda0b890315d8a9b8586907f2c73f (patch)
treeea58db3c43a49ee4acaa7c312288c94644d0b31a /video/out/drm_common.h
parentbb07b22d4248492c859d2e4c0d2ff2941db1db86 (diff)
downloadmpv-3325c7a912adda0b890315d8a9b8586907f2c73f.tar.bz2
mpv-3325c7a912adda0b890315d8a9b8586907f2c73f.tar.xz
context_drm_egl: Introduce 30bpp support
This introduces the option --drm-format (currently used only by context_drm_egl, vo_drm implementation is pending) which allows you to pick between a xrgb8888 or a xrgb2101010 visual for --gpu-context=drm. Requires a recent mesa (18.0.0_rc4 or later) to work. This also fixes a bug when using --gpu-context=drm on a 30bpp-enabled mesa (allow_rgb10_configs set to true). Previously it would've set up an XRGB8888 format at the DRM/GBM level, while a 30bpp EGLConfig would be picked, resulting in a garbled image.
Diffstat (limited to 'video/out/drm_common.h')
-rw-r--r--video/out/drm_common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/drm_common.h b/video/out/drm_common.h
index ff913ff00c..ba1209e43c 100644
--- a/video/out/drm_common.h
+++ b/video/out/drm_common.h
@@ -24,6 +24,9 @@
#include "options/m_option.h"
#include "drm_atomic.h"
+#define DRM_OPTS_FORMAT_XRGB8888 0
+#define DRM_OPTS_FORMAT_XRGB2101010 1
+
struct kms {
struct mp_log *log;
int fd;
@@ -46,6 +49,7 @@ struct drm_opts {
char *drm_connector_spec;
int drm_mode_id;
int drm_overlay_id;
+ int drm_format;
};
bool vt_switcher_init(struct vt_switcher *s, struct mp_log *log);