From: Louis Chauvet <louis.chauvet@bootlin.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
kernel-list@raspberrypi.com, amd-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, arun.r.murthy@intel.com,
uma.shankar@intel.com, jani.nikula@intel.com,
dmitry.baryshkov@oss.qualcomm.com, harry.wentland@amd.com,
siqueira@igalia.com, alexander.deucher@amd.com,
christian.koenig@amd.com, airlied@gmail.com, simona@ffwll.ch,
liviu.dudau@arm.com, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, robin.clark@oss.qualcomm.com,
abhinav.kumar@linux.dev, tzimmermann@suse.de,
jessica.zhang@oss.qualcomm.com, sean@poorly.run,
marijn.suijten@somainline.org,
laurent.pinchart+renesas@ideasonboard.com, mcanal@igalia.com,
dave.stevenson@raspberrypi.com,
tomi.valkeinen+renesas@ideasonboard.com,
kieran.bingham+renesas@ideasonboard.com
Subject: Re: [RFC PATCH 6/8] drm/vkms: Adapt vkms writeback to new drm_writeback_connector
Date: Mon, 11 Aug 2025 11:51:16 +0200 [thread overview]
Message-ID: <28e1e51b-759c-4470-aef7-6ccb116e3920@bootlin.com> (raw)
In-Reply-To: <20250811092707.3986802-7-suraj.kandpal@intel.com>
Le 11/08/2025 à 11:27, Suraj Kandpal a écrit :
> Now that drm_writeback_connector is embedded with the drm_connector
> adapt the vkms writeback functionality to this changes. This
> includes changing the drm_writeback_connector to be changed to
> drm_connector within the vkms_output.
> Some other changes are done which are a result of the all the above
> changes mentioned.
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> drivers/gpu/drm/vkms/vkms_composer.c | 2 +-
> drivers/gpu/drm/vkms/vkms_drv.h | 2 +-
> drivers/gpu/drm/vkms/vkms_writeback.c | 15 +++++++++------
> 3 files changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
> index fa269d279e25..b5f20637121c 100644
> --- a/drivers/gpu/drm/vkms/vkms_composer.c
> +++ b/drivers/gpu/drm/vkms/vkms_composer.c
> @@ -543,7 +543,7 @@ void vkms_composer_worker(struct work_struct *work)
> return;
>
> if (wb_pending) {
> - drm_writeback_signal_completion(&out->wb_connector, 0);
> + drm_writeback_signal_completion(&out->connector.writeback, 0);
> spin_lock_irq(&out->composer_lock);
> crtc_state->wb_pending = false;
> spin_unlock_irq(&out->composer_lock);
> diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h
> index 8013c31efe3b..2e58a06c9ad8 100644
> --- a/drivers/gpu/drm/vkms/vkms_drv.h
> +++ b/drivers/gpu/drm/vkms/vkms_drv.h
> @@ -213,7 +213,7 @@ struct vkms_crtc_state {
> */
> struct vkms_output {
> struct drm_crtc crtc;
> - struct drm_writeback_connector wb_connector;
> + struct drm_connector connector;
Can you keep wb_connector here?
> struct drm_encoder wb_encoder;
> struct hrtimer vblank_hrtimer;
> ktime_t period_ns;
> diff --git a/drivers/gpu/drm/vkms/vkms_writeback.c b/drivers/gpu/drm/vkms/vkms_writeback.c
> index 45d69a3b85f6..13c2a5c8f57a 100644
> --- a/drivers/gpu/drm/vkms/vkms_writeback.c
> +++ b/drivers/gpu/drm/vkms/vkms_writeback.c
> @@ -102,13 +102,16 @@ static int vkms_wb_prepare_job(struct drm_writeback_connector *wb_connector,
> return ret;
> }
>
> -static void vkms_wb_cleanup_job(struct drm_writeback_connector *connector,
> +static void vkms_wb_cleanup_job(struct drm_writeback_connector *wb_connector,
> struct drm_writeback_job *job)
> {
> struct vkms_writeback_job *vkmsjob = job->priv;
> + struct drm_connector *connector = container_of(wb_connector,
> + struct drm_connector,
> + writeback);
> struct vkms_output *vkms_output = container_of(connector,
> struct vkms_output,
> - wb_connector);
> + connector);
>
> if (!job->fb)
> return;
> @@ -127,8 +130,8 @@ static void vkms_wb_atomic_commit(struct drm_connector *conn,
> struct drm_connector_state *connector_state = drm_atomic_get_new_connector_state(state,
> conn);
> struct vkms_output *output = drm_crtc_to_vkms_output(connector_state->crtc);
> - struct drm_writeback_connector *wb_conn = &output->wb_connector;
> - struct drm_connector_state *conn_state = wb_conn->base.state;
> + struct drm_writeback_connector *wb_conn = &output->connector.writeback;
> + struct drm_connector_state *conn_state = output->connector.state;
> struct vkms_crtc_state *crtc_state = output->composer_state;
> struct drm_framebuffer *fb = connector_state->writeback_job->fb;
> u16 crtc_height = crtc_state->base.mode.vdisplay;
> @@ -166,7 +169,7 @@ static const struct drm_connector_helper_funcs vkms_wb_conn_helper_funcs = {
> int vkms_enable_writeback_connector(struct vkms_device *vkmsdev,
> struct vkms_output *vkms_output)
> {
> - struct drm_writeback_connector *wb = &vkms_output->wb_connector;
> + struct drm_writeback_connector *wb = &vkms_output->connector.writeback;
> int ret;
>
> ret = drmm_encoder_init(&vkmsdev->drm, &vkms_output->wb_encoder,
> @@ -177,7 +180,7 @@ int vkms_enable_writeback_connector(struct vkms_device *vkmsdev,
> vkms_output->wb_encoder.possible_clones |=
> drm_encoder_mask(&vkms_output->wb_encoder);
>
> - drm_connector_helper_add(&wb->base, &vkms_wb_conn_helper_funcs);
> + drm_connector_helper_add(&vkms_output->connector, &vkms_wb_conn_helper_funcs);
>
> return drmm_writeback_connector_init(&vkmsdev->drm, wb,
> &vkms_wb_connector_funcs,
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-08-11 10:01 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 9:26 [RFC PATCH 0/8] Refactor drm_writeback_connector structure Suraj Kandpal
2025-08-11 9:27 ` [RFC PATCH 1/8] drm: writeback: " Suraj Kandpal
2025-08-11 9:44 ` Laurent Pinchart
2025-08-11 10:22 ` Dmitry Baryshkov
2025-08-11 11:15 ` Laurent Pinchart
2025-08-11 11:19 ` Kandpal, Suraj
2025-08-11 13:26 ` Dmitry Baryshkov
2025-08-13 10:04 ` Kandpal, Suraj
2025-08-13 12:00 ` Laurent Pinchart
2025-08-14 16:13 ` liviu.dudau
2025-08-15 22:20 ` Dmitry Baryshkov
2025-08-19 9:03 ` mripard
2025-08-25 6:26 ` Kandpal, Suraj
2025-08-25 9:26 ` Dmitry Baryshkov
2025-08-26 15:48 ` mripard
2025-08-26 16:08 ` Dmitry Baryshkov
2025-08-27 6:34 ` mripard
2025-08-11 11:16 ` Kandpal, Suraj
2025-08-11 10:13 ` Dmitry Baryshkov
2025-08-11 11:12 ` Kandpal, Suraj
2025-08-11 10:28 ` Dmitry Baryshkov
2025-08-11 11:14 ` Kandpal, Suraj
2025-08-11 9:27 ` [RFC PATCH 2/8] drm/amd/display: Adapt amd writeback to new drm_writeback_connector Suraj Kandpal
2025-08-11 9:27 ` [RFC PATCH 3/8] drm/arm/komeda: Adapt komeda " Suraj Kandpal
2025-08-11 9:27 ` [RFC PATCH 4/8] drm/arm/mali: Adapt mali " Suraj Kandpal
2025-08-11 9:27 ` [RFC PATCH 5/8] drm/vc4: Adapt vc4 " Suraj Kandpal
2025-08-11 9:27 ` [RFC PATCH 6/8] drm/vkms: Adapt vkms " Suraj Kandpal
2025-08-11 9:51 ` Louis Chauvet [this message]
2025-08-11 11:23 ` Kandpal, Suraj
2025-08-11 14:33 ` Louis Chauvet
2025-08-11 9:27 ` [RFC PATCH 7/8] drm/rcar_du: " Suraj Kandpal
2025-08-11 9:40 ` Laurent Pinchart
2025-08-11 9:47 ` Kandpal, Suraj
2025-08-11 9:46 ` Louis Chauvet
2025-08-11 9:27 ` [RFC PATCH 8/8] drm/msm/dpu: Adapt dpu " Suraj Kandpal
2025-08-11 10:26 ` Dmitry Baryshkov
2025-08-11 11:15 ` Kandpal, Suraj
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=28e1e51b-759c-4470-aef7-6ccb116e3920@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=ankit.k.nautiyal@intel.com \
--cc=arun.r.murthy@intel.com \
--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=harry.wentland@amd.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@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=maarten.lankhorst@linux.intel.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=suraj.kandpal@intel.com \
--cc=tomi.valkeinen+renesas@ideasonboard.com \
--cc=tzimmermann@suse.de \
--cc=uma.shankar@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).