summaryrefslogtreecommitdiffstats
path: root/video/out/drm_common.c
diff options
context:
space:
mode:
authorAnton Kindestam <antonki@kth.se>2018-06-02 12:54:01 +0200
committersfan5 <sfan5@live.de>2019-05-04 14:17:11 +0200
commitd155b7541f0b336d0b11f315e0c80641d31a4807 (patch)
treeda5090f78ef352005e305eca02c40b91b161af22 /video/out/drm_common.c
parent8261924db93eb436a9e1606d437f0fe64e56dc66 (diff)
downloadmpv-d155b7541f0b336d0b11f315e0c80641d31a4807.tar.bz2
mpv-d155b7541f0b336d0b11f315e0c80641d31a4807.tar.xz
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.
Diffstat (limited to 'video/out/drm_common.c')
-rw-r--r--video/out/drm_common.c31
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);