[PATCH v3 2/2] iommu/arm-smmu: Add support for Adreno GPU pagetable formats

2019-08-07 Thread Jordan Crouse
Add support for an Adreno GPU variant of the arm-smmu device to enable a special pagetable format that enables TTBR1 and leaves TTBR0 free to be switched by the GPU hardware. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-)

[PATCH v3 1/2] iommu/io-pgtable-arm: Add support for ARM_ADRENO_GPU_LPAE io-pgtable format

2019-08-07 Thread Jordan Crouse
Add a new sub-format ARM_ADRENO_GPU_LPAE to set up TTBR0 and TTBR1 for use by the Adreno GPU. This will allow The GPU driver to map global buffers in the TTBR1 and leave the TTBR0 configured but unset and free to be changed dynamically by the GPU. Signed-off-by: Jordan Crouse --- drivers/iommu/

[PATCH v3 0/2] iommu/arm-smmu: Split pagetable support

2019-08-07 Thread Jordan Crouse
(Sigh, resend. I freaked out my SMTP server) This is part of an ongoing evolution for enabling split pagetable support for arm-smmu. Previous versions can be found [1]. In the discussion for v2 Robin pointed out that this is a very Adreno specific use case and that is exactly true. Not only do we

[PATCH v3 1/2] iommu/io-pgtable-arm: Add support for ARM_ADRENO_GPU_LPAE io-pgtable format

2019-08-07 Thread Jordan Crouse
Add a new sub-format ARM_ADRENO_GPU_LPAE to set up TTBR0 and TTBR1 for use by the Adreno GPU. This will allow The GPU driver to map global buffers in the TTBR1 and leave the TTBR0 configured but unset and free to be changed dynamically by the GPU. Signed-off-by: Jordan Crouse --- drivers/iommu/

[PATCH v3 0/2] iommu/arm-smmu: Split pagetable support

2019-08-07 Thread Jordan Crouse
This is part of an ongoing evolution for enabling split pagetable support for arm-smmu. Previous versions can be found [1]. In the discussion for v2 Robin pointed out that this is a very Adreno specific use case and that is exactly true. Not only do we want to configure and use a pagetable in the

Re: Regression due to d98849aff879 (dma-direct: handle DMA_ATTR_NO_KERNEL_MAPPING in common code)

2019-08-07 Thread Lucas Stach
Am Dienstag, den 06.08.2019, 17:44 +0200 schrieb Christoph Hellwig: > On Tue, Aug 06, 2019 at 04:06:58PM +0200, Lucas Stach wrote: > > > > dma_direct_free_pages() then needs the same check, as otherwise the cpu > > address is treated as a cookie instead of a real address and the > > encryption nee

Re: [RFC,v3 7/9] media: platform: Add Mediatek ISP P1 device driver

2019-08-07 Thread Tomasz Figa
On Wed, Aug 7, 2019 at 11:11 AM Jungo Lin wrote: > > Hi, Tomasz: > > On Tue, 2019-08-06 at 18:47 +0900, Tomasz Figa wrote: > > Hi Jungo, > > > > On Fri, Jul 26, 2019 at 4:24 PM Jungo Lin wrote: > > > > > > Hi, Tomasz: > > > > > > On Thu, 2019-07-25 at 18:23 +0900, Tomasz Figa wrote: > > > > .Hi J

Re: [PATCH 1/2] dma-mapping: fix page attributes for dma_mmap_*

2019-08-07 Thread Shawn Anastasio via iommu
On 8/7/19 8:04 AM, Christoph Hellwig wrote: Actually it is typical modern Linux style to just provide a prototype and then use "if (IS_ENABLED(CONFIG_FOO))" to guard the call(s) to it. I see. Also, like Will mentioned earlier, the function name isn't entirely accurate anymore. I second the su

Re: [PATCH v3 hmm 10/11] drm/amdkfd: use mmu_notifier_put

2019-08-07 Thread Jason Gunthorpe
On Tue, Aug 06, 2019 at 11:47:44PM +, Kuehling, Felix wrote: > On 2019-08-06 19:15, Jason Gunthorpe wrote: > > From: Jason Gunthorpe > > > > The sequence of mmu_notifier_unregister_no_release(), > > mmu_notifier_call_srcu() is identical to mmu_notifier_put() with the > > free_notifier callback

[PATCH 6/8] iommu/omap: introduce new API for runtime suspend/resume control

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna This patch adds the support for the OMAP IOMMUs to be suspended during the auto suspend/resume of the OMAP remoteproc devices. The remote processors are auto suspended after a certain time of idle or inactivity period. This is done by introducing two new API, omap_iommu_domain_de

[PATCH 8/8] iommu/omap: remove pm_runtime_irq_safe flag for OMAP IOMMUs

2019-08-07 Thread Tero Kristo via iommu
This is not needed for anything, and prevents proper PM transitions for parent devices which is bad in case of ti-sysc; this effectively kills PM completely. Thus, remove the flag. Signed-off-by: Tero Kristo --- drivers/iommu/omap-iommu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/driver

[PATCH 7/8] iommu/omap: add support for late attachment of iommu devices

2019-08-07 Thread Tero Kristo via iommu
Current implementation of OMAP IOMMU enforces strict ordering of device probe, initiated by iommu and followed by remoteproc later. This doesn't work too well with the new setup done with ti-sysc changes which may have the devices probed at pretty much any order. To overcome this limitation, if iom

[PATCH 3/8] iommu/omap: streamline enable/disable through runtime pm callbacks

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna The OMAP IOMMU devices are typically present within the respective client processor subsystem and have their own dedicated hard-reset line. Enabling an IOMMU requires the reset line to be deasserted and the clocks to be enabled before programming the necessary IOMMU registers. Th

[PATCH 1/8] iommu/omap: fix boot issue on remoteprocs with AMMU/Unicache

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna Support has been added to the OMAP IOMMU driver to fix a boot hang issue on OMAP remoteprocs with AMMU/Unicache, caused by an improper AMMU/Unicache state upon initial deassertion of the processor reset. The issue is described in detail in the next three paragraphs. All the Cort

[PATCH 0/8] iommu/omap: misc fixes

2019-08-07 Thread Tero Kristo via iommu
Hi Joerg, Here are a few fixes for OMAP IOMMU. These are mostly towards getting runtime PM support functional again for the IOMMU. -Tero -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

[PATCH 5/8] iommu/omap: Add system suspend/resume support

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna The MMU registers for the remote processors lose their context in Open Switch Retention (OSWR) or device OFF modes. Hence, the context of the IOMMU needs to be saved before it is put into any of these lower power state (OSWR/OFF) and restored before it is powered up to ON again.

[PATCH 2/8] iommu/omap: add pdata ops for omap_device_enable/idle

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna Add two new platform data ops to allow the OMAP iommu driver to be able to invoke the omap_device_enable and omap_device_idle from within the driver. These are being added to streamline the sequence between managing the hard reset lines and the clocks during the suspend path, as

[PATCH 4/8] iommu/omap: add logic to save/restore locked TLBs

2019-08-07 Thread Tero Kristo via iommu
From: Suman Anna The MMUs provide a mechanism to lock TLB entries to avoid eviction and fetching of frequently used page table entries. These TLBs lose context when the MMUs are turned OFF. Add the logic to save and restore these locked TLBS during suspend and resume respectively. There are no lo

Re: [PATCH v3 hmm 10/11] drm/amdkfd: use mmu_notifier_put

2019-08-07 Thread Kuehling, Felix
On 2019-08-06 19:15, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > The sequence of mmu_notifier_unregister_no_release(), > mmu_notifier_call_srcu() is identical to mmu_notifier_put() with the > free_notifier callback. > > As this is the last user of those APIs, converting it means we can drop