mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Frank.Li@oss.nxp.com,
	Martin Tuma <martin.tuma@digiteqautomotive.com>,
	 Mauro Carvalho Chehab	 <mchehab@kernel.org>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	 Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	Jai Luthra <jai.luthra@linux.dev>,
	 Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Michal Simek <michal.simek@amd.com>, Frank Li <Frank.Li@nxp.com>,
	 Sakari Ailus <sakari.ailus@linux.intel.com>,
	Hans Verkuil <hverkuil+cisco@kernel.org>,
	Jacopo Mondi	 <jacopo.mondi@ideasonboard.com>,
	Vinod Koul <vkoul@kernel.org>, Xu Rao	 <raoxu@uniontech.com>,
	"open list:DIGITEQ AUTOMOTIVE MGB4 V4L2 DRIVER"	
	<linux-media@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	 "open list:MEDIA DRIVERS FOR RENESAS - DRIF"	
	<linux-renesas-soc@vger.kernel.org>,
	"moderated list:ARM/ZYNQ ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Cc: imx@lists.linux.dev
Subject: Re: [PATCH v2 2/3] media: use dmaengine_desc_set_callback()
Date: Mon, 02 Nov 2026 15:24:35 -0500	[thread overview]
Message-ID: <38f6a9abf37b06318bb6429ac04807941ca8d558.camel@collabora.com> (raw)
In-Reply-To: <20261102194700.4076807-2-Frank.Li@oss.nxp.com>

[-- Attachment #1: Type: text/plain, Size: 6820 bytes --]

Hi Frank,

Le lundi 02 novembre 2026 à 14:46 -0500, Frank.Li@oss.nxp.com a écrit :
> From: Frank Li <Frank.Li@nxp.com>
> 
> Replace open-coded assignments to callback and callback_param fields
> of struct dma_async_tx_descriptor with calls to the
> dmaengine_desc_set_callback() helper across media drivers.
> 
> No functional change intended. Prepare to make struct
> dma_async_tx_descriptor private to the DMA engine.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  drivers/media/pci/mgb4/mgb4_dma.c                     |  3 +--
>  drivers/media/platform/intel/pxa_camera.c             | 10 ++++++----
>  drivers/media/platform/m2m-deinterlace.c              |  3 +--
>  drivers/media/platform/renesas/rcar_drif.c            |  3 +--
>  drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c |  6 ++----
>  drivers/media/platform/ti/omap/omap_vout_vrfb.c       |  3 +--
>  drivers/media/platform/ti/omap3isp/isphist.c          |  3 +--
>  drivers/media/platform/xilinx/xilinx-dma.c            |  3 +--

Sorry for the inconvenience here, but there is no single maintainer that can
provide an Rb here, you have to split these.

Nicolas

>  8 files changed, 14 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/media/pci/mgb4/mgb4_dma.c b/drivers/media/pci/mgb4/mgb4_dma.c
> index cae888e6504b0..c9a15c625be65 100644
> --- a/drivers/media/pci/mgb4/mgb4_dma.c
> +++ b/drivers/media/pci/mgb4/mgb4_dma.c
> @@ -55,8 +55,7 @@ int mgb4_dma_transfer(struct mgb4_dev *mgbdev, u32 channel, bool write,
>  		return -EIO;
>  	}
>  
> -	tx->callback = chan_irq;
> -	tx->callback_param = chan;
> +	dmaengine_desc_set_callback(tx, chan_irq, NULL, chan);
>  
>  	ret = dma_submit_error(dmaengine_submit(tx));
>  	if (ret) {
> diff --git a/drivers/media/platform/intel/pxa_camera.c b/drivers/media/platform/intel/pxa_camera.c
> index 9e1fdd963b559..c9d57e4245181 100644
> --- a/drivers/media/platform/intel/pxa_camera.c
> +++ b/drivers/media/platform/intel/pxa_camera.c
> @@ -832,16 +832,18 @@ static int pxa_init_dma_channel(struct pxa_camera_dev *pcdev,
>  		goto fail;
>  	}
>  
> -	tx->callback_param = pcdev;
>  	switch (channel) {
>  	case 0:
> -		tx->callback = pxa_camera_dma_irq_y;
> +		dmaengine_desc_set_callback(tx, pxa_camera_dma_irq_y, NULL,
> +					    pcdev);
>  		break;
>  	case 1:
> -		tx->callback = pxa_camera_dma_irq_u;
> +		dmaengine_desc_set_callback(tx, pxa_camera_dma_irq_u, NULL,
> +					    pcdev);
>  		break;
>  	case 2:
> -		tx->callback = pxa_camera_dma_irq_v;
> +		dmaengine_desc_set_callback(tx, pxa_camera_dma_irq_v, NULL,
> +					    pcdev);
>  		break;
>  	}
>  
> diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c
> index 6b07018614894..142b69eab47fe 100644
> --- a/drivers/media/platform/m2m-deinterlace.c
> +++ b/drivers/media/platform/m2m-deinterlace.c
> @@ -336,8 +336,7 @@ static void deinterlace_issue_dma(struct deinterlace_ctx *ctx, int op,
>  	}
>  
>  	if (do_callback) {
> -		tx->callback = dma_callback;
> -		tx->callback_param = ctx;
> +		dmaengine_desc_set_callback(tx, dma_callback, NULL, ctx);
>  	}
>  
>  	ctx->cookie = dmaengine_submit(tx);
> diff --git a/drivers/media/platform/renesas/rcar_drif.c b/drivers/media/platform/renesas/rcar_drif.c
> index bd67e8e16f537..1e8cf71b52cae 100644
> --- a/drivers/media/platform/renesas/rcar_drif.c
> +++ b/drivers/media/platform/renesas/rcar_drif.c
> @@ -610,8 +610,7 @@ static int rcar_drif_qbuf(struct rcar_drif *ch)
>  	}
>  
>  	/* Submit descriptor */
> -	rxd->callback = rcar_drif_dma_complete;
> -	rxd->callback_param = ch;
> +	dmaengine_desc_set_callback(rxd, rcar_drif_dma_complete, NULL, ch);
>  	cookie = dmaengine_submit(rxd);
>  	if (dma_submit_error(cookie)) {
>  		rdrif_err(sdr, "ch%u: dma submit failed\n", ch->num);
> diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
> index 022ea3d616c9e..998423fa2f330 100644
> --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
> +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
> @@ -692,8 +692,7 @@ static int ti_csi2rx_drain_dma(struct ti_csi2rx_ctx *ctx)
>  		goto out;
>  	}
>  
> -	desc->callback = ti_csi2rx_drain_callback;
> -	desc->callback_param = ctx;
> +	dmaengine_desc_set_callback(desc, ti_csi2rx_drain_callback, NULL, ctx);
>  
>  	cookie = dmaengine_submit(desc);
>  	ret = dma_submit_error(cookie);
> @@ -782,8 +781,7 @@ static int ti_csi2rx_start_dma(struct ti_csi2rx_ctx *ctx,
>  	if (!desc)
>  		return -EIO;
>  
> -	desc->callback = ti_csi2rx_dma_callback;
> -	desc->callback_param = buf;
> +	dmaengine_desc_set_callback(desc, ti_csi2rx_dma_callback, NULL, buf);
>  
>  	cookie = dmaengine_submit(desc);
>  	ret = dma_submit_error(cookie);
> diff --git a/drivers/media/platform/ti/omap/omap_vout_vrfb.c b/drivers/media/platform/ti/omap/omap_vout_vrfb.c
> index 0cfa0169875f0..006a4ae45a232 100644
> --- a/drivers/media/platform/ti/omap/omap_vout_vrfb.c
> +++ b/drivers/media/platform/ti/omap/omap_vout_vrfb.c
> @@ -273,8 +273,7 @@ int omap_vout_prepare_vrfb(struct omap_vout_device *vout,
>  		return -EINVAL;
>  	}
>  
> -	tx->callback = omap_vout_vrfb_dma_tx_callback;
> -	tx->callback_param = &vout->vrfb_dma_tx;
> +	dmaengine_desc_set_callback(tx, omap_vout_vrfb_dma_tx_callback, NULL, &vout->vrfb_dma_tx);
>  
>  	cookie = dmaengine_submit(tx);
>  	if (dma_submit_error(cookie)) {
> diff --git a/drivers/media/platform/ti/omap3isp/isphist.c b/drivers/media/platform/ti/omap3isp/isphist.c
> index dc02f240ee89a..281bd0e3748e9 100644
> --- a/drivers/media/platform/ti/omap3isp/isphist.c
> +++ b/drivers/media/platform/ti/omap3isp/isphist.c
> @@ -209,8 +209,7 @@ static int hist_buf_dma(struct ispstat *hist)
>  		goto error;
>  	}
>  
> -	tx->callback = hist_dma_cb;
> -	tx->callback_param = hist;
> +	dmaengine_desc_set_callback(tx, hist_dma_cb, NULL, hist);
>  	cookie = dmaengine_submit(tx);
>  	if (dma_submit_error(cookie)) {
>  		dev_dbg(hist->isp->dev, "hist: DMA submission failed\n");
> diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c
> index fcfe0883aba5f..ece2116639fc0 100644
> --- a/drivers/media/platform/xilinx/xilinx-dma.c
> +++ b/drivers/media/platform/xilinx/xilinx-dma.c
> @@ -358,8 +358,7 @@ static void xvip_dma_buffer_queue(struct vb2_buffer *vb)
>  		vb2_buffer_done(&buf->buf.vb2_buf, VB2_BUF_STATE_ERROR);
>  		return;
>  	}
> -	desc->callback = xvip_dma_complete;
> -	desc->callback_param = buf;
> +	dmaengine_desc_set_callback(desc, xvip_dma_complete, NULL, buf);
>  
>  	spin_lock_irq(&dma->queued_lock);
>  	list_add_tail(&buf->queue, &dma->queued_bufs);

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-11-02 20:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 19:46 [PATCH v2 1/3] media: omap3isp: hist: use dmaengine_submit() instead of ->tx_submit() Frank.Li
2026-11-02 19:46 ` [PATCH v2 2/3] media: use dmaengine_desc_set_callback() Frank.Li
2026-11-02 20:24   ` Nicolas Dufresne [this message]
2026-11-02 19:46 ` [PATCH v2 3/3] media: pxa_camera: use cookie returned by dmaengine_submit() for logging Frank.Li

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=38f6a9abf37b06318bb6429ac04807941ca8d558.camel@collabora.com \
    --to=nicolas.dufresne@collabora.com \
    --cc=Frank.Li@nxp.com \
    --cc=Frank.Li@oss.nxp.com \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=hverkuil+cisco@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=jai.luthra@linux.dev \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=martin.tuma@digiteqautomotive.com \
    --cc=mchehab@kernel.org \
    --cc=michal.simek@amd.com \
    --cc=raoxu@uniontech.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=vkoul@kernel.org \
    /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®