From: Philipp Zabel <p.zabel@pengutronix.de>
To: Ezequiel Garcia <ezequiel@collabora.com>,
linux-media@vger.kernel.org,
Hans Verkuil <hans.verkuil@cisco.com>
Cc: kernel@collabora.com,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Tomasz Figa <tfiga@chromium.org>,
linux-rockchip@lists.infradead.org,
Heiko Stuebner <heiko@sntech.de>, Jonas Karlman <jonas@kwiboo.se>,
Boris Brezillon <boris.brezillon@collabora.com>,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
Alexandre Courbot <acourbot@chromium.org>,
fbuergisser@chromium.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2 1/7] media: hantro: Set DMA max segment size
Date: Thu, 25 Jul 2019 17:36:41 +0200 [thread overview]
Message-ID: <1564069001.3006.1.camel@pengutronix.de> (raw)
In-Reply-To: <20190725141756.2518-2-ezequiel@collabora.com>
On Thu, 2019-07-25 at 11:17 -0300, Ezequiel Garcia wrote:
> From: Francois Buergisser <fbuergisser@chromium.org>
>
> The Hantro codec is typically used in platforms with an IOMMU,
> so we need to set a proper DMA segment size.
... to make sure the DMA-mapping subsystem produces contiguous mappings?
> Devices without an
> IOMMU will still fallback to default 64KiB segments.
I don't understand this comment. The default max_seg_size may be 64 KiB,
but if we are always setting it to DMA_BUT_MASK(32), there is no falling
back.
> Cc: stable@vger.kernel.org
> Fixes: 775fec69008d3 ("media: add Rockchip VPU JPEG encoder driver")
> Signed-off-by: Francois Buergisser <fbuergisser@chromium.org>
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> ---
> drivers/staging/media/hantro/hantro_drv.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c
> index b71a06e9159e..4eae1dbb1ac8 100644
> --- a/drivers/staging/media/hantro/hantro_drv.c
> +++ b/drivers/staging/media/hantro/hantro_drv.c
> @@ -731,6 +731,7 @@ static int hantro_probe(struct platform_device *pdev)
> dev_err(vpu->dev, "Could not set DMA coherent mask.\n");
> return ret;
> }
> + vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));
This should be complemented by a call to
vb2_dma_contig_clear_max_seg_size() in _remove,
to avoid leaking dev->dma_parms.
>
> for (i = 0; i < vpu->variant->num_irqs; i++) {
> const char *irq_name = vpu->variant->irqs[i].name;
regards
Philipp
next prev parent reply other threads:[~2019-07-25 15:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 14:17 [PATCH v2 0/7] hantro: Add RK3399 VP8 decoding support Ezequiel Garcia
2019-07-25 14:17 ` [PATCH v2 1/7] media: hantro: Set DMA max segment size Ezequiel Garcia
2019-07-25 15:36 ` Philipp Zabel [this message]
2019-07-25 15:41 ` Tomasz Figa
2019-07-25 14:17 ` [PATCH v2 2/7] media: hantro: Simplify the controls creation logic Ezequiel Garcia
2019-07-25 14:17 ` [PATCH v2 3/7] media: hantro: Constify the control array Ezequiel Garcia
2019-07-25 14:17 ` [PATCH v2 4/7] media: hantro: Add hantro_get_{src,dst}_buf() helpers Ezequiel Garcia
2019-07-25 14:17 ` [PATCH v2 5/7] media: hantro: Add helpers to prepare/finish a run Ezequiel Garcia
2019-07-25 14:17 ` [PATCH v2 6/7] media: hantro: Move VP8 common code Ezequiel Garcia
2019-07-25 16:22 ` Mauro Carvalho Chehab
2019-07-25 16:30 ` Ezequiel Garcia
2019-07-25 16:38 ` Mauro Carvalho Chehab
2019-07-25 17:25 ` Ezequiel Garcia
2019-07-25 14:17 ` [PATCH v2 7/7] media: hantro: Support RK3399 VP8 decoding Ezequiel Garcia
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=1564069001.3006.1.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=acourbot@chromium.org \
--cc=boris.brezillon@collabora.com \
--cc=ezequiel@collabora.com \
--cc=fbuergisser@chromium.org \
--cc=hans.verkuil@cisco.com \
--cc=heiko@sntech.de \
--cc=jonas@kwiboo.se \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=nicolas.dufresne@collabora.com \
--cc=paul.kocialkowski@bootlin.com \
--cc=stable@vger.kernel.org \
--cc=tfiga@chromium.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