linux-stable/drivers/gpu/host1x
Robin Murphy d89e2378a9 drivers: flag buses which demand DMA configuration
We do not want the common dma_configure() pathway to apply
indiscriminately to all devices, since there are plenty of buses which
do not have DMA capability, and if their child devices were used for
DMA API calls it would only be indicative of a driver bug. However,
there are a number of buses for which DMA is implicitly expected even
when not described by firmware - those we whitelist with an automatic
opt-in to dma_configure(), assuming that the DMA address space and the
physical address space are equivalent if not otherwise specified.

Commit 7232888366 ("of: restrict DMA configuration") introduced a
short-term fix by comparing explicit bus types, but this approach is far
from pretty, doesn't scale well, and fails to cope at all with bus
drivers which may be built as modules, like host1x. Let's refine things
by making that opt-in a property of the bus type, which neatly addresses
those problems and lets the decision of whether firmware description of
DMA capability should be optional or mandatory stay internal to the bus
drivers themselves.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2017-10-19 16:34:52 +02:00
..
hw gpu: host1x: Fix bitshift/mask multipliers 2017-08-17 17:57:06 +02:00
bus.c drivers: flag buses which demand DMA configuration 2017-10-19 16:34:52 +02:00
bus.h gpu: host1x: Provide a proper struct bus_type 2015-01-27 10:09:14 +01:00
cdma.c gpu: host1x: Add IOMMU support 2017-04-05 18:11:43 +02:00
cdma.h gpu: host1x: Remove unused host1x_cdma_stop() definition 2017-06-15 14:25:18 +02:00
channel.c gpu: host1x: Refactor channel allocation code 2017-06-15 14:25:38 +02:00
channel.h gpu: host1x: Refactor channel allocation code 2017-06-15 14:25:38 +02:00
debug.c gpu: host1x: Refactor channel allocation code 2017-06-15 14:25:38 +02:00
debug.h gpu: host1x: Add debug support 2013-04-22 12:32:46 +02:00
dev.c drm/tegra: Changes for v4.14-rc1 2017-08-21 17:37:33 +10:00
dev.h gpu: host1x: Refactor channel allocation code 2017-06-15 14:25:38 +02:00
intr.c gpu: host1x: Constify array of action handlers 2016-06-23 11:59:31 +02:00
intr.h gpu: host1x: Use unsigned int consistently for IDs 2016-06-23 11:59:24 +02:00
job.c gpu: host1x: Don't fail on NULL bo physical address 2017-08-17 17:57:06 +02:00
job.h gpu: host1x: Remove unused 'struct host1x_cmdbuf' 2017-06-15 14:24:59 +02:00
Kconfig gpu: host1x: select IOMMU_IOVA 2017-05-18 10:41:28 -04:00
Makefile gpu: host1x: Add Tegra210 support 2015-12-14 10:50:33 +01:00
mipi.c drm/tegra: dsi: Enhance runtime power management 2016-08-24 15:58:57 +02:00
syncpt.c gpu: host1x: Flesh out kerneldoc 2017-06-15 13:58:43 +02:00
syncpt.h gpu: host1x: Use unsigned int consistently for IDs 2016-06-23 11:59:24 +02:00