Re: [RFC v2 00/10] Preparing the request API

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

 



On 03/25/2018 06:17 PM, Hans Verkuil wrote:
>> So this weekend I worked on a merger of this work and the RFCv4 Request API
>> patch series, taking what I think are the best bits of both.
>>
>> It is available here:
>>
>> https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=reqv6
> 
> I reorganized/cleaned up the patch series. So look here instead:
> 
> https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=reqv7
> 
> It's easier to follow.

Status update:

Current work-in-progress tree:

https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=reqv8

v4l2-compliance test code:

https://git.linuxtv.org/hverkuil/v4l-utils.git/log/?h=request

I had hoped to have more tests ready, but there were loads of
get/put errors (not surprisingly) which took a lot of time to fix.

I also must remember for the next time that the list_add_tail prototype is:

void list_add_tail(struct list_head *new, struct list_head *head)

and not:

void list_add_tail(struct list_head *head, struct list_head *new)

Adding an object to a request worked much better than adding a request
to an object :-)

The v4l2-compliance tests I wrote test the basic creation/deletion
of requests, and adding controls to a request.

The main tests deal with all the various open/close combinations
(media fd, video fd, request fd). It's now working for both vim2m and
vivid.

I will try to start on buffers and queueing tests tomorrow, but it might
slip to Wednesday.

An interesting corner case was vim2m: what to do if you allocate a request,
add a control to it, then close the video file handle. Since the whole
state is contained in the video file handle, the control inside the request
is suddenly orphaned since the control refers to the control handler in the
file handle state, which is now deleted.

I have decided to remove the control from the request in that case. This means
that closing the video file handle for such devices removes all request objects
that are created by that file handle from any requests that they were bound to.

For vim2m it is effectively equal to calling MEDIA_REQUEST_IOC_REINIT for the
request.

I think this is a sane approach for such devices.

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