linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@collabora.com>
To: 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>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	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, Ezequiel Garcia <ezequiel@collabora.com>
Subject: [PATCH v2 1/7] media: hantro: Set DMA max segment size
Date: Thu, 25 Jul 2019 11:17:50 -0300	[thread overview]
Message-ID: <20190725141756.2518-2-ezequiel@collabora.com> (raw)
In-Reply-To: <20190725141756.2518-1-ezequiel@collabora.com>

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. Devices without an
IOMMU will still fallback to default 64KiB segments.

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));
 
 	for (i = 0; i < vpu->variant->num_irqs; i++) {
 		const char *irq_name = vpu->variant->irqs[i].name;
-- 
2.22.0


  reply	other threads:[~2019-07-25 14:18 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 ` Ezequiel Garcia [this message]
2019-07-25 15:36   ` [PATCH v2 1/7] media: hantro: Set DMA max segment size Philipp Zabel
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=20190725141756.2518-2-ezequiel@collabora.com \
    --to=ezequiel@collabora.com \
    --cc=acourbot@chromium.org \
    --cc=boris.brezillon@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=p.zabel@pengutronix.de \
    --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;
as well as URLs for NNTP newsgroup(s).