mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 12:17:12 +00:00
drm: remove selecting the card number with --drm-connector
f560437594
deprecated this since the
--drm-device path option was added as a replacement. Drop the card
number selection logic.
This commit is contained in:
parent
177fe48d79
commit
be89e07229
@ -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.
|
||||
|
@ -602,18 +602,15 @@ Available video output drivers are:
|
||||
|
||||
The following global options are supported by this video output:
|
||||
|
||||
``--drm-connector=[<gpu_number>.]<name>``
|
||||
``--drm-connector=<name>``
|
||||
Select the connector to use (usually this is a monitor.) If ``<name>``
|
||||
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 ``<gpu_number>`` argument can be used to disambiguate
|
||||
multiple graphic cards, but is deprecated in favor of ``--drm-device``.
|
||||
(default: empty)
|
||||
connectors. (default: empty)
|
||||
|
||||
``--drm-device=<path>``
|
||||
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=<preferred|highest|N|WxH[@R]>``
|
||||
Mode to use (resolution and frame rate).
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user