[PATCH v6 06/10] accel/rocket: Add IOCTL for BO creation
Daniel Stone
daniel at fooishbar.org
Thu Jun 5 09:36:26 PDT 2025
On Thu, 5 Jun 2025 at 17:32, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
> On Thu, Jun 5, 2025 at 3:37 PM Robin Murphy <robin.murphy at arm.com> wrote:
> > It should only need a single IOMMU domain per DRM client, so no faffing
> > about replicating mappings. iommu_paging_domain_alloc() does need *an*
> > appropriate target device so it can identify the right IOMMU driver, but
> > that in itself doesn't preclude attaching other devices to the resulting
> > domain as well as (or even instead of) the nominal one. In general, not
> > all IOMMU drivers support cross-instance attach so it may fail with
> > -EINVAL, and *that*'s when you might need to fall back to allocating
> > multiple per-instance domains - but as I say since this is a
> > Rockchip-specific driver where the IOMMU *is* intended to support this
> > already, you don't need to bother.
>
> Ok, I did just that and it's working great in my testing:
>
> I create a domain when the client opens the DRM connection and map all
> its BOs to it. Then when a job is about to start, I detach whatever
> domain was attached to the core's group and attach that client's
> domain.
>
> Will send a v7 with it in a couple of days.
Awesome, thanks so much for that Tomeu!
Cheers,
Daniel
More information about the Linux-rockchip
mailing list