mirror of
https://github.com/mpv-player/mpv
synced 2025-02-27 19:01:07 +00:00
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:
parent
8261924db9
commit
d155b7541f
@ -43,6 +43,19 @@
|
|||||||
|
|
||||||
static int vt_switcher_pipe[2];
|
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
|
#define OPT_BASE_STRUCT struct drm_opts
|
||||||
const struct m_sub_options drm_conf = {
|
const struct m_sub_options drm_conf = {
|
||||||
.opts = (const struct m_option[]) {
|
.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;
|
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)
|
struct mp_log *log, const drmModeConnector *connector)
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < connector->count_modes; i++) {
|
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);
|
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);
|
mp_info(log, "Available connectors for card %d:\n", card_no);
|
||||||
kms_show_foreach_connector(
|
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");
|
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);
|
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);
|
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);
|
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);
|
return mode_get_Hz(&kms->mode.mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
int drm_validate_connector_opt(struct mp_log *log, const struct m_option *opt,
|
static int drm_validate_connector_opt(struct mp_log *log, const struct m_option *opt,
|
||||||
struct bstr name, struct bstr param)
|
struct bstr name, struct bstr param)
|
||||||
{
|
{
|
||||||
if (bstr_equals0(param, "help")) {
|
if (bstr_equals0(param, "help")) {
|
||||||
kms_show_available_cards_and_connectors(log);
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int drm_validate_mode_opt(struct mp_log *log, const struct m_option *opt,
|
static int drm_validate_mode_opt(struct mp_log *log, const struct m_option *opt,
|
||||||
struct bstr name, struct bstr param)
|
struct bstr name, struct bstr param)
|
||||||
{
|
{
|
||||||
if (bstr_equals0(param, "help")) {
|
if (bstr_equals0(param, "help")) {
|
||||||
kms_show_available_cards_connectors_and_modes(log);
|
kms_show_available_cards_connectors_and_modes(log);
|
||||||
|
@ -72,17 +72,4 @@ struct kms *kms_create(struct mp_log *log, const char *connector_spec,
|
|||||||
void kms_destroy(struct kms *kms);
|
void kms_destroy(struct kms *kms);
|
||||||
double kms_get_display_fps(const 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
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user