Skip to content
Miouyouyou edited this page Aug 14, 2017 · 5 revisions

Welcome to the unofficial Rockchip VPU service documentation wiki !

Feel free to fork this project, add informations and push the whole documentation back if you have anything to add !

Rewriting the DRM IOMMU code

So, after poking multiple times stdint on IRC, it's clear that the DRM IOMMU code should be rewritten. The ION IOMMU code is much simpler and cleaner, so it should be a good example to follow.

Anyway, here's the advised methodology :

<stdint> Myy, you would found those code are coming from iommu driver directly
<Myy> Ah !
<Myy> So, I should take a look at the Rockchip IOMMU code and adapt as necessary ?
<stdint> so I said don't touch them and don't ask
<Myy> Ok
<stdint> that time we meet problem, and Jun and I can't find a good way to solve it
<Myy> Alright, alright
<stdint> I have told the most simple way is remove all those code
<Myy> ... I can go with that :3
<stdint> importing fd and flush iommu every times
<stdint> having a look at the allocator ion
<Myy> Alright, I'll try to setup something like that
<stdint> Myy, first of all making sure iommu is attaching into vpu driver
<stdint> usually base driver will do that properly
<Myy> Okay
<stdint> then inform the iommu the old table is dropped when you touch the translate table
<Myy> Some invalidate_tlb thingy ?
<stdint> after that, translate every fd and set the virtual address back to register of the vpu
<stdint> yep
<stdint> it is just a little slow, but will make everything fine
<Myy> Alright.
* nighty-__ has quit (Remote host closed the connection)

The DRM IOMMU doesn't do DRM anyway

Now, after reading the old IOMMU DRM Code in details, it seems that it's not using the DRM API at all ! This IOMMU DRM should be renamed IOMMU DMA, since it only deals with DMA operations.

I'll see if I'd keep this "DMA only" design or if I can get DRM code to do the job for me.

Clone this wiki locally