From: Suraj Kandpal <suraj.kandpal@intel.com>
To: 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, kernel-list@raspberrypi.com,
amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-renesas-soc@vger.kernel.org
Cc: dmitry.baryshkov@oss.qualcomm.com, ankit.k.nautiyal@intel.com,
arun.r.murthy@intel.com, uma.shankar@intel.com,
jani.nikula@intel.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,
louis.chauvet@bootlin.com,
Suraj Kandpal <suraj.kandpal@intel.com>
Subject: [PATCH v2 4/7] drm: writeback: Modify drm_writeback_signal_completion param
Date: Tue, 7 Oct 2025 11:15:26 +0530 [thread overview]
Message-ID: <20251007054528.2900905-5-suraj.kandpal@intel.com> (raw)
In-Reply-To: <20251007054528.2900905-1-suraj.kandpal@intel.com>
Move to using drm_connector instead of drm_writeback_connector since
it now resides within drm_connector. This will also help make sure
drivers do not need to access drm_writeback_connector as much.
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
V1 -> V2: Use &connector->writeback (Dmitry)
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 2 +-
drivers/gpu/drm/arm/malidp_hw.c | 6 +++---
drivers/gpu/drm/drm_writeback.c | 6 ++++--
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 4 ++--
drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c | 2 +-
drivers/gpu/drm/vc4/vc4_txp.c | 2 +-
drivers/gpu/drm/vkms/vkms_composer.c | 2 +-
include/drm/drm_writeback.h | 2 +-
9 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index f9e7f8ab4e0b..dc5a733202d2 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -679,7 +679,7 @@ static void dm_crtc_high_irq(void *interrupt_params)
100LL, (v_total * stream->timing.h_total));
mdelay(1000 / refresh_hz);
- drm_writeback_signal_completion(acrtc->wb_conn, 0);
+ drm_writeback_signal_completion(acrtc->connector, 0);
dc_stream_fc_disable_writeback(adev->dm.dc,
acrtc->dm_irq_params.stream, 0);
}
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
index b3f1d3ca23aa..aa5f2776d6c0 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
@@ -210,7 +210,7 @@ void komeda_crtc_handle_event(struct komeda_crtc *kcrtc,
struct komeda_wb_connector *wb_conn = kcrtc->wb_conn;
if (wb_conn)
- drm_writeback_signal_completion(&wb_conn->base.writeback, 0);
+ drm_writeback_signal_completion(&wb_conn->base, 0);
else
DRM_WARN("CRTC[%d]: EOW happen but no wb_connector.\n",
drm_crtc_index(&kcrtc->base));
diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c
index 5a7bd27d3718..9b845d3f34e1 100644
--- a/drivers/gpu/drm/arm/malidp_hw.c
+++ b/drivers/gpu/drm/arm/malidp_hw.c
@@ -1315,15 +1315,15 @@ static irqreturn_t malidp_se_irq(int irq, void *arg)
if (status & se->vsync_irq) {
switch (hwdev->mw_state) {
case MW_ONESHOT:
- drm_writeback_signal_completion(&malidp->mw_connector.writeback, 0);
+ drm_writeback_signal_completion(&malidp->mw_connector, 0);
break;
case MW_STOP:
- drm_writeback_signal_completion(&malidp->mw_connector.writeback, 0);
+ drm_writeback_signal_completion(&malidp->mw_connector, 0);
/* disable writeback after stop */
hwdev->mw_state = MW_NOT_ENABLED;
break;
case MW_RESTART:
- drm_writeback_signal_completion(&malidp->mw_connector.writeback, 0);
+ drm_writeback_signal_completion(&malidp->mw_connector, 0);
fallthrough; /* to a new start */
case MW_START:
/* writeback started, need to emulate one-shot mode */
diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c
index b1ba859c36d1..da7be54f5b13 100644
--- a/drivers/gpu/drm/drm_writeback.c
+++ b/drivers/gpu/drm/drm_writeback.c
@@ -478,7 +478,8 @@ static void cleanup_work(struct work_struct *work)
/**
* drm_writeback_signal_completion - Signal the completion of a writeback job
- * @wb_connector: The writeback connector whose job is complete
+ * @connector: The drm connector whicha has the drm_writeback_connector whose
+ * job is complete
* @status: Status code to set in the writeback out_fence (0 for success)
*
* Drivers should call this to signal the completion of a previously queued
@@ -493,10 +494,11 @@ static void cleanup_work(struct work_struct *work)
* See also: drm_writeback_queue_job()
*/
void
-drm_writeback_signal_completion(struct drm_writeback_connector *wb_connector,
+drm_writeback_signal_completion(struct drm_connector *connector,
int status)
{
unsigned long flags;
+ struct drm_writeback_connector *wb_connector = &connector->writeback;
struct drm_writeback_job *job;
struct dma_fence *out_fence;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
index e7216afa6bac..b0b7aa3a8b78 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
@@ -373,7 +373,7 @@ static void dpu_encoder_phys_wb_done_irq(void *arg)
spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags);
if (wb_enc->wb_conn)
- drm_writeback_signal_completion(wb_enc->wb_conn, 0);
+ drm_writeback_signal_completion(drm_writeback_to_connector(wb_enc->wb_conn), 0);
/* Signal any waiting atomic commit thread */
wake_up_all(&phys_enc->pending_kickoff_wq);
@@ -434,7 +434,7 @@ static void _dpu_encoder_phys_wb_handle_wbdone_timeout(
phys_enc->enable_state = DPU_ENC_ERR_NEEDS_HW_RESET;
if (wb_enc->wb_conn)
- drm_writeback_signal_completion(wb_enc->wb_conn, 0);
+ drm_writeback_signal_completion(drm_writeback_to_connector(wb_enc->wb_conn), 0);
dpu_encoder_frame_done_callback(phys_enc->parent, phys_enc, frame_event);
}
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c
index 4e8fa7a5bc32..1ec9b4242c39 100644
--- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c
+++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c
@@ -253,5 +253,5 @@ void rcar_du_writeback_setup(struct rcar_du_crtc *rcrtc,
void rcar_du_writeback_complete(struct rcar_du_crtc *rcrtc)
{
- drm_writeback_signal_completion(&rcrtc->writeback.writeback, 0);
+ drm_writeback_signal_completion(&rcrtc->writeback, 0);
}
diff --git a/drivers/gpu/drm/vc4/vc4_txp.c b/drivers/gpu/drm/vc4/vc4_txp.c
index 8afd1a50ab98..ace13bfa1994 100644
--- a/drivers/gpu/drm/vc4/vc4_txp.c
+++ b/drivers/gpu/drm/vc4/vc4_txp.c
@@ -504,7 +504,7 @@ static irqreturn_t vc4_txp_interrupt(int irq, void *data)
*/
TXP_WRITE(TXP_DST_CTRL, TXP_READ(TXP_DST_CTRL) & ~TXP_EI);
vc4_crtc_handle_vblank(vc4_crtc);
- drm_writeback_signal_completion(&txp->connector.writeback, 0);
+ drm_writeback_signal_completion(&txp->connector, 0);
return IRQ_HANDLED;
}
diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
index 4d0bafdebcd1..fa269d279e25 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.writeback, 0);
+ drm_writeback_signal_completion(&out->wb_connector, 0);
spin_lock_irq(&out->composer_lock);
crtc_state->wb_pending = false;
spin_unlock_irq(&out->composer_lock);
diff --git a/include/drm/drm_writeback.h b/include/drm/drm_writeback.h
index b4c11d380df0..5e8ab51c2da4 100644
--- a/include/drm/drm_writeback.h
+++ b/include/drm/drm_writeback.h
@@ -100,7 +100,7 @@ void drm_writeback_queue_job(struct drm_connector *wb_connector,
void drm_writeback_cleanup_job(struct drm_writeback_job *job);
void
-drm_writeback_signal_completion(struct drm_writeback_connector *wb_connector,
+drm_writeback_signal_completion(struct drm_connector *connector,
int status);
struct dma_fence *
--
2.34.1
next prev parent reply other threads:[~2025-10-07 5:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 5:45 [PATCH v2 0/7] Refactor drm_writeback_connector structure Suraj Kandpal
2025-10-07 5:45 ` [PATCH v2 1/7] drm: writeback: " Suraj Kandpal
2025-11-03 15:00 ` Liviu Dudau
2025-11-04 5:11 ` Kandpal, Suraj
2025-11-04 14:04 ` Liviu Dudau
2025-11-05 0:39 ` Dmitry Baryshkov
2025-11-06 11:04 ` Liviu Dudau
2025-11-06 12:17 ` Dmitry Baryshkov
2026-03-12 6:20 ` Kandpal, Suraj
2025-11-04 10:24 ` Louis Chauvet
2026-03-12 6:21 ` Kandpal, Suraj
2025-10-07 5:45 ` [PATCH v2 2/7] drm: writeback: Modify writeback init helpers Suraj Kandpal
2025-10-07 5:45 ` [PATCH v2 3/7] drm: writeback: Modify drm_writeback_queue_job params Suraj Kandpal
2025-10-07 5:45 ` Suraj Kandpal [this message]
2025-10-07 5:45 ` [PATCH v2 5/7] drm: writeback: Modify params for drm_writeback_get_out_fence Suraj Kandpal
2025-10-07 5:45 ` [PATCH v2 6/7] drm/connector: Modify prepare_writeback_job helper Suraj Kandpal
2025-10-07 5:45 ` [PATCH v2 7/7] drm/connector: Modify cleanup_writeback_job helper Suraj Kandpal
2025-10-07 6:03 ` ✗ Fi.CI.BUILD: failure for Refactor drm_writeback_connector structure (rev3) Patchwork
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=20251007054528.2900905-5-suraj.kandpal@intel.com \
--to=suraj.kandpal@intel.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=louis.chauvet@bootlin.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=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