All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH 08/14] drm/tegra: vic: Inherit DMA mask from host1x
Date: Mon, 14 Oct 2019 14:50:43 +0200	[thread overview]
Message-ID: <20191014125049.425101-9-thierry.reding@gmail.com> (raw)
In-Reply-To: <20191014125049.425101-1-thierry.reding@gmail.com>

From: Thierry Reding <treding@nvidia.com>

VIC, just like all other host1x clients, has the same addressing range
as its parent host1x device. Inherit the DMA mask to reflect that.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/tegra/vic.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c
index 748798f2cdc8..d60e479cde92 100644
--- a/drivers/gpu/drm/tegra/vic.c
+++ b/drivers/gpu/drm/tegra/vic.c
@@ -385,6 +385,13 @@ static int vic_probe(struct platform_device *pdev)
 	struct vic *vic;
 	int err;
 
+	/* inherit DMA mask from host1x parent */
+	err = dma_coerce_mask_and_coherent(dev, *dev->parent->dma_mask);
+	if (err < 0) {
+		dev_err(&pdev->dev, "failed to set DMA mask: %d\n", err);
+		return err;
+	}
+
 	vic = devm_kzalloc(dev, sizeof(*vic), GFP_KERNEL);
 	if (!vic)
 		return -ENOMEM;
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-10-14 12:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 12:50 [PATCH 00/14] drm/tegra: Miscellaneous cleanups Thierry Reding
2019-10-14 12:50 ` [PATCH 01/14] gpu: host1x: Do not limit DMA segment size Thierry Reding
2019-10-14 12:50 ` [PATCH 02/14] gpu: host1x: Remove gratuitous blank line Thierry Reding
2019-10-14 12:50 ` [PATCH 03/14] gpu: host1x: Explicitly initialize host1x_info structures Thierry Reding
2019-10-14 12:50 ` [PATCH 04/14] gpu: host1x: Request channels for clients, not devices Thierry Reding
2019-10-14 12:50 ` [PATCH 05/14] drm/tegra: Inherit device DMA parameters from host1x Thierry Reding
2019-10-14 12:50 ` [PATCH 06/14] drm/tegra: Use DRM_DEBUG_DRIVER for driver messages Thierry Reding
2019-10-14 12:50 ` [PATCH 07/14] drm/tegra: vic: Skip stream ID programming without IOMMU Thierry Reding
2019-10-14 12:50 ` Thierry Reding [this message]
2019-10-14 12:50 ` [PATCH 09/14] drm/tegra: vic: Use common IOMMU attach/detach code Thierry Reding
2019-10-14 12:50 ` [PATCH 10/14] drm/tegra: Move IOMMU group into host1x client Thierry Reding
2019-10-14 14:06   ` kbuild test robot
2019-10-16 15:33   ` Dmitry Osipenko
2019-10-18 11:05     ` Dmitry Osipenko
2019-10-14 12:50 ` [PATCH 11/14] drm/tegra: gem: Rename paddr -> iova Thierry Reding
2019-10-14 12:50 ` [PATCH 12/14] drm/tegra: gem: Use dma_get_sgtable() Thierry Reding
2019-10-14 12:50 ` [PATCH 13/14] drm/tegra: gem: Always map SG tables for DMA-BUFs Thierry Reding
2019-10-14 12:50 ` [PATCH 14/14] drm/tegra: gem: Use sg_alloc_table_from_pages() Thierry Reding

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=20191014125049.425101-9-thierry.reding@gmail.com \
    --to=thierry.reding@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-tegra@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.