summaryrefslogtreecommitdiffstats
path: root/video/out/drm_atomic.h
diff options
context:
space:
mode:
authorLongChair <longchair@hotmail.com>2018-03-17 08:21:56 +0100
committerJan Ekström <jeebjp@gmail.com>2018-05-01 20:48:02 +0300
commit49bc07faea5f3c621eed437fadf68653b4b2498b (patch)
tree4d29c3655bd56ba9a6687445947203dff29c7178 /video/out/drm_atomic.h
parent9f2970f28a28076897fda1100de2b6eb9a92be79 (diff)
downloadmpv-49bc07faea5f3c621eed437fadf68653b4b2498b.tar.bz2
mpv-49bc07faea5f3c621eed437fadf68653b4b2498b.tar.xz
drm/atomic: add connector to atomic context
This patch adds - DRM connector object to atomic context. - fd property to the drm atomic object as well as a method to read blob type properties. This allows to ensure that the proper connector is picked up, especially when specifying it from the commandline, and also allows to make sure we're using the right one when embedding with interop into an application.
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 d0ebdb910e..d4d5707274 100644
--- a/video/out/drm_atomic.h
+++ b/video/out/drm_atomic.h
@@ -25,6 +25,7 @@
#include "common/msg.h"
struct drm_object {
+ int fd;
uint32_t id;
uint32_t type;
drmModeObjectProperties *props;
@@ -35,6 +36,7 @@ struct drm_atomic_context {
int fd;
struct drm_object *crtc;
+ struct drm_object *connector;
struct drm_object *primary_plane;
struct drm_object *overlay_plane;
@@ -46,10 +48,11 @@ int drm_object_create_properties(struct mp_log *log, int fd, struct drm_object *
void drm_object_free_properties(struct drm_object *object);
int drm_object_get_property(struct drm_object *object, char *name, uint64_t *value);
int drm_object_set_property(drmModeAtomicReq *request, struct drm_object *object, char *name, uint64_t value);
+drmModePropertyBlobPtr drm_object_get_property_blob(struct drm_object *object, char *name);
struct drm_object * drm_object_create(struct mp_log *log, int fd, uint32_t object_id, uint32_t type);
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 overlay_id);
+struct drm_atomic_context *drm_atomic_create_context(struct mp_log *log, int fd, int crtc_id, int connector_id, int overlay_id);
void drm_atomic_destroy_context(struct drm_atomic_context *ctx);
#endif // MP_DRMATOMIC_H