* [PATCH 1/3] media: sun6i: Fix CSI regmap's max_register
[not found] <20190203160358.21050-1-wens@csie.org>
@ 2019-02-03 16:03 ` Chen-Yu Tsai
2019-02-04 8:01 ` Maxime Ripard
0 siblings, 1 reply; 2+ messages in thread
From: Chen-Yu Tsai @ 2019-02-03 16:03 UTC (permalink / raw)
To: Yong Deng, Maxime Ripard, Mauro Carvalho Chehab, Sakari Ailus
Cc: Chen-Yu Tsai, linux-media, linux-arm-kernel, linux-kernel, stable
max_register is currently set to 0x1000. This is beyond the mapped
address range of the hardware, so attempts to dump the regmap from
debugfs would trigger a kernel exception.
Furthermore, the useful registers only occupy a small section at the
beginning of the full range. Change the value to 0x9c, the last known
register on the V3s and H3.
On the A31, the register range is extended to support additional
capture channels. Since this is not yet supported, ignore it for now.
Fixes: 5cc7522d8965 ("media: sun6i: Add support for Allwinner CSI V3s")
Cc: <stable@vger.kernel.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
index ee882b66a5ea..332cf81a7ecf 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
@@ -793,7 +793,7 @@ static const struct regmap_config sun6i_csi_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
.val_bits = 32,
- .max_register = 0x1000,
+ .max_register = 0x9c,
};
static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev,
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] media: sun6i: Fix CSI regmap's max_register
2019-02-03 16:03 ` [PATCH 1/3] media: sun6i: Fix CSI regmap's max_register Chen-Yu Tsai
@ 2019-02-04 8:01 ` Maxime Ripard
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2019-02-04 8:01 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Yong Deng, Mauro Carvalho Chehab, Sakari Ailus, linux-media,
linux-arm-kernel, linux-kernel, stable
[-- Attachment #1: Type: text/plain, Size: 887 bytes --]
On Mon, Feb 04, 2019 at 12:03:56AM +0800, Chen-Yu Tsai wrote:
> max_register is currently set to 0x1000. This is beyond the mapped
> address range of the hardware, so attempts to dump the regmap from
> debugfs would trigger a kernel exception.
>
> Furthermore, the useful registers only occupy a small section at the
> beginning of the full range. Change the value to 0x9c, the last known
> register on the V3s and H3.
>
> On the A31, the register range is extended to support additional
> capture channels. Since this is not yet supported, ignore it for now.
>
> Fixes: 5cc7522d8965 ("media: sun6i: Add support for Allwinner CSI V3s")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-04 8:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190203160358.21050-1-wens@csie.org>
2019-02-03 16:03 ` [PATCH 1/3] media: sun6i: Fix CSI regmap's max_register Chen-Yu Tsai
2019-02-04 8:01 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox