media: v4l2-ctrls: add core request support
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 21 May 2018 08:54:40 +0000 (04:54 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 31 Aug 2018 15:12:01 +0000 (11:12 -0400)
commit6fa6f831f0950bf46934e6c3a9766b258a9ea85f
tree28bf442b0fbfccb3aea988c81cbe040a526c1644
parentdcea5601dbdfb13be91526eb898c0f9122381032
media: v4l2-ctrls: add core request support

Integrate the request support. This adds the v4l2_ctrl_request_complete
and v4l2_ctrl_request_setup functions to complete a request and (as a
helper function) to apply a request to the hardware.

It takes care of queuing requests and correctly chaining control values
in the request queue.

Note that when a request is marked completed it will copy control values
to the internal request state. This can be optimized in the future since
this is sub-optimal when dealing with large compound and/or array controls.

For the initial 'stateless codec' use-case the current implementation is
sufficient.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-ctrls.c
include/media/v4l2-ctrls.h