From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Allan Siriani <allan@fatecpompeia.edu.br>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
Loic Poulain <loic.poulain@oss.qualcomm.com>,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] media: qcom: camss: use contiguous buffers when there is no IOMMU
Date: Thu, 5 Nov 2026 09:57:46 +0000 [thread overview]
Message-ID: <8824d3fd-4b39-4355-a4ab-5f7e711aceb9@linaro.org> (raw)
In-Reply-To: <20261104202313.72494-2-allan@fatecpompeia.edu.br>
On 04/11/2026 20:23, Allan Siriani wrote:
> +static int video_buf_plane_addr(struct camss_video *video,
> + struct vb2_buffer *vb, unsigned int plane,
> + dma_addr_t *addr)
> +{
> + struct scatterlist *sg;
> + struct sg_table *sgt;
> + dma_addr_t next;
> + unsigned int i;
> +
> + if (video->vb2_q.mem_ops == &vb2_dma_contig_memops) {
> + *addr = vb2_dma_contig_plane_dma_addr(vb, plane);
> + return 0;
> + }
> +
> + sgt = vb2_dma_sg_plane_desc(vb, plane);
> + if (!sgt || !sgt->nents)
> + return -EFAULT;
> +
> + next = sg_dma_address(sgt->sgl);
> + for_each_sgtable_dma_sg(sgt, sg, i) {
> + if (sg_dma_address(sg) != next) {
> + dev_err(video->camss->dev,
> + "Plane %u is not contiguous in DMA space\n",
> + plane);
> + return -EINVAL;
> + }
> + next += sg_dma_len(sg);
> + }
> +
> + *addr = sg_dma_address(sgt->sgl);
> +
> + return 0;
> +}
STOP SENDING THIS SLOP !
---
bod
next prev parent reply other threads:[~2026-11-05 9:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 20:23 [PATCH 0/4] media: qcom: camss: fixes for SoCs without IOMMU, RDI and CSID1 streaming Allan Siriani
2026-11-04 20:23 ` [PATCH 1/4] media: qcom: camss: use contiguous buffers when there is no IOMMU Allan Siriani
2026-11-04 20:50 ` Loic Poulain
2026-11-05 9:57 ` Bryan O'Donoghue [this message]
2026-11-05 9:59 ` Bryan O'Donoghue
2026-11-05 14:42 ` Bryan O'Donoghue
2026-11-04 20:23 ` [PATCH 2/4] media: qcom: camss: vfe-4-1: program the RDI write master buffer size Allan Siriani
2026-11-04 20:23 ` [PATCH 3/4] media: qcom: camss: always stop the pipeline in stop_streaming Allan Siriani
2026-11-05 14:49 ` Bryan O'Donoghue
2026-11-04 20:23 ` [PATCH 4/4] media: qcom: camss: do not fail CSID power up without a matching VFE Allan Siriani
2026-11-05 8:06 ` [PATCH 0/4] media: qcom: camss: fixes for SoCs without IOMMU, RDI and CSID1 streaming Konrad Dybcio
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=8824d3fd-4b39-4355-a4ab-5f7e711aceb9@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=allan@fatecpompeia.edu.br \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=mchehab@kernel.org \
--cc=vladimir.zapolskiy@linaro.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®