[PATCH v2] dma-buf: Implement simple read/write vfs ops

Chris Wilson chris at chris-wilson.co.uk
Wed Apr 12 20:12:13 UTC 2017


On Wed, Apr 12, 2017 at 12:57:00PM -0700, Laura Abbott wrote:
> On 04/12/2017 12:38 PM, Chris Wilson wrote:
> > On Wed, Apr 12, 2017 at 11:29:18AM -0700, Laura Abbott wrote:
> >> Both the read/write are missing the dma_buf_begin_cpu_access calls.
> >> When I add those these seem to work well enough for a simple
> >> test. I can add a real Tested-by for the next version.
> > 
> > Correct, that was intentional to leave synchronisation to be managed by
> > the caller. It is easier to add synchronisation than take it away.
> > -Chris
> > 
> 
> Ah yes, that makes sense. This is what the sync ioctls were for in
> the first place :). You can add
> 
> Tested-by: Laura Abbott <labbott at redhat.com>

Back to the main point of the exercise, does this fulfil the needs for
ion/dmabuf testing?

We have mmap and now kmap coverage, just by using dmabuf fops - but I
can't see a reasonable avenue to do vmap testing.

And you will still want vgem for import testing. Again, I can't see a
good excuse for vmap...

Do you have a set of kselftests in conjunction to userspace testing?
Would it be worth making a common mock_dmabuf.ko and/or a dmabuf
kselftest framework for producers/consumers to plug into their own
kselftests? Please stop me if I'm overengineering!
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the dri-devel mailing list