linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] iommu/tegra-gart: Fixes for v3.19
@ 2015-01-23 15:37 Thierry Reding
       [not found] ` <1422027472-31467-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2015-01-23 15:37 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Hi Joerg,

Here are two last-minute fixes that I'd still like to get into v3.19 if
at all possible. They fix regressions on Tegra20 systems introduced by
enabling IOMMU support for Tegra30 and later.

Thanks,
Thierry

Thierry Reding (2):
  iommu/tegra: gart: Do not register with bus
  iommu/tegra: gart: Provide default ->map_sg() callback

 drivers/iommu/tegra-gart.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.1.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] iommu/tegra: gart: Do not register with bus
       [not found] ` <1422027472-31467-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-01-23 15:37   ` Thierry Reding
  2015-01-23 15:37   ` [PATCH 2/2] iommu/tegra: gart: Provide default ->map_sg() callback Thierry Reding
  2015-01-26 12:41   ` [PATCH 0/2] iommu/tegra-gart: Fixes for v3.19 Joerg Roedel
  2 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2015-01-23 15:37 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

The driver currently doesn't work as expected and causes existing setups
with Tegra20 to break after commit df06b759f2cf ("drm/tegra: Add IOMMU
support"). To restore these setups, do not register the operations with
the platform bus for now. Fixing this properly will involve non-trivial
changes to the DRM driver, which are unlikely to be accepted at this
point in the release cycle.

Reported-by: Misha Komarovskiy <zombah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Reported-by: Nicolas Chauvet <kwizart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Tested-by: Misha Komarovskiy <zombah-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Tested-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/iommu/tegra-gart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
index f722a0c466cf..10fc32dabb0a 100644
--- a/drivers/iommu/tegra-gart.c
+++ b/drivers/iommu/tegra-gart.c
@@ -395,7 +395,7 @@ static int tegra_gart_probe(struct platform_device *pdev)
 	do_gart_setup(gart, NULL);
 
 	gart_handle = gart;
-	bus_set_iommu(&platform_bus_type, &gart_iommu_ops);
+
 	return 0;
 }
 
-- 
2.1.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] iommu/tegra: gart: Provide default ->map_sg() callback
       [not found] ` <1422027472-31467-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2015-01-23 15:37   ` [PATCH 1/2] iommu/tegra: gart: Do not register with bus Thierry Reding
@ 2015-01-23 15:37   ` Thierry Reding
  2015-01-26 12:41   ` [PATCH 0/2] iommu/tegra-gart: Fixes for v3.19 Joerg Roedel
  2 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2015-01-23 15:37 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Commit 315786ebbf4a ("iommu: Add iommu_map_sg() function") adds a new
->map_sg() callback and provides a default implementation that drivers
can use until they implement a hardware-specific variant. Unfortunately
the Tegra GART driver was not updated as part of that commit, so that
iommu_map_sg() calls on a domain provided by the GART cause an oops.

Fixes: 315786ebbf4a ("iommu: Add iommu_map_sg() function")
Cc: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/iommu/tegra-gart.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
index 10fc32dabb0a..c48da057dbb1 100644
--- a/drivers/iommu/tegra-gart.c
+++ b/drivers/iommu/tegra-gart.c
@@ -315,6 +315,7 @@ static const struct iommu_ops gart_iommu_ops = {
 	.attach_dev	= gart_iommu_attach_dev,
 	.detach_dev	= gart_iommu_detach_dev,
 	.map		= gart_iommu_map,
+	.map_sg		= default_iommu_map_sg,
 	.unmap		= gart_iommu_unmap,
 	.iova_to_phys	= gart_iommu_iova_to_phys,
 	.pgsize_bitmap	= GART_IOMMU_PGSIZES,
-- 
2.1.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] iommu/tegra-gart: Fixes for v3.19
       [not found] ` <1422027472-31467-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2015-01-23 15:37   ` [PATCH 1/2] iommu/tegra: gart: Do not register with bus Thierry Reding
  2015-01-23 15:37   ` [PATCH 2/2] iommu/tegra: gart: Provide default ->map_sg() callback Thierry Reding
@ 2015-01-26 12:41   ` Joerg Roedel
  2 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2015-01-26 12:41 UTC (permalink / raw)
  To: Thierry Reding
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On Fri, Jan 23, 2015 at 04:37:50PM +0100, Thierry Reding wrote:
> Here are two last-minute fixes that I'd still like to get into v3.19 if
> at all possible. They fix regressions on Tegra20 systems introduced by
> enabling IOMMU support for Tegra30 and later.

Applied to iommu/fixes, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-26 12:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-23 15:37 [PATCH 0/2] iommu/tegra-gart: Fixes for v3.19 Thierry Reding
     [not found] ` <1422027472-31467-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-23 15:37   ` [PATCH 1/2] iommu/tegra: gart: Do not register with bus Thierry Reding
2015-01-23 15:37   ` [PATCH 2/2] iommu/tegra: gart: Provide default ->map_sg() callback Thierry Reding
2015-01-26 12:41   ` [PATCH 0/2] iommu/tegra-gart: Fixes for v3.19 Joerg Roedel

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).