upstream: [media] v4l: ti-vpe: Set correct field parameter for output and capture...
authorArchit Taneja <archit@ti.com>
Mon, 10 Mar 2014 06:24:01 +0000 (03:24 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:55:09 +0000 (11:55 +0900)
commit7d800b1783ae8ac597988f9ddb793edd78886b89
treee203cccd9b962734b51c42f07c109f401d3749a8
parent88908b7909fffadea7e7161ec53c8c4edf590f3c
upstream: [media] v4l: ti-vpe: Set correct field parameter for output and capture buffers

The vpe driver wasn't setting the correct field parameter for dequed CAPTURE
type buffers for the case where the captured output is progressive.

Set the field to V4L2_FIELD_NONE for the completed destination buffers when
the captured output is progressive.

For OUTPUT type buffers, a queued buffer's field is forced to V4L2_FIELD_NONE
if the pixel format(configured through s_fmt for the buffer type
V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE specifies) the field type isn't interlaced.
If the pixel format specified was V4L2_FIELD_ALTERNATE, and the queued buffer's
field isn't V4L2_FIELD_TOP or V4L2_FIELD_BOTTOM, the vb2 buf_prepare op returns
an error.

This ensures compliance, and that the dequeued output and captured buffers
contain the field type that the driver used internally.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/ti-vpe/vpe.c