OSDN Git Service

media: tegra-video: Fix channel format alignment
authorSowjanya Komatineni <skomatineni@nvidia.com>
Wed, 12 Aug 2020 00:27:12 +0000 (02:27 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 28 Aug 2020 13:06:59 +0000 (15:06 +0200)
commitd6b6851164d3deaef4fabe2bd7aecb81d0cfcdec
tree57df879eb37f3893b9710c5bb1e2da22c9d77984
parent2dc73489ae84f784448422a31f51501e520b073a
media: tegra-video: Fix channel format alignment

Pixel format width is mistakenly aligned to surface align bytes
and altering width to aligned value may force sensor mode change
other than the requested one and also cause mismatch in width
programmed between sensor and vi which can lead to capture errors.

This patch removes width alignment and clamps width as per Tegra
minimum and maximum limits.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/tegra-video/vi.c