diff options
Diffstat (limited to 'video/out/drm_common.c')
-rw-r--r-- | video/out/drm_common.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/video/out/drm_common.c b/video/out/drm_common.c index 3a08cbf468..566022d4a6 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -43,6 +43,19 @@ static int vt_switcher_pipe[2]; +static int drm_validate_connector_opt( + struct mp_log *log, const struct m_option *opt, struct bstr name, + struct bstr param); + +static int drm_validate_mode_opt( + struct mp_log *log, const struct m_option *opt, struct bstr name, + struct bstr param); + +static void kms_show_available_modes( + struct mp_log *log, const drmModeConnector *connector); + +static void kms_show_available_connectors(struct mp_log *log, int card_no); + #define OPT_BASE_STRUCT struct drm_opts const struct m_sub_options drm_conf = { .opts = (const struct m_option[]) { @@ -384,7 +397,7 @@ static double mode_get_Hz(const drmModeModeInfo *mode) return mode->clock * 1000.0 / mode->htotal / mode->vtotal; } -void kms_show_available_modes( +static void kms_show_available_modes( struct mp_log *log, const drmModeConnector *connector) { for (unsigned int i = 0; i < connector->count_modes; i++) { @@ -438,7 +451,7 @@ static void kms_show_connector_name_and_state_callback( mp_info(log, " %s (%s)\n", other_connector_name, connection_str); } -void kms_show_available_connectors(struct mp_log *log, int card_no) +static void kms_show_available_connectors(struct mp_log *log, int card_no) { mp_info(log, "Available connectors for card %d:\n", card_no); kms_show_foreach_connector( @@ -460,7 +473,7 @@ static void kms_show_connector_modes_callback(struct mp_log *log, int card_no, mp_info(log, "\n"); } -void kms_show_available_connectors_and_modes(struct mp_log *log, int card_no) +static void kms_show_available_connectors_and_modes(struct mp_log *log, int card_no) { kms_show_foreach_connector(log, card_no, kms_show_connector_modes_callback); } @@ -477,12 +490,12 @@ static void kms_show_foreach_card( } } -void kms_show_available_cards_and_connectors(struct mp_log *log) +static void kms_show_available_cards_and_connectors(struct mp_log *log) { kms_show_foreach_card(log, kms_show_available_connectors); } -void kms_show_available_cards_connectors_and_modes(struct mp_log *log) +static void kms_show_available_cards_connectors_and_modes(struct mp_log *log) { kms_show_foreach_card(log, kms_show_available_connectors_and_modes); } @@ -492,8 +505,8 @@ double kms_get_display_fps(const struct kms *kms) return mode_get_Hz(&kms->mode.mode); } -int drm_validate_connector_opt(struct mp_log *log, const struct m_option *opt, - struct bstr name, struct bstr param) +static int drm_validate_connector_opt(struct mp_log *log, const struct m_option *opt, + struct bstr name, struct bstr param) { if (bstr_equals0(param, "help")) { kms_show_available_cards_and_connectors(log); @@ -502,8 +515,8 @@ int drm_validate_connector_opt(struct mp_log *log, const struct m_option *opt, return 1; } -int drm_validate_mode_opt(struct mp_log *log, const struct m_option *opt, - struct bstr name, struct bstr param) +static int drm_validate_mode_opt(struct mp_log *log, const struct m_option *opt, + struct bstr name, struct bstr param) { if (bstr_equals0(param, "help")) { kms_show_available_cards_connectors_and_modes(log); |