Commit 05e70e32 authored by Maxime Ripard's avatar Maxime Ripard

drm/atomic-helper: Rename drm_atomic_helper_connector_tv_reset to avoid ambiguity

We currently have two sets of TV properties.

The first one is there to deal with analog TV properties, creating
properties such as the TV mode, subconnectors, saturation, hue and so on.
It's created by calling the drm_mode_create_tv_properties() function.

The second one is there to deal with properties that might be useful on a
TV, creating the overscan margins for example. It's created by calling the
drm_mode_create_tv_margin_properties().

However, we also have a drm_atomic_helper_connector_tv_reset() function
that will reset the TV margin properties to their default values, and thus
is supposed to be called for the latter set. This creates an ambiguity due
to the inconsistent naming.

We can thus rename the drm_atomic_helper_connector_tv_reset() function to
drm_atomic_helper_connector_tv_margins_reset() to remove that ambiguity
and hopefully make it more obvious.
Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v4-4-60d38873f782@cerno.techSigned-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
parent 542bbaa7
...@@ -464,12 +464,12 @@ void drm_atomic_helper_connector_reset(struct drm_connector *connector) ...@@ -464,12 +464,12 @@ void drm_atomic_helper_connector_reset(struct drm_connector *connector)
EXPORT_SYMBOL(drm_atomic_helper_connector_reset); EXPORT_SYMBOL(drm_atomic_helper_connector_reset);
/** /**
* drm_atomic_helper_connector_tv_reset - Resets TV connector properties * drm_atomic_helper_connector_tv_margins_reset - Resets TV connector properties
* @connector: DRM connector * @connector: DRM connector
* *
* Resets the TV-related properties attached to a connector. * Resets the TV-related properties attached to a connector.
*/ */
void drm_atomic_helper_connector_tv_reset(struct drm_connector *connector) void drm_atomic_helper_connector_tv_margins_reset(struct drm_connector *connector)
{ {
struct drm_cmdline_mode *cmdline = &connector->cmdline_mode; struct drm_cmdline_mode *cmdline = &connector->cmdline_mode;
struct drm_connector_state *state = connector->state; struct drm_connector_state *state = connector->state;
...@@ -479,7 +479,7 @@ void drm_atomic_helper_connector_tv_reset(struct drm_connector *connector) ...@@ -479,7 +479,7 @@ void drm_atomic_helper_connector_tv_reset(struct drm_connector *connector)
state->tv.margins.top = cmdline->tv_margins.top; state->tv.margins.top = cmdline->tv_margins.top;
state->tv.margins.bottom = cmdline->tv_margins.bottom; state->tv.margins.bottom = cmdline->tv_margins.bottom;
} }
EXPORT_SYMBOL(drm_atomic_helper_connector_tv_reset); EXPORT_SYMBOL(drm_atomic_helper_connector_tv_margins_reset);
/** /**
* __drm_atomic_helper_connector_duplicate_state - copy atomic connector state * __drm_atomic_helper_connector_duplicate_state - copy atomic connector state
......
...@@ -355,7 +355,7 @@ static void gud_connector_reset(struct drm_connector *connector) ...@@ -355,7 +355,7 @@ static void gud_connector_reset(struct drm_connector *connector)
drm_atomic_helper_connector_reset(connector); drm_atomic_helper_connector_reset(connector);
connector->state->tv = gconn->initial_tv_state; connector->state->tv = gconn->initial_tv_state;
/* Set margins from command line */ /* Set margins from command line */
drm_atomic_helper_connector_tv_reset(connector); drm_atomic_helper_connector_tv_margins_reset(connector);
if (gconn->initial_brightness >= 0) if (gconn->initial_brightness >= 0)
connector->state->tv.brightness = gconn->initial_brightness; connector->state->tv.brightness = gconn->initial_brightness;
} }
......
...@@ -542,7 +542,7 @@ static void vc4_hdmi_connector_reset(struct drm_connector *connector) ...@@ -542,7 +542,7 @@ static void vc4_hdmi_connector_reset(struct drm_connector *connector)
new_state->base.max_bpc = 8; new_state->base.max_bpc = 8;
new_state->base.max_requested_bpc = 8; new_state->base.max_requested_bpc = 8;
new_state->output_format = VC4_HDMI_OUTPUT_RGB; new_state->output_format = VC4_HDMI_OUTPUT_RGB;
drm_atomic_helper_connector_tv_reset(connector); drm_atomic_helper_connector_tv_margins_reset(connector);
} }
static struct drm_connector_state * static struct drm_connector_state *
......
...@@ -70,7 +70,7 @@ void __drm_atomic_helper_connector_state_reset(struct drm_connector_state *conn_ ...@@ -70,7 +70,7 @@ void __drm_atomic_helper_connector_state_reset(struct drm_connector_state *conn_
void __drm_atomic_helper_connector_reset(struct drm_connector *connector, void __drm_atomic_helper_connector_reset(struct drm_connector *connector,
struct drm_connector_state *conn_state); struct drm_connector_state *conn_state);
void drm_atomic_helper_connector_reset(struct drm_connector *connector); void drm_atomic_helper_connector_reset(struct drm_connector *connector);
void drm_atomic_helper_connector_tv_reset(struct drm_connector *connector); void drm_atomic_helper_connector_tv_margins_reset(struct drm_connector *connector);
void void
__drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector, __drm_atomic_helper_connector_duplicate_state(struct drm_connector *connector,
struct drm_connector_state *state); struct drm_connector_state *state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment