* [PATCH v4 0/1] Fix filter mode register issue
@ 2026-01-05 17:11 Rui Wang
2026-01-05 17:11 ` [PATCH v4 1/1] media: rkisp1: Fix filter mode register configuration Rui Wang
0 siblings, 1 reply; 4+ messages in thread
From: Rui Wang @ 2026-01-05 17:11 UTC (permalink / raw)
To: linux-media, dafna, laurent.pinchart, mchehab, heiko,
linux-rockchip, linux-arm-kernel, linux-kernel
Cc: libcamera-devel, Rui Wang
Hi,
This series contains a single patch that fixes an issue in the rkisp1
filter mode configuration logic.
The rkisp1_flt_config() function performs a direct write to the
FILT_MODE register before the read/modify/write update. This write
does not include the RKISP1_CIF_ISP_FLT_ENA bit, which clears the
enable bit in hardware. After that, the read/modify/write sequence
cannot restore the original enable state, causing the filter to be
disabled unintentionally.
The patch removes the redundant direct write. The remaining
read/modify/write sequence correctly updates the mode fields while
preserving the existing enable bit.
Please review.
Thanks,
Rui Wang
Rui Wang (1):
media: rkisp1: Fix filter mode register configuration
drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 6 ------
1 file changed, 6 deletions(-)
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v4 1/1] media: rkisp1: Fix filter mode register configuration
2026-01-05 17:11 [PATCH v4 0/1] Fix filter mode register issue Rui Wang
@ 2026-01-05 17:11 ` Rui Wang
2026-01-06 3:46 ` Laurent Pinchart
2026-01-06 12:25 ` Kieran Bingham
0 siblings, 2 replies; 4+ messages in thread
From: Rui Wang @ 2026-01-05 17:11 UTC (permalink / raw)
To: linux-media, dafna, laurent.pinchart, mchehab, heiko,
linux-rockchip, linux-arm-kernel, linux-kernel
Cc: libcamera-devel, Rui Wang
The rkisp1_flt_config() function performs an initial direct write to
RKISP1_CIF_ISP_FILT_MODE without including the RKISP1_CIF_ISP_FLT_ENA
bit, which clears the filter enable bit in the hardware.
The subsequent read/modify/write sequence then reads back the register
with the enable bit already cleared and cannot restore it, resulting in
the filter being inadvertently disabled.
Remove the redundant direct write. The read/modify/write sequence alone
correctly preserves the existing enable bit state while updating the
DNR mode and filter configuration bits.
Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>
---
Changelog since v1:
1. Update version number from v1 to v4 to clarify the confusing
Reviewed-by Stefan Klug and Kieran Bingham
from v1 are carried over (no function code changes).
drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
index c9f88635224c..6442436a5e42 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
@@ -411,12 +411,6 @@ static void rkisp1_flt_config(struct rkisp1_params *params,
rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_LUM_WEIGHT,
arg->lum_weight);
- rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE,
- (arg->mode ? RKISP1_CIF_ISP_FLT_MODE_DNR : 0) |
- RKISP1_CIF_ISP_FLT_CHROMA_V_MODE(arg->chr_v_mode) |
- RKISP1_CIF_ISP_FLT_CHROMA_H_MODE(arg->chr_h_mode) |
- RKISP1_CIF_ISP_FLT_GREEN_STAGE1(arg->grn_stage1));
-
/* avoid to override the old enable value */
filt_mode = rkisp1_read(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE);
filt_mode &= RKISP1_CIF_ISP_FLT_ENA;
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v4 1/1] media: rkisp1: Fix filter mode register configuration
2026-01-05 17:11 ` [PATCH v4 1/1] media: rkisp1: Fix filter mode register configuration Rui Wang
@ 2026-01-06 3:46 ` Laurent Pinchart
2026-01-06 12:25 ` Kieran Bingham
1 sibling, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2026-01-06 3:46 UTC (permalink / raw)
To: Rui Wang
Cc: linux-media, dafna, mchehab, heiko, linux-rockchip,
linux-arm-kernel, linux-kernel, libcamera-devel
Hi Rui,
Thank you for the patch.
On Mon, Jan 05, 2026 at 12:11:42PM -0500, Rui Wang wrote:
> The rkisp1_flt_config() function performs an initial direct write to
> RKISP1_CIF_ISP_FILT_MODE without including the RKISP1_CIF_ISP_FLT_ENA
> bit, which clears the filter enable bit in the hardware.
>
> The subsequent read/modify/write sequence then reads back the register
> with the enable bit already cleared and cannot restore it, resulting in
> the filter being inadvertently disabled.
>
> Remove the redundant direct write. The read/modify/write sequence alone
> correctly preserves the existing enable bit state while updating the
> DNR mode and filter configuration bits.
>
> Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
and pushed to CI in
https://gitlab.freedesktop.org/linux-media/users/pinchartl/-/pipelines/1578184.
If the pipeline succeeds I'll queue the patch for v6.20. Otherwise I'll
report the failure here.
> ---
>
> Changelog since v1:
> 1. Update version number from v1 to v4 to clarify the confusing
>
> Reviewed-by Stefan Klug and Kieran Bingham
> from v1 are carried over (no function code changes).
>
> drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> index c9f88635224c..6442436a5e42 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> @@ -411,12 +411,6 @@ static void rkisp1_flt_config(struct rkisp1_params *params,
> rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_LUM_WEIGHT,
> arg->lum_weight);
>
> - rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE,
> - (arg->mode ? RKISP1_CIF_ISP_FLT_MODE_DNR : 0) |
> - RKISP1_CIF_ISP_FLT_CHROMA_V_MODE(arg->chr_v_mode) |
> - RKISP1_CIF_ISP_FLT_CHROMA_H_MODE(arg->chr_h_mode) |
> - RKISP1_CIF_ISP_FLT_GREEN_STAGE1(arg->grn_stage1));
> -
> /* avoid to override the old enable value */
> filt_mode = rkisp1_read(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE);
> filt_mode &= RKISP1_CIF_ISP_FLT_ENA;
--
Regards,
Laurent Pinchart
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4 1/1] media: rkisp1: Fix filter mode register configuration
2026-01-05 17:11 ` [PATCH v4 1/1] media: rkisp1: Fix filter mode register configuration Rui Wang
2026-01-06 3:46 ` Laurent Pinchart
@ 2026-01-06 12:25 ` Kieran Bingham
1 sibling, 0 replies; 4+ messages in thread
From: Kieran Bingham @ 2026-01-06 12:25 UTC (permalink / raw)
To: Rui Wang, dafna, heiko, laurent.pinchart, linux-arm-kernel,
linux-kernel, linux-media, linux-rockchip, mchehab
Cc: libcamera-devel, Rui Wang
Quoting Rui Wang (2026-01-05 17:11:42)
> The rkisp1_flt_config() function performs an initial direct write to
> RKISP1_CIF_ISP_FILT_MODE without including the RKISP1_CIF_ISP_FLT_ENA
> bit, which clears the filter enable bit in the hardware.
>
> The subsequent read/modify/write sequence then reads back the register
> with the enable bit already cleared and cannot restore it, resulting in
> the filter being inadvertently disabled.
>
> Remove the redundant direct write. The read/modify/write sequence alone
> correctly preserves the existing enable bit state while updating the
> DNR mode and filter configuration bits.
>
> Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>
> ---
>
> Changelog since v1:
> 1. Update version number from v1 to v4 to clarify the confusing
>
> Reviewed-by Stefan Klug and Kieran Bingham
> from v1 are carried over (no function code changes).
To carry them over you need to include the tags.
From the previous version:
Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>
> drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> index c9f88635224c..6442436a5e42 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> @@ -411,12 +411,6 @@ static void rkisp1_flt_config(struct rkisp1_params *params,
> rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_LUM_WEIGHT,
> arg->lum_weight);
>
> - rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE,
> - (arg->mode ? RKISP1_CIF_ISP_FLT_MODE_DNR : 0) |
> - RKISP1_CIF_ISP_FLT_CHROMA_V_MODE(arg->chr_v_mode) |
> - RKISP1_CIF_ISP_FLT_CHROMA_H_MODE(arg->chr_h_mode) |
> - RKISP1_CIF_ISP_FLT_GREEN_STAGE1(arg->grn_stage1));
> -
> /* avoid to override the old enable value */
> filt_mode = rkisp1_read(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE);
> filt_mode &= RKISP1_CIF_ISP_FLT_ENA;
> --
> 2.43.0
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-06 12:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-05 17:11 [PATCH v4 0/1] Fix filter mode register issue Rui Wang
2026-01-05 17:11 ` [PATCH v4 1/1] media: rkisp1: Fix filter mode register configuration Rui Wang
2026-01-06 3:46 ` Laurent Pinchart
2026-01-06 12:25 ` Kieran Bingham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox