diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index f85211a1f6..f5a5711b9d 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -85,6 +85,8 @@ Interface changes `--demuxer-force-retry-on-eof`, `--fit-border` options - remove deprecated `--record-file` option - remove deprecated `--vf-defaults` and `--af-defaults` options + - `--drm-connector` no longer allows selecting the card number (use `--drm-device` + instead) --- mpv 0.36.0 --- - add `--target-contrast` - Target luminance value is now also applied when ICC profile is used. diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index 0bf0a9eb10..5ee4eaa14f 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -602,18 +602,15 @@ Available video output drivers are: The following global options are supported by this video output: - ``--drm-connector=[.]`` + ``--drm-connector=`` Select the connector to use (usually this is a monitor.) If ```` is empty or ``auto``, mpv renders the output on the first available connector. Use ``--drm-connector=help`` to get a list of available - connectors. The ```` argument can be used to disambiguate - multiple graphic cards, but is deprecated in favor of ``--drm-device``. - (default: empty) + connectors. (default: empty) ``--drm-device=`` Select the DRM device file to use. If specified this overrides automatic - card selection and any card number specified ``--drm-connector``. - (default: empty) + card selection. (default: empty) ``--drm-mode=`` Mode to use (resolution and frame rate). diff --git a/video/out/drm_common.c b/video/out/drm_common.c index 929e584d8d..5faf305a6b 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -906,22 +906,6 @@ err: drmFreeDevices(devices, card_count); } - -static char *parse_connector_spec(struct vo_drm_state *drm) -{ - if (!drm->opts->connector_spec) - return NULL; - char *dot_ptr = strchr(drm->opts->connector_spec, '.'); - if (dot_ptr) { - MP_WARN(drm, "Warning: Selecting a connector by index with drm-connector " - "is deprecated. Use the drm-device option instead.\n"); - drm->card_no = strtoul(drm->opts->connector_spec, NULL, 10); - return talloc_strdup(drm, dot_ptr + 1); - } else { - return talloc_strdup(drm, drm->opts->connector_spec); - } -} - static void drm_pflip_cb(int fd, unsigned int msc, unsigned int sec, unsigned int usec, void *data) { @@ -1031,7 +1015,6 @@ bool vo_drm_init(struct vo *vo) drm->opts = mp_get_config_group(drm, drm->vo->global, &drm_conf); drmModeRes *res = NULL; - char *connector_name = parse_connector_spec(drm); get_primary_device_path(drm); if (!drm->card_path) { @@ -1058,7 +1041,7 @@ bool vo_drm_init(struct vo *vo) goto err; } - if (!setup_connector(drm, res, connector_name)) + if (!setup_connector(drm, res, drm->opts->connector_spec)) goto err; if (!setup_crtc(drm, res)) goto err;