]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: ov8856: Set default mbus format but allow caller to alter
authorHsin-Yi Wang <hsinyi@chromium.org>
Mon, 5 Jul 2021 08:17:24 +0000 (10:17 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 21 Aug 2021 07:08:42 +0000 (09:08 +0200)
commitfbe8c9fb0e2eedaf2d29e202fffc63ad6ecf0229
tree962791efc7001fcac1eb57b8dbd5c147542fa798
parent67622262d1eeaa8b87b6292969cc03a4ab44d19f
media: ov8856: Set default mbus format but allow caller to alter

Setting the value of V_WIN_OFF (0x3818) from 0x02 to 0x01 to use GRBG
format still results in wrong color output if data is tuned in BGGR mode
before.

Set default mbus format for the supported modes, but allow the caller of
set(get)_fmt to change the bayer format between BGGR and GRBG.

Set the default mbus format for 3264x2448 (and 1632x1224) to BGGR as the
data sheet states the value of this reg should be 0x02 by default.

If new modes are added in the future, they can add the
mipi_data_mbus_{format} settings into bayer_offset_configs to adjust their
offset regs.

Fixes: 2984b0ddd557 ("media: ov8856: Configure sensor for GRBG Bayer for all modes")
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ov8856.c