Skip to content

Commit 575496d

Browse files
author
Anton Kindestam
committed
drm/atomic: Change --drm-osd-plane-id and --drm-video-plane-id defaults
Using the primary plane for "OSD" plane makes more sense in the software decoding scenario when this is the only plane being used for rendering. Seeing as mpv by default does not use any hardware decoding (the user has to manually specify --hwdec) it is better to optimize the default planes for software decoding.
1 parent d8e214a commit 575496d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

DOCS/man/vo.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,14 @@ Available video output drivers are:
493493
Index is zero based, and related to crtc.
494494
When using this option with drm_prime renderer, it will only affect
495495
the OSD contents. Otherwise it will set OSD & video plane.
496-
(default: first overlay plane)
496+
(default: primary plane)
497497

498498
``--drm-video-plane-id=<number>``
499499
Select the DRM planed index to use for video layer.
500500
Index is zero based, and related to crtc.
501501
This option only has effect when using the drm_prime renderer (which
502502
supports several layers) together with ``vo=gpu`` and ``gpu-context=drm``.
503-
(default: primary plane)
503+
(default: first overlay plane)
504504

505505
``--drm-format=<xrgb8888,xrgb2101010>``
506506
Select the DRM format to use (default: xrgb8888). This allows you to

video/out/drm_atomic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ struct drm_atomic_context *drm_atomic_create_context(struct mp_log *log, int fd,
247247
if (!ctx->osd_plane) {
248248
if (overlay_id) {
249249
mp_verbose(log, "Using default plane %d for OSD\n", overlay_id);
250-
ctx->osd_plane = drm_object_create(log, ctx->fd, overlay_id, DRM_MODE_OBJECT_PLANE);
250+
ctx->osd_plane = drm_object_create(log, ctx->fd, primary_id, DRM_MODE_OBJECT_PLANE);
251251
} else {
252252
mp_err(log, "Failed to find OSD plane with id=%d\n", osd_plane_id);
253253
goto fail;
@@ -260,7 +260,7 @@ struct drm_atomic_context *drm_atomic_create_context(struct mp_log *log, int fd,
260260
if (!ctx->video_plane) {
261261
if (primary_id) {
262262
mp_verbose(log, "Using default plane %d for video\n", primary_id);
263-
ctx->video_plane = drm_object_create(log, ctx->fd, primary_id, DRM_MODE_OBJECT_PLANE);
263+
ctx->video_plane = drm_object_create(log, ctx->fd, overlay_id, DRM_MODE_OBJECT_PLANE);
264264
} else {
265265
mp_err(log, "Failed to find video plane with id=%d\n", video_plane_id);
266266
goto fail;

0 commit comments

Comments
 (0)