]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
media: sun4i-csi: Fix data sampling polarity handling
authorChen-Yu Tsai <wens@csie.org>
Sun, 15 Dec 2019 16:59:13 +0000 (17:59 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 24 Feb 2020 15:19:26 +0000 (16:19 +0100)
commitc9043bfe57f200b6c869fd8b7595d098df1940cc
tree80c66e27b7dd4845434c248bf1e63a79affc96de
parent1ebde850d46bc77258d0a94c2b274abb48faae0f
media: sun4i-csi: Fix data sampling polarity handling

BugLink: https://bugs.launchpad.net/bugs/1864488
[ Upstream commit cf9e6d5dbdd56ef2aa72f28c806711c4293c8848 ]

The CLK_POL field specifies whether data is sampled on the falling or
rising edge of PCLK, not whether the data lines are active high or low.
Evidence of this can be found in the timing diagram labeled "horizontal
size setting and pixel clock timing".

Fix the setting by checking the correct flag, V4L2_MBUS_PCLK_SAMPLE_RISING.
While at it, reorder the three polarity flag checks so HSYNC and VSYNC
are grouped together.

Fixes: 577bbf23b758 ("media: sunxi: Add A10 CSI driver")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c