diff options
author | Dudemanguy <random342@airmail.cc> | 2023-01-04 21:34:26 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-01-21 17:08:29 +0000 |
commit | 92a6f2d687e90452c9080a2e0b471ced7557518f (patch) | |
tree | 0676341e88224c4e670e7ed0f3904b04e204b8bd /video/out/drm_atomic.h | |
parent | 8c617765fe88a5d5597fb58d4b593161049de710 (diff) | |
download | mpv-92a6f2d687e90452c9080a2e0b471ced7557518f.tar.bz2 mpv-92a6f2d687e90452c9080a2e0b471ced7557518f.tar.xz |
drm: rewrite based around vo_drm_state
A longstanding pain point of the drm VOs is the relative lack of state
sharing. While drm_common does provide some sharing, it's far less than
other platforms like x11 or wayland. What we do here is essentially copy
them by creating a new vo_drm_state struct and using it in vo_drm and
context_drm_egl. Much of the functionality that was essentially
duplicated in both VOs/contexts is now reduced simple functions in
drm_common. The usage of the term 'kms' was also mostly eliminated since
this is libdrm nowadays from a userspace perspective.
Diffstat (limited to 'video/out/drm_atomic.h')
-rw-r--r-- | video/out/drm_atomic.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/video/out/drm_atomic.h b/video/out/drm_atomic.h index 32e56c7f97..499aa33319 100644 --- a/video/out/drm_atomic.h +++ b/video/out/drm_atomic.h @@ -24,15 +24,11 @@ #include <xf86drmMode.h> #include "common/msg.h" +#include "drm_common.h" #define DRM_OPTS_PRIMARY_PLANE -1 #define DRM_OPTS_OVERLAY_PLANE -2 -struct drm_mode { - drmModeModeInfo mode; - uint32_t blob_id; -}; - struct drm_atomic_plane_state { uint64_t fb_id; uint64_t crtc_id; @@ -83,13 +79,12 @@ struct drm_atomic_context { struct drm_atomic_state old_state; }; - int drm_object_create_properties(struct mp_log *log, int fd, struct drm_object *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); +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 connector_id, |