]> git.baikalelectronics.ru Git - kernel.git/commit
[media] media: ti-vpe: vpe: Fix line stride for output motion vector
authorNikhil Devshatwar <nikhil.nd@ti.com>
Fri, 18 Nov 2016 23:20:37 +0000 (21:20 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 22 Nov 2016 10:08:17 +0000 (08:08 -0200)
commitc6945be0cd3f13ade62bed2f0811f4819d12b12e
tree72f920964a2bc73c6b60cd87eb0697f52a29ef9b
parent967022e3cf07a321c62b0be0f6368a2038f20942
[media] media: ti-vpe: vpe: Fix line stride for output motion vector

For deinterlacing operation, VPE hardware uses motion vectors.
MV calculated in the previous iteration are used for next interation.
Therefore driver allocates two motion vectors in ping-pong fashion.

For every transaction, one MV is DMAed in and one is DMAed out.
All the outbound DMAs (DMA to memory) use output parameters, but as
the motion vectors is generated purely out of input fields, it should
use the input parameters for DMA.

Fix the add_out_dtd to use source q_data for creating descriptor.
If the output size is greater than input stride, without this change,
MV DMA may overwrite the buffer causing memory corruption.

This CRITICAL fix ensures that the motion vector DMA descriptor is
created based on the attributes with which the buffer was allocated.

Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Ravikumar Kattekola <rk@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
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