mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Louis Chauvet <louis.chauvet@bootlin.com>
To: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Kandpal, Suraj" <suraj.kandpal@intel.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Rodrigo Siqueira" <siqueira@igalia.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Liviu Dudau" <liviu.dudau@arm.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Rob Clark" <robin.clark@oss.qualcomm.com>,
	"Dmitry Baryshkov" <lumag@kernel.org>,
	"Abhinav Kumar" <abhinav.kumar@linux.dev>,
	"Jessica Zhang" <jessica.zhang@oss.qualcomm.com>,
	"Sean Paul" <sean@poorly.run>,
	"Marijn Suijten" <marijn.suijten@somainline.org>,
	"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
	"Tomi Valkeinen" <tomi.valkeinen+renesas@ideasonboard.com>,
	"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
	"Maíra Canal" <mcanal@igalia.com>,
	"Raspberry Pi Kernel Maintenance" <kernel-list@raspberrypi.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	freedreno@lists.freedesktop.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 7/8] drm: writeback: drop excess connector initialization functions
Date: Fri, 1 Aug 2025 16:08:45 +0200	[thread overview]
Message-ID: <b92e89d2-5bd8-4228-872e-6e5ae9b4b054@bootlin.com> (raw)
In-Reply-To: <20250801-wb-drop-encoder-v1-7-824646042f7d@oss.qualcomm.com>



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.baryshkov@oss.qualcomm.com>

Reviewed-by: Louis Chauvet <louis.chauvet@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	other threads:[~2025-08-01 14:08 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-01 13:51 [PATCH 0/8] drm: writeback: clean up writeback connector initialization Dmitry Baryshkov
2025-08-01 13:51 ` [PATCH 1/8] drm/amd/display: use drmm_writeback_connector_init() Dmitry Baryshkov
2025-08-01 14:08   ` Louis Chauvet
2025-08-08  5:02   ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 2/8] drm/komeda: " Dmitry Baryshkov
2025-08-01 14:09   ` Louis Chauvet
2025-08-08  5:02   ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 3/8] drm/mali: " Dmitry Baryshkov
2025-08-01 14:08   ` Louis Chauvet
2025-08-08  5:05     ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 4/8] drm/msm/dpu: " Dmitry Baryshkov
2025-08-01 14:08   ` Louis Chauvet
2025-08-08  5:02   ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 5/8] " Dmitry Baryshkov
2025-08-01 14:06   ` Dmitry Baryshkov
2025-08-01 14:06   ` Geert Uytterhoeven
2025-08-01 14:08   ` Louis Chauvet
2025-08-09  7:52     ` Dmitry Baryshkov
2025-08-01 13:51 ` [PATCH 6/8] drm/vc4: " Dmitry Baryshkov
2025-08-01 14:08   ` Louis Chauvet
2025-08-08  5:03   ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 7/8] drm: writeback: drop excess connector initialization functions Dmitry Baryshkov
2025-08-01 14:08   ` Louis Chauvet [this message]
2025-08-01 14:22     ` Kandpal, Suraj
2025-08-01 14:26       ` Dmitry Baryshkov
2025-08-08  5:03   ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 8/8] drm: writeback: rename drm_writeback_connector_init_with_encoder() Dmitry Baryshkov
2025-08-01 14:07   ` Louis Chauvet
2025-08-01 14:23     ` Kandpal, Suraj
2025-08-08  5:05     ` Kandpal, Suraj
2025-08-08  5:24       ` Kandpal, Suraj
2025-08-09  7:55         ` Dmitry Baryshkov
2025-08-04 14:43 ` [PATCH 0/8] drm: writeback: clean up writeback connector initialization Liviu Dudau
2025-08-05  4:58   ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b92e89d2-5bd8-4228-872e-6e5ae9b4b054@bootlin.com \
    --to=louis.chauvet@bootlin.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=geert+renesas@glider.be \
    --cc=harry.wentland@amd.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=jessica.zhang@oss.qualcomm.com \
    --cc=kernel-list@raspberrypi.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=magnus.damm@gmail.com \
    --cc=marijn.suijten@somainline.org \
    --cc=mcanal@igalia.com \
    --cc=mripard@kernel.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=sunpeng.li@amd.com \
    --cc=suraj.kandpal@intel.com \
    --cc=tomi.valkeinen+renesas@ideasonboard.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®