Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716354

Re: [PATCH 1/7 v2] media: vb2: add bidirectional flag in vb2_queue

From Stanimir Varbanov <stanimir.varbanov@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/7 v2] media: vb2: add bidirectional flag in vb2_queue
Date 2017-08-21 13:40 +0200
Message-ID <ugTdM-3NW-35@gated-at.bofh.it> (permalink)
References <ufQhX-4UA-11@gated-at.bofh.it> <ugRbZ-2zH-41@gated-at.bofh.it> <ugQSB-2pE-1@gated-at.bofh.it> <ugRbZ-2zH-39@gated-at.bofh.it> <ugS82-3aB-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On 08/21/2017 01:21 PM, Hans Verkuil wrote:
> On 08/21/2017 11:29 AM, Marek Szyprowski wrote:
>> Hi Stanimir,
>>
>> On 2017-08-21 11:09, Stanimir Varbanov wrote:
>>> This change is intended to give to the v4l2 drivers a choice to
>>> change the default behavior of the v4l2-core DMA mapping direction
>>> from DMA_TO/FROM_DEVICE (depending on the buffer type CAPTURE or
>>> OUTPUT) to DMA_BIDIRECTIONAL during queue_init time.
>>>
>>> Initially the issue with DMA mapping direction has been found in
>>> Venus encoder driver where the hardware (firmware side) adds few
>>> lines padding on bottom of the image buffer, and the consequence
>>> is triggering of IOMMU protection faults.
>>>
>>> This will help supporting venus encoder (and probably other drivers
>>> in the future) which wants to map output type of buffers as
>>> read/write.
>>>
>>> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>>
>> This has been already discussed about a year ago, but it got lost in
>> meantime, probably due to lack of users. I hope that this time it
>> finally will get into vb2.
>>
>> For the reference, see https://patchwork.kernel.org/patch/9388163/
> 
> Interesting.
> 
> Stanimir, I like your implementation better than the macro in the old
> patch. But as it said there, videobuf2-dma-sg/contig/vmalloc.c have references
> to DMA_FROM_DEVICE that won't work with BIDIRECTIONAL, so those need
> to be adapted as well. I missed that when I reviewed your patch :-(
Thanks for catching this, I didn't thought too much about usrptr. Sent v3.

-- 
regards,
Stan

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/7] media: vb2: add bidirectional flag in vb2_queue Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-08-18 16:20 +0200
  Re: [PATCH 1/7] media: vb2: add bidirectional flag in vb2_queue Hans Verkuil <hverkuil@xs4all.nl> - 2017-08-18 16:40 +0200
    Re: [PATCH 1/7] media: vb2: add bidirectional flag in vb2_queue Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-08-18 16:50 +0200
  [PATCH 1/7 v2] media: vb2: add bidirectional flag in vb2_queue Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-08-21 11:10 +0200
    Re: [PATCH 1/7 v2] media: vb2: add bidirectional flag in vb2_queue Marek Szyprowski <m.szyprowski@samsung.com> - 2017-08-21 11:30 +0200
      Re: [PATCH 1/7 v2] media: vb2: add bidirectional flag in vb2_queue Hans Verkuil <hverkuil@xs4all.nl> - 2017-08-21 12:30 +0200
        Re: [PATCH 1/7 v2] media: vb2: add bidirectional flag in vb2_queue Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-08-21 13:40 +0200
  [PATCH 1/7 v3] media: vb2: add bidirectional flag in vb2_queue Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-08-21 13:40 +0200
    Re: [PATCH 1/7 v3] media: vb2: add bidirectional flag in vb2_queue Marek Szyprowski <m.szyprowski@samsung.com> - 2017-08-21 14:30 +0200
      Re: [PATCH 1/7 v3] media: vb2: add bidirectional flag in vb2_queue Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-08-21 16:20 +0200

csiph-web