[lkml]   [2017]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/7 v3] media: vb2: add bidirectional flag in vb2_queue
Hi Marek,

On 08/21/2017 03:21 PM, Marek Szyprowski wrote:
> Hi Stanimir,
> On 2017-08-21 13:34, 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 <>
> Thanks for the patch.
> Acked-by: Marek Szyprowski <>


> While touching this, I would love to unify set_page_dirty_lock()
> related code in videobuf2-dc, videobuf2-sg and videobuf2-vmalloc.
> IMHO the pattern used in videobuf2-vmalloc should be copied to
> videobuf2-sg (currently checks for dma_dir for every single page)
> and videobuf2-dc (currently it lacks any checks and calls
> set_page_dirty_lock() unconditionally). If you have a little bit
> of spare time, please prepare a separate patch for the above
> mentioned fix.

Sure, I'll unify set_page_dirty_lock invocations in separate patch.


 \ /
  Last update: 2017-08-21 16:14    [W:0.035 / U:13.320 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site