[PATCH v2] dma-buf: Implement simple read/write vfs ops
Laura Abbott
labbott at redhat.com
Wed Apr 12 20:35:46 UTC 2017
On 04/12/2017 01:12 PM, Chris Wilson wrote:
> 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...
>
Yes, this should be good for Ion testing. Ion doesn't implement
vmap ops right now so that's moot...
> 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
>
...but in the interest of general testing I think getting some
sort of unit test would be good. I don't have anything in kernel
yet for Ion so maybe some generic dma_buf test would be useful.
I'll see what I come up with.
Thanks,
Laura
More information about the dri-devel
mailing list