Skip to content
/ linux Public

Commit 7284c8b

Browse files
Rui WangSasha Levin
authored andcommitted
media: rkisp1: Fix filter mode register configuration
[ Upstream commit 5a50f2b ] 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: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patch.msgid.link/20260105171142.147792-2-rui.wang@ideasonboard.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 796e77c commit 7284c8b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

drivers/media/platform/rockchip/rkisp1/rkisp1-params.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,6 @@ static void rkisp1_flt_config(struct rkisp1_params *params,
385385
rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_LUM_WEIGHT,
386386
arg->lum_weight);
387387

388-
rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE,
389-
(arg->mode ? RKISP1_CIF_ISP_FLT_MODE_DNR : 0) |
390-
RKISP1_CIF_ISP_FLT_CHROMA_V_MODE(arg->chr_v_mode) |
391-
RKISP1_CIF_ISP_FLT_CHROMA_H_MODE(arg->chr_h_mode) |
392-
RKISP1_CIF_ISP_FLT_GREEN_STAGE1(arg->grn_stage1));
393-
394388
/* avoid to override the old enable value */
395389
filt_mode = rkisp1_read(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE);
396390
filt_mode &= RKISP1_CIF_ISP_FLT_ENA;

0 commit comments

Comments
 (0)