summaryrefslogtreecommitdiffstats
path: root/video/out/drm_atomic.h
diff options
context:
space:
mode:
authorAnton Kindestam <antonki@kth.se>2018-06-02 12:54:05 +0200
committerJan Ekström <jeebjp@gmail.com>2018-12-01 15:42:20 +0200
commitc151fae054d12ef9b392f5b6dcc1bafe894005b0 (patch)
tree7897c815b81f2ad0ea9813d3b271ab45fe2277e1 /video/out/drm_atomic.h
parentb6a431ec55b1216dd89206dd38747482ec50075b (diff)
downloadmpv-c151fae054d12ef9b392f5b6dcc1bafe894005b0.tar.bz2
mpv-c151fae054d12ef9b392f5b6dcc1bafe894005b0.tar.xz
drm_atomic: Add general primary/overlay plane option
Add general primary/overlay plane option to drm-osd-plane-id and drm-video-plane-id, so that the user can just request any usable primary or overlay plane for either of these two options. This should be somewhat more user-friendly (especially as neither of these two options currently have a useful help function), as usually you would only be interested in the type of the plane, and not exactly which plane gets picked.
Diffstat (limited to 'video/out/drm_atomic.h')
-rw-r--r--video/out/drm_atomic.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/drm_atomic.h b/video/out/drm_atomic.h
index cd0252a767..bfbec2bde2 100644
--- a/video/out/drm_atomic.h
+++ b/video/out/drm_atomic.h
@@ -25,6 +25,9 @@
#include "common/msg.h"
+#define DRM_OPTS_PRIMARY_PLANE -1
+#define DRM_OPTS_OVERLAY_PLANE -2
+
struct drm_mode {
drmModeModeInfo mode;
uint32_t blob_id;
@@ -89,7 +92,7 @@ struct drm_object * drm_object_create(struct mp_log *log, int fd, uint32_t objec
void drm_object_free(struct drm_object *object);
void drm_object_print_info(struct mp_log *log, struct drm_object *object);
struct drm_atomic_context *drm_atomic_create_context(struct mp_log *log, int fd, int crtc_id, int connector_id,
- int osd_plane_id, int video_plane_id);
+ int osd_plane_idx, int video_plane_idx);
void drm_atomic_destroy_context(struct drm_atomic_context *ctx);
bool drm_atomic_save_old_state(struct drm_atomic_context *ctx);