Le 01/08/2025 à 15:51, Dmitry Baryshkov a écrit :
Now as all drivers have been converted to
drmm_writeback_connector_init(), drop drm_writeback_connector_init() and
drm_writeback_connector::encoder field, they are unused now.

Signed-off-by: Dmitry Baryshkov <dmitry.barysh...@oss.qualcomm.com>

Reviewed-by: Louis Chauvet <louis.chau...@bootlin.com>

---
  drivers/gpu/drm/drm_writeback.c | 55 -----------------------------------------
  include/drm/drm_writeback.h     | 18 --------------
  2 files changed, 73 deletions(-)

diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c
index 
95b8a2e4bda69230591b50be15d14d0b3692373b..1a01df91b2c5868e158d489b782f4c57c61a272c
 100644
--- a/drivers/gpu/drm/drm_writeback.c
+++ b/drivers/gpu/drm/drm_writeback.c
@@ -142,61 +142,6 @@ static int create_writeback_properties(struct drm_device 
*dev)
        return 0;
  }
-static const struct drm_encoder_funcs drm_writeback_encoder_funcs = {
-       .destroy = drm_encoder_cleanup,
-};
-
-/**
- * drm_writeback_connector_init - Initialize a writeback connector and its 
properties
- * @dev: DRM device
- * @wb_connector: Writeback connector to initialize
- * @con_funcs: Connector funcs vtable
- * @enc_helper_funcs: Encoder helper funcs vtable to be used by the internal 
encoder
- * @formats: Array of supported pixel formats for the writeback engine
- * @n_formats: Length of the formats array
- * @possible_crtcs: possible crtcs for the internal writeback encoder
- *
- * This function creates the writeback-connector-specific properties if they
- * have not been already created, initializes the connector as
- * type DRM_MODE_CONNECTOR_WRITEBACK, and correctly initializes the property
- * values. It will also create an internal encoder associated with the
- * drm_writeback_connector and set it to use the @enc_helper_funcs vtable for
- * the encoder helper.
- *
- * Drivers should always use this function instead of drm_connector_init() to
- * set up writeback connectors.
- *
- * Returns: 0 on success, or a negative error code
- */
-int drm_writeback_connector_init(struct drm_device *dev,
-                                struct drm_writeback_connector *wb_connector,
-                                const struct drm_connector_funcs *con_funcs,
-                                const struct drm_encoder_helper_funcs 
*enc_helper_funcs,
-                                const u32 *formats, int n_formats,
-                                u32 possible_crtcs)
-{
-       int ret = 0;
-
-       drm_encoder_helper_add(&wb_connector->encoder, enc_helper_funcs);
-
-       wb_connector->encoder.possible_crtcs = possible_crtcs;
-
-       ret = drm_encoder_init(dev, &wb_connector->encoder,
-                              &drm_writeback_encoder_funcs,
-                              DRM_MODE_ENCODER_VIRTUAL, NULL);
-       if (ret)
-               return ret;
-
-       ret = drm_writeback_connector_init_with_encoder(dev, wb_connector, 
&wb_connector->encoder,
-                       con_funcs, formats, n_formats);
-
-       if (ret)
-               drm_encoder_cleanup(&wb_connector->encoder);
-
-       return ret;
-}
-EXPORT_SYMBOL(drm_writeback_connector_init);
-
  static void delete_writeback_properties(struct drm_device *dev)
  {
        if (dev->mode_config.writeback_pixel_formats_property) {
diff --git a/include/drm/drm_writeback.h b/include/drm/drm_writeback.h
index 
c380a7b8f55a3616fa070c037d5cc653b0061fe6..879ca103320cc225ffb3687419088361315535fc
 100644
--- a/include/drm/drm_writeback.h
+++ b/include/drm/drm_writeback.h
@@ -24,17 +24,6 @@ struct drm_writeback_connector {
         */
        struct drm_connector base;
- /**
-        * @encoder: Internal encoder used by the connector to fulfill
-        * the DRM framework requirements. The users of the
-        * @drm_writeback_connector control the behaviour of the @encoder
-        * by passing the @enc_funcs parameter to drm_writeback_connector_init()
-        * function.
-        * For users of drm_writeback_connector_init_with_encoder(), this field
-        * is not valid as the encoder is managed within their drivers.
-        */
-       struct drm_encoder encoder;
-
        /**
         * @pixel_formats_blob_ptr:
         *
@@ -148,13 +137,6 @@ drm_connector_to_writeback(struct drm_connector *connector)
        return container_of(connector, struct drm_writeback_connector, base);
  }
-int drm_writeback_connector_init(struct drm_device *dev,
-                                struct drm_writeback_connector *wb_connector,
-                                const struct drm_connector_funcs *con_funcs,
-                                const struct drm_encoder_helper_funcs 
*enc_helper_funcs,
-                                const u32 *formats, int n_formats,
-                                u32 possible_crtcs);
-
  int drm_writeback_connector_init_with_encoder(struct drm_device *dev,
                                struct drm_writeback_connector *wb_connector,
                                struct drm_encoder *enc,


--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Reply via email to