[media] media: ti-vpe: vpe: Add proper support single and multi-plane buffer
authorBenoit Parrot <bparrot@ti.com>
Fri, 18 Nov 2016 23:20:45 +0000 (21:20 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 22 Nov 2016 10:13:00 +0000 (08:13 -0200)
commited1f47cc69c3f230d394e001012336877d730ea2
tree7647957069597d78696dbf9c3ba7a1a786fb7b65
parent3ce0f30f8eadbcabab22a41b5c8cb6af7fcdefca
[media] media: ti-vpe: vpe: Add proper support single and multi-plane buffer

The VPE was restricting the number of plane per buffer based on
the fact that if a particular format had color separation it was
meant to need 2 planes.

However NV12/NV16 are color separate format which are meant to be
presented in a single contiguous buffer/plane.
It could also be presented in a multi-plane as well if need be.
So we must support both modes for more flexibility.

The number of plane requested by user space was previously ignored
and was therefore always overwritten.
The driver now use the requested num plane as hint to calculate needed
offset when required.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/ti-vpe/vpe.c