Commit 000c4c57 authored by Jai Luthra's avatar Jai Luthra Committed by sanglipeng
Browse files

media: i2c: imx219: Fix binning for RAW8 capture

stable inclusion
from stable-v5.10.173
commit c6c3b4ae31664e2b52e31a80b231c6f37f370c97
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c6c3b4ae31664e2b52e31a80b231c6f37f370c97

--------------------------------

[ Upstream commit ef86447e ]

2x2 binning works fine for RAW10 capture, but for RAW8 1232p mode it
leads to corrupted frames [1][2].

Using the special 2x2 analog binning mode fixes the issue, but causes
artefacts for RAW10 1232p capture. So here we choose the binning mode
depending upon the frame format selected.

As both binning modes work fine for 480p RAW8 and RAW10 capture, it can
share the same code path as 1232p for selecting binning mode.

[1] https://forums.raspberrypi.com/viewtopic.php?t=332103
[2] https://github.com/raspberrypi/libcamera-apps/issues/281



Fixes: 22da1d56 ("media: i2c: imx219: Add support for RAW8 bit bayer format")
Signed-off-by: default avatarJai Luthra <j-luthra@ti.com>
Reviewed-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 582709f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment