drm/connector: Rename drm_mode_create_tv_properties
authorMaxime Ripard <maxime@cerno.tech>
Thu, 17 Nov 2022 09:28:47 +0000 (10:28 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 24 Nov 2022 11:42:39 +0000 (12:42 +0100)
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: Noralf Trønnes <noralf@tronnes.org>
Tested-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com>
Acked-in-principle-or-something-like-that-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-4-256dad125326@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/drm_connector.c
drivers/gpu/drm/gud/gud_connector.c
drivers/gpu/drm/i2c/ch7006_drv.c
drivers/gpu/drm/i915/display/intel_tv.c
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
drivers/gpu/drm/vc4/vc4_vec.c
include/drm/drm_connector.h

index 78fcffae100bdbe4bdc72a8d7860d64e5307bc00..06e737ed15f5f65adc9fc59ee73bf6d6945869aa 100644 (file)
@@ -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,9 +1652,9 @@ 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,
-                                 unsigned int num_modes,
-                                 const char * const modes[])
+int drm_mode_create_tv_properties_legacy(struct drm_device *dev,
+                                        unsigned int num_modes,
+                                        const char * const modes[])
 {
        struct drm_property *tv_selector;
        struct drm_property *tv_subconnector;
@@ -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
index 86e992b2108bfbc72b74fc7e07a6834073b01d98..034e78360d4f1e2524029fc18b402220fd04759c 100644 (file)
@@ -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;
index 9aff24e8e3b2d5af4f322475190b07e9185c3a1c..b9788218b2ec6d9f819a15dc2b184f9bd86d62f0 100644 (file)
@@ -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)
index 5a0483d173d80f11a472f87218cfb80e6f9e8d42..b986bf075889a1052ce5851489f6c9c9cd5b649d 100644 (file)
@@ -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,
index 1a15534adc608f9f0344e0a4a128998df8c317ca..e5480dab55e312eeeac527deac99c037d2381a3e 100644 (file)
@@ -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,
index e6043cf5d40e24be0afee8ccc5962e6fe98ab09e..adc9bf99e3fd3cc00633ac664a354ffd25319fcb 100644 (file)
@@ -514,8 +514,9 @@ static int vc4_vec_bind(struct device *dev, struct device *master, void *data)
        struct vc4_vec *vec;
        int ret;
 
-       ret = drm_mode_create_tv_properties(drm, ARRAY_SIZE(tv_mode_names),
-                                           tv_mode_names);
+       ret = drm_mode_create_tv_properties_legacy(drm,
+                                                  ARRAY_SIZE(tv_mode_names),
+                                                  tv_mode_names);
        if (ret)
                return ret;
 
index 16e47201aaeb192774a84d7a9641922f73f60d51..572bd6487247102f51d880c735fb10eca5ace7cb 100644 (file)
@@ -1820,9 +1820,9 @@ int drm_mode_create_dvi_i_properties(struct drm_device *dev);
 void drm_connector_attach_dp_subconnector_property(struct drm_connector *connector);
 
 int drm_mode_create_tv_margin_properties(struct drm_device *dev);
-int drm_mode_create_tv_properties(struct drm_device *dev,
-                                 unsigned int num_modes,
-                                 const char * const modes[]);
+int drm_mode_create_tv_properties_legacy(struct drm_device *dev,
+                                        unsigned int num_modes,
+                                        const char * const modes[]);
 void drm_connector_attach_tv_margin_properties(struct drm_connector *conn);
 int drm_mode_create_scaling_mode_property(struct drm_device *dev);
 int drm_connector_attach_content_type_property(struct drm_connector *dev);