summaryrefslogtreecommitdiffstats
path: root/video/out/drm_common.c
diff options
context:
space:
mode:
authorLaserEyess <lasereyess@users.noreply.github.com>2022-11-12 10:40:20 -0500
committersfan5 <sfan5@live.de>2022-11-16 09:32:55 +0100
commitba20f60addaa4ebdd9f6be25464c1b46a7f1f576 (patch)
tree4d387d65aa54b4138258901a5a595bb3d6473eeb /video/out/drm_common.c
parent6623efb14223f8d4ebb0b2b966b21f5953eb56a9 (diff)
downloadmpv-ba20f60addaa4ebdd9f6be25464c1b46a7f1f576.tar.bz2
mpv-ba20f60addaa4ebdd9f6be25464c1b46a7f1f576.tar.xz
drm: remove legacy API
The legacy DRM API adds some complexity to the DRM code. There are only 4 drivers that do not support the DRM Atomic API: 1. radeon (early GCN amd cards) 2. gma500 (ancient intel GPUs) 3. ast (ASPEED SoCs) 4. nouveau Going forward, new DRM drivers will be guaranteed to support the atomic API so this is a safe removal.
Diffstat (limited to 'video/out/drm_common.c')
-rw-r--r--video/out/drm_common.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/video/out/drm_common.c b/video/out/drm_common.c
index d6511b7100..7845edb734 100644
--- a/video/out/drm_common.c
+++ b/video/out/drm_common.c
@@ -80,7 +80,8 @@ const struct m_sub_options drm_conf = {
.help = drm_connector_opt_help},
{"drm-mode", OPT_STRING_VALIDATE(drm_mode_spec, drm_validate_mode_opt),
.help = drm_mode_opt_help},
- {"drm-atomic", OPT_CHOICE(drm_atomic, {"no", 0}, {"auto", 1})},
+ {"drm-atomic", OPT_CHOICE(drm_atomic, {"no", 0}, {"auto", 1}),
+ .deprecation_message = "this option is deprecated: DRM Atomic is required"},
{"drm-draw-plane", OPT_CHOICE(drm_draw_plane,
{"primary", DRM_OPTS_PRIMARY_PLANE},
{"overlay", DRM_OPTS_OVERLAY_PLANE}),
@@ -625,8 +626,7 @@ struct kms *kms_create(struct mp_log *log,
const char *drm_device_path,
const char *connector_spec,
const char* mode_spec,
- int draw_plane, int drmprime_video_plane,
- bool use_atomic)
+ int draw_plane, int drmprime_video_plane)
{
int card_no = -1;
char *connector_name = NULL;
@@ -694,10 +694,9 @@ struct kms *kms_create(struct mp_log *log,
mp_err(log, "Failed to set Universal planes capability\n");
}
- if (!use_atomic) {
- mp_verbose(log, "Using Legacy Modesetting\n");
- } else if (drmSetClientCap(kms->fd, DRM_CLIENT_CAP_ATOMIC, 1)) {
- mp_verbose(log, "No DRM Atomic support found. Falling back to legacy modesetting\n");
+ if (drmSetClientCap(kms->fd, DRM_CLIENT_CAP_ATOMIC, 1)) {
+ mp_err(log, "Failed to create DRM atomic context, no DRM Atomic support\n");
+ goto err;
} else {
mp_verbose(log, "DRM Atomic support found\n");
kms->atomic_context = drm_atomic_create_context(kms->log, kms->fd, kms->crtc_id,