Re: [PATCH] iommu/exynos: add missing set_platform_dma_ops callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 17, 2023 at 12:08:42PM +0100, Marek Szyprowski wrote:
> Hi,
> 
> I'm sorry for a delay in replying, but I was busy with other stuff.
> 
> On 23.01.2023 22:00, Jason Gunthorpe wrote:
> > On Mon, Jan 23, 2023 at 10:31:01AM +0100, Marek Szyprowski wrote:
> >> Add set_platform_dma_ops() required for proper driver operation on ARM
> >> 32bit arch after recent changes in the IOMMU framework (detach ops
> >> removal).
> > Thanks for looking into this!
> >
> > Can you explain more about how this actually solves the problem in the
> > commit message? I don't get it.
> 
> Exynos DRM driver calls arm_iommu_detach_device(), then 
> arm_iommu_attach_device() with a difrent 'mapping', see 
> drivers/gpu/drm/exynos/exynos_drm_dma.c Lack of set_platform_dma_ops 
> leads to a warning in iommu_group_do_set_platform_dma(). The other case 
> of calling arm_iommu_detach_device() is after unsuccessful probe of the 
> platform device.

Why can't this just use the normal iommu path in all cases?

It looks like it is trying to copy the DMA API domain from a parent
device to a sub device.

Even when using arm_iommu an iommu_domain is still present, so the
copy code should work?

Though I'm still not really sure how this arm_iommu stuff works..

eg if a driver does iommu_device_claim_dma_owner() how does the
iommu_domain get set back to the arm_iommu's mapping's iommu_domain?

According to the API that is what set_platform is supposed to do (eg
it is what s390 does), but I don't see any code like that in any of
the ARM32 drivers..

Jason



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux