Unverified Commit 80ed86d4 authored by Maxime Ripard's avatar Maxime Ripard
Browse files

drm/connector: Rename drm_mode_create_tv_properties



drm_mode_create_tv_properties(), among other things, will create the
"mode" property that stores the analog TV mode that connector is
supposed to output.

However, that property is getting deprecated, so let's rename that
function to mention it's deprecated. We'll introduce a new variant of
that function creating the property superseeding it in a later patch.

Reviewed-by: Lyude Paul <lyude@redhat.com> # nouveau
Reviewed-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Tested-by: default avatarMateusz Kwiatkowski <kfyatek+publicgit@gmail.com>
Acked-in-principle-or-something-like-that-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-4-256dad125326@cerno.tech


Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
parent aab5aaa7
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1604,7 +1604,7 @@ EXPORT_SYMBOL(drm_connector_attach_tv_margin_properties);
 * Called by a driver's HDMI connector initialization routine, this function
 * creates the TV margin properties for a given device. No need to call this
 * function for an SDTV connector, it's already called from
 * drm_mode_create_tv_properties().
 * drm_mode_create_tv_properties_legacy().
 *
 * Returns:
 * 0 on success or a negative error code on failure.
@@ -1639,7 +1639,7 @@ int drm_mode_create_tv_margin_properties(struct drm_device *dev)
EXPORT_SYMBOL(drm_mode_create_tv_margin_properties);

/**
 * drm_mode_create_tv_properties - create TV specific connector properties
 * drm_mode_create_tv_properties_legacy - create TV specific connector properties
 * @dev: DRM device
 * @num_modes: number of different TV formats (modes) supported
 * @modes: array of pointers to strings containing name of each format
@@ -1652,7 +1652,7 @@ EXPORT_SYMBOL(drm_mode_create_tv_margin_properties);
 * Returns:
 * 0 on success or a negative error code on failure.
 */
int drm_mode_create_tv_properties(struct drm_device *dev,
int drm_mode_create_tv_properties_legacy(struct drm_device *dev,
					 unsigned int num_modes,
					 const char * const modes[])
{
@@ -1737,7 +1737,7 @@ int drm_mode_create_tv_properties(struct drm_device *dev,
nomem:
	return -ENOMEM;
}
EXPORT_SYMBOL(drm_mode_create_tv_properties);
EXPORT_SYMBOL(drm_mode_create_tv_properties_legacy);

/**
 * drm_mode_create_scaling_mode_property - create scaling mode property
+2 −2
Original line number Diff line number Diff line
@@ -400,7 +400,7 @@ static int gud_connector_add_tv_mode(struct gud_device *gdrm, struct drm_connect
	for (i = 0; i < num_modes; i++)
		modes[i] = &buf[i * GUD_CONNECTOR_TV_MODE_NAME_LEN];

	ret = drm_mode_create_tv_properties(connector->dev, num_modes, modes);
	ret = drm_mode_create_tv_properties_legacy(connector->dev, num_modes, modes);
free:
	kfree(buf);
	if (ret < 0)
@@ -539,7 +539,7 @@ static int gud_connector_add_properties(struct gud_device *gdrm, struct gud_conn
			fallthrough;
		case GUD_PROPERTY_TV_HUE:
			/* This is a no-op if already added. */
			ret = drm_mode_create_tv_properties(drm, 0, NULL);
			ret = drm_mode_create_tv_properties_legacy(drm, 0, NULL);
			if (ret)
				goto out;
			break;
+1 −1
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ static int ch7006_encoder_create_resources(struct drm_encoder *encoder,
	struct drm_device *dev = encoder->dev;
	struct drm_mode_config *conf = &dev->mode_config;

	drm_mode_create_tv_properties(dev, NUM_TV_NORMS, ch7006_tv_norm_names);
	drm_mode_create_tv_properties_legacy(dev, NUM_TV_NORMS, ch7006_tv_norm_names);

	priv->scale_property = drm_property_create_range(dev, 0, "scale", 0, 2);
	if (!priv->scale_property)
+1 −1
Original line number Diff line number Diff line
@@ -1905,7 +1905,7 @@ static void intel_tv_add_properties(struct drm_connector *connector)

		tv_format_names[i] = tv_modes[i].name;
	}
	drm_mode_create_tv_properties(&i915->drm, i, tv_format_names);
	drm_mode_create_tv_properties_legacy(&i915->drm, i, tv_format_names);

	drm_object_attach_property(&connector->base,
				   i915->drm.mode_config.legacy_tv_mode_property,
+1 −1
Original line number Diff line number Diff line
@@ -653,7 +653,7 @@ static int nv17_tv_create_resources(struct drm_encoder *encoder,
			tv_enc->tv_norm = i;
	}

	drm_mode_create_tv_properties(dev, num_tv_norms, nv17_tv_norm_names);
	drm_mode_create_tv_properties_legacy(dev, num_tv_norms, nv17_tv_norm_names);

	drm_object_attach_property(&connector->base,
					conf->tv_select_subconnector_property,
Loading