Re: [RFCv11 PATCH 17/29] vb2: store userspace data in vb2_v4l2_buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/09/2018 05:11 PM, Kieran Bingham wrote:
> Hi Hans,
> 
> Thank you for the patch series !
> 
> I'm looking forwards to finding some time to try out this work.
> 
> Just briefly scanning through the series, and I saw the minor issue below.
> 
> Regards
> 
> Kieran
> 
> 
> On 09/04/18 15:20, Hans Verkuil wrote:
>> From: Hans Verkuil <hans.verkuil@xxxxxxxxx>
>>
>> The userspace-provided plane data needs to be stored in
>> vb2_v4l2_buffer. Currently this information is applied by
>> __fill_vb2_buffer() which is called by the core prepare_buf
>> and qbuf functions, but when using requests these functions
>> aren't called yet since the buffer won't be prepared until
>> the media request is actually queued.
>>
>> In the meantime this information has to be stored somewhere
>> and vb2_v4l2_buffer is a good place for it.
>>
>> The __fill_vb2_buffer callback now just copies the relevant
>> information from vb2_v4l2_buffer into the planes array.
>>
>> Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
>> ---
>>  drivers/media/common/videobuf2/videobuf2-core.c |  25 +-
>>  drivers/media/common/videobuf2/videobuf2-v4l2.c | 324 +++++++++++++-----------
>>  drivers/media/dvb-core/dvb_vb2.c                |   3 +-
>>  include/media/videobuf2-core.h                  |   3 +-
>>  include/media/videobuf2-v4l2.h                  |   2 +
>>  5 files changed, 197 insertions(+), 160 deletions(-)
>>
>> diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
>> index d3f7bb33a54d..3d436ccb61f8 100644
>> --- a/drivers/media/common/videobuf2/videobuf2-core.c
>> +++ b/drivers/media/common/videobuf2/videobuf2-core.c
>> @@ -968,9 +968,8 @@ static int __prepare_mmap(struct vb2_buffer *vb, const void *pb)
> 
> Now that pb is unused here, should it be removed from the function arguments ?

Correct. Dropped here and elsewhere.

Regards,

	Hans



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux