Re: [PATCH] drm/tegra: Remove of_dma_configure() from host1x_device_add()

2024-02-07 Thread Jason Gunthorpe
On Fri, Feb 02, 2024 at 12:15:40PM -0400, Jason Gunthorpe wrote: > > Yes looks like a race of some sort. Adding a bit of debug also makes the > > issue go away so difficult to see what is happening. > > I'm wondering if it is racing with iommu driver probing? I looked but > didn't notice

Re: [PATCH] drm/tegra: Remove of_dma_configure() from host1x_device_add()

2024-02-02 Thread Jason Gunthorpe
On Fri, Feb 02, 2024 at 03:56:52PM +, Jon Hunter wrote: > > On 02/02/2024 14:35, Jason Gunthorpe wrote: > > On Fri, Feb 02, 2024 at 10:40:36AM +, Jon Hunter wrote: > > > > > > But, what is the actual log output you see, is it -EEXIST? > > > > > > I see ... > > > > > > ERR KERN host1x

Re: [PATCH] drm/tegra: Remove of_dma_configure() from host1x_device_add()

2024-02-02 Thread Jon Hunter
On 02/02/2024 14:35, Jason Gunthorpe wrote: On Fri, Feb 02, 2024 at 10:40:36AM +, Jon Hunter wrote: But, what is the actual log output you see, is it -EEXIST? I see ... ERR KERN host1x drm: iommu configuration for device failed with -ENOENT So that shouldn't happen in you case as

Re: [PATCH] drm/tegra: Remove of_dma_configure() from host1x_device_add()

2024-02-02 Thread Jason Gunthorpe
On Fri, Feb 02, 2024 at 10:40:36AM +, Jon Hunter wrote: > > But, what is the actual log output you see, is it -EEXIST? > > I see ... > > ERR KERN host1x drm: iommu configuration for device failed with -ENOENT So that shouldn't happen in you case as far as I can tell, the device is

Re: [PATCH] drm/tegra: Remove of_dma_configure() from host1x_device_add()

2024-02-02 Thread Jon Hunter
On 01/02/2024 20:02, Jason Gunthorpe wrote: On Thu, Feb 01, 2024 at 07:35:24PM +, Jon Hunter wrote: You mean this sequence? err = device_add(>dev); if (err) { dev_err(host1x->dev, "could not add context device %d: %d\n", i, err);

Re: [PATCH] drm/tegra: Remove of_dma_configure() from host1x_device_add()

2024-02-01 Thread Jason Gunthorpe
On Thu, Feb 01, 2024 at 07:35:24PM +, Jon Hunter wrote: > > You mean this sequence? > > > > err = device_add(>dev); > > if (err) { > > dev_err(host1x->dev, "could not add context device %d: > > %d\n", i, err); > >

Re: [PATCH] drm/tegra: Remove of_dma_configure() from host1x_device_add()

2024-02-01 Thread Jon Hunter
On 31/01/2024 15:33, Jason Gunthorpe wrote: On Tue, Jan 30, 2024 at 09:55:18PM +, Jon Hunter wrote: On 30/01/2024 16:15, Jason Gunthorpe wrote: This was added in commit c95469aa5a18 ("gpu: host1x: Set DMA ops on device creation") with the note: Currently host1x-instanciated

Re: [PATCH] drm/tegra: Remove of_dma_configure() from host1x_device_add()

2024-01-31 Thread Jason Gunthorpe
On Tue, Jan 30, 2024 at 09:55:18PM +, Jon Hunter wrote: > > On 30/01/2024 16:15, Jason Gunthorpe wrote: > > This was added in commit c95469aa5a18 ("gpu: host1x: Set DMA ops on device > > creation") with the note: > > > > Currently host1x-instanciated devices have their dma_ops left to

Re: [PATCH] drm/tegra: Remove of_dma_configure() from host1x_device_add()

2024-01-30 Thread Jon Hunter
On 30/01/2024 16:15, Jason Gunthorpe wrote: This was added in commit c95469aa5a18 ("gpu: host1x: Set DMA ops on device creation") with the note: Currently host1x-instanciated devices have their dma_ops left to NULL, which makes any DMA operation (like buffer import) on ARM64

[PATCH] drm/tegra: Remove of_dma_configure() from host1x_device_add()

2024-01-30 Thread Jason Gunthorpe
This was added in commit c95469aa5a18 ("gpu: host1x: Set DMA ops on device creation") with the note: Currently host1x-instanciated devices have their dma_ops left to NULL, which makes any DMA operation (like buffer import) on ARM64 fallback to the dummy_dma_ops and fail with an error.