From d155b7541f0b336d0b11f315e0c80641d31a4807 Mon Sep 17 00:00:00 2001 From: Anton Kindestam Date: Sat, 2 Jun 2018 12:54:01 +0200 Subject: drm_common: Don't export functions only being used internally As far as I know none of these functions were being used outside of drm_common, nor should there really be a need to use them. --- video/out/drm_common.c | 31 ++++++++++++++++++++++--------- video/out/drm_common.h | 13 ------------- 2 files changed, 22 insertions(+), 22 deletions(-) (limited to 'video/out') 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); diff --git a/video/out/drm_common.h b/video/out/drm_common.h index 036b28de9c..41a8e820b9 100644 --- a/video/out/drm_common.h +++ b/video/out/drm_common.h @@ -72,17 +72,4 @@ struct kms *kms_create(struct mp_log *log, const char *connector_spec, void kms_destroy(struct kms *kms); double kms_get_display_fps(const struct kms *kms); -void kms_show_available_connectors(struct mp_log *log, int card_no); -void kms_show_available_modes(struct mp_log *log, - const drmModeConnector *connector); -void kms_show_available_connectors_and_modes(struct mp_log *log, int card_no); -void kms_show_available_cards_and_connectors(struct mp_log *log); -void kms_show_available_cards_connectors_and_modes(struct mp_log *log); - -int drm_validate_connector_opt(struct mp_log *log, const struct m_option *opt, - struct bstr name, struct bstr param); - -int drm_validate_mode_opt(struct mp_log *log, const struct m_option *opt, - struct bstr name, struct bstr param); - #endif -- cgit v1.2.3