From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Cc: "Jacopo Mondi" <jacopo.mondi+renesas@ideasonboard.com>,
"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v7 5/5] media: vsp1: Add VSPX support
Date: Thu, 24 Apr 2025 16:27:12 +0300 [thread overview]
Message-ID: <20250424132712.GC18085@pendragon.ideasonboard.com> (raw)
In-Reply-To: <wjdbgsasdvocglz3qbqnp3rc6tedlxuxlqsv3rhlad2u2y56ll@5irs2bu2647k>
On Thu, Apr 24, 2025 at 03:18:23PM +0200, Jacopo Mondi wrote:
> On Thu, Apr 24, 2025 at 12:10:35AM +0300, Laurent Pinchart wrote:
> > On Tue, Apr 01, 2025 at 04:22:05PM +0200, Jacopo Mondi wrote:
> > > Add support for VSPX, a specialized version of the VSP2 that
> > > transfer data to the ISP. The VSPX is composed by two RPF units
> >
> > It seems you forgot to take comments from v2 into account.
> >
>
> Are you referring to the commit message alone ? Or is there anything
> else ?
Yes, just the commit message.
> > > to read data from external memory and an IIF instance that performs
> > > transfer towards the ISP.
> > >
>
> [snip]
>
> > > + * buffer CPU-mapped address and the bus address
> > > + *
> > > + * Return: %0 on success or a negative error code on failure
> > > + */
> > > +int vsp1_isp_alloc_buffers(struct device *dev, size_t size,
> > > + struct vsp1_isp_buffer_desc *buffer_desc)
> > > +{
> > > + struct device *bus_master = vsp1_isp_get_bus_master(dev);
> > > +
> > > + if (IS_ERR_OR_NULL(bus_master))
> > > + return -ENODEV;
> > > +
> > > + buffer_desc->cpu_addr = dma_alloc_coherent(bus_master, size,
> > > + &buffer_desc->dma_addr,
> > > + GFP_KERNEL);
> > > + if (IS_ERR_OR_NULL(buffer_desc->cpu_addr))
> > > + return -EINVAL;
> >
> > As commented by Alok, this should be
> >
> > if (!buffer_desc->cpu_addr)
> > return -ENOMEM;
>
> Done, thanks Alok for the comment
>
> > > +
> > > + return 0;
> > > +}
> > > +EXPORT_SYMBOL_GPL(vsp1_isp_alloc_buffers);
> >
> > Where is the buffer freed ?
> >
>
> Right, I presume a call to dma_free_coherent() is needed in the
> vb2 buf_cleanup() operation call path ?
It can be done by the ISP driver (directly, or through a function
exported by the VSP driver, to match vsp1_isp_alloc_buffers()), or be
done by the VSP driver. The important part is to document the design
properly.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2025-04-24 13:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 14:22 [PATCH v7 0/5] media: renesas: vsp1: Add support for VSPX and IIF Jacopo Mondi
2025-04-01 14:22 ` [PATCH v7 1/5] media: vsp1: Add support IIF ISP Interface Jacopo Mondi
2025-04-01 14:22 ` [PATCH v7 2/5] media: vsp1: dl: Use singleshot DL for VSPX Jacopo Mondi
2025-04-01 14:22 ` [PATCH v7 3/5] media: vsp1: wpf: Propagate vsp1_rwpf_init_ctrls() Jacopo Mondi
2025-04-01 20:08 ` Niklas Söderlund
2025-04-01 14:22 ` [PATCH v7 4/5] media: vsp1: rwpf: Support operations with IIF Jacopo Mondi
2025-04-01 14:22 ` [PATCH v7 5/5] media: vsp1: Add VSPX support Jacopo Mondi
2025-04-01 20:07 ` Niklas Söderlund
2025-04-23 21:11 ` Laurent Pinchart
2025-04-01 21:33 ` kernel test robot
2025-04-02 6:14 ` ALOK TIWARI
2025-04-23 21:10 ` Laurent Pinchart
2025-04-24 13:18 ` Jacopo Mondi
2025-04-24 13:27 ` Laurent Pinchart [this message]
2025-04-23 21:14 ` [PATCH v7 0/5] media: renesas: vsp1: Add support for VSPX and IIF Laurent Pinchart
2025-04-24 7:28 ` Jacopo Mondi
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=20250424132712.GC18085@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=jacopo.mondi+renesas@ideasonboard.com \
--cc=jacopo.mondi@ideasonboard.com \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=niklas.soderlund@ragnatech.se \
/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