Revert "gpu: host1x: Add IOMMU support"
authorBen Hutchings <ben@decadent.org.uk>
Sat, 22 Jul 2017 00:14:38 +0000 (01:14 +0100)
committerBastian Blank <waldi@debian.org>
Fri, 22 Jun 2018 09:50:22 +0000 (10:50 +0100)
commit4627f44c67a76624eb30742cc28861d168d321b6
tree582aae47c66a6ca53f861194c18022ef153bca4b
parentcfe67c4336364626072feb04b3023851226056b1
Revert "gpu: host1x: Add IOMMU support"

This reverts commit 404bfb78daf3bedafb0bfab24947059575cbea3d, which
resulted in a build failure:

drivers/gpu/host1x/cdma.c: In function 'host1x_pushbuffer_init':
drivers/gpu/host1x/cdma.c:94:48: error: passing argument 3 of 'dma_alloc_wc' from incompatible pointer type [-Werror=incompatible-pointer-types]
   pb->mapped = dma_alloc_wc(host1x->dev, size, &pb->phys,
                                                ^
In file included from drivers/gpu/host1x/cdma.c:22:0:
include/linux/dma-mapping.h:773:21: note: expected 'dma_addr_t * {aka long long unsigned int *}' but argument is of type 'phys_addr_t * {aka unsigned int *}'
 static inline void *dma_alloc_wc(struct device *dev, size_t size,
                     ^~~~~~~~~~~~

This code is mixing up dma_addr_t and phys_addr_t, and this looks had
to avoid when combining the two address mapping APIs.  But with XEN
enabled and ARM_LPAE not enabled, as in the armmp config, dma_addr_t
is 64-bit while phys_addr_t is 32-bit.

It also reverts commits fea20995976f "gpu: host1x: Free the IOMMU
domain when there is no device to attach", 8b3f5ac6b55f "gpu: host1x:
Don't fail on NULL bo physical address", 1f876c3fcead "gpu: host1x:
Rewrite conditional for better readability" and 41c3068cc2fd "gpu:
host1x: Use IOMMU groups" which depend on it.

Gbp-Pq: Topic debian
Gbp-Pq: Name revert-gpu-host1x-add-iommu-support.patch
drivers/gpu/host1x/cdma.c
drivers/gpu/host1x/cdma.h
drivers/gpu/host1x/dev.c
drivers/gpu/host1x/dev.h
drivers/gpu/host1x/hw/cdma_hw.c
drivers/gpu/host1x/job.c
drivers/gpu/host1x/job.h