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.
This commit is contained in:
Anton Kindestam 2018-06-02 12:54:01 +02:00 committed by sfan5
parent 8261924db9
commit d155b7541f
2 changed files with 22 additions and 22 deletions

View File

@ -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);

View File

@ -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