media: ti-vpe: cal: Properly calculate max resolution boundary
authorBenoit Parrot <bparrot@ti.com>
Tue, 12 Nov 2019 14:53:44 +0000 (15:53 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 9 Dec 2019 10:39:34 +0000 (11:39 +0100)
commit348d32d3a032b389defa9c4a0436c801d1ba059c
treee7dc20922efdf76ea8b2d1aa513af9d175665801
parent04d766acbf3ecfb26275c40fc04cb7ce2680e43c
media: ti-vpe: cal: Properly calculate max resolution boundary

Currently we were using an arbitrarily small maximum resolution mostly
based on available sensor capabilities. However the hardware DMA limits
are much higher than the statically define maximum resolution we were
using.

There we rework the boundary check code to handle the maximum width and
height based on the maximum line width in bytes and re-calculating the
pixel width based on the given pixel format.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal.c