Le 01/08/2025 à 15:51, Dmitry Baryshkov a écrit :
Use drmm_plain_encoder_alloc() to allocate simple encoder and
drmm_writeback_connector_init() in order to initialize writeback
connector instance.

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

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

---
  drivers/gpu/drm/vc4/vc4_txp.c | 9 ++++-----
  1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_txp.c b/drivers/gpu/drm/vc4/vc4_txp.c
index 
42acac05fe47861ced226a4f64661f545e21ddb5..fef4e4ee47cf41d40de47c5201f0349dc36c56bd
 100644
--- a/drivers/gpu/drm/vc4/vc4_txp.c
+++ b/drivers/gpu/drm/vc4/vc4_txp.c
@@ -377,7 +377,6 @@ vc4_txp_connector_detect(struct drm_connector *connector, 
bool force)
  static const struct drm_connector_funcs vc4_txp_connector_funcs = {
        .detect = vc4_txp_connector_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
-       .destroy = drm_connector_cleanup,
        .reset = drm_atomic_helper_connector_reset,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
        .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
@@ -601,10 +600,10 @@ static int vc4_txp_bind(struct device *dev, struct device 
*master, void *data)
drm_connector_helper_add(&txp->connector.base,
                                 &vc4_txp_connector_helper_funcs);
-       ret = drm_writeback_connector_init_with_encoder(drm, &txp->connector,
-                                                       encoder,
-                                                       
&vc4_txp_connector_funcs,
-                                                       drm_fmts, 
ARRAY_SIZE(drm_fmts));
+       ret = drmm_writeback_connector_init(drm, &txp->connector,
+                                           &vc4_txp_connector_funcs,
+                                           encoder,
+                                           drm_fmts, ARRAY_SIZE(drm_fmts));
        if (ret)
                return ret;

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

Reply via email to