diff mbox series

[v2,02/14] media: staging: rkisp1: params: use rkisp1_param_set_bits to set reg in isr

Message ID 20200815103734.31153-3-dafna.hirschfeld@collabora.com (mailing list archive)
State New, archived
Headers show
Series media: staging: rkisp1: various bug fixes | expand

Commit Message

Dafna Hirschfeld Aug. 15, 2020, 10:37 a.m. UTC
replace a read and write of RKISP1_CIF_ISP_CTRL register
in the isr with the 'rkisp1_param_set_bits' function
that does that.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
---
 drivers/staging/media/rkisp1/rkisp1-params.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Helen Mae Koike Fornazier Aug. 17, 2020, 9:46 p.m. UTC | #1
Hi Dafna,

On 8/15/20 7:37 AM, Dafna Hirschfeld wrote:
> replace a read and write of RKISP1_CIF_ISP_CTRL register
> in the isr with the 'rkisp1_param_set_bits' function
> that does that.
> 
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>

Acked-by: Helen Koike <helen.koike@collabora.com>

Thanks
Helen

> ---
>  drivers/staging/media/rkisp1/rkisp1-params.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/media/rkisp1/rkisp1-params.c b/drivers/staging/media/rkisp1/rkisp1-params.c
> index 6d69df36c495..8d881f1df1e6 100644
> --- a/drivers/staging/media/rkisp1/rkisp1-params.c
> +++ b/drivers/staging/media/rkisp1/rkisp1-params.c
> @@ -1199,7 +1199,6 @@ void rkisp1_params_isr(struct rkisp1_device *rkisp1)
>  	struct rkisp1_params *params = &rkisp1->params;
>  	struct rkisp1_params_cfg *new_params;
>  	struct rkisp1_buffer *cur_buf = NULL;
> -	u32 isp_ctrl;
>  
>  	spin_lock(&params->config_lock);
>  	if (!params->is_streaming) {
> @@ -1222,9 +1221,7 @@ void rkisp1_params_isr(struct rkisp1_device *rkisp1)
>  	rkisp1_isp_isr_meas_config(params, new_params);
>  
>  	/* update shadow register immediately */
> -	isp_ctrl = rkisp1_read(params->rkisp1, RKISP1_CIF_ISP_CTRL);
> -	isp_ctrl |= RKISP1_CIF_ISP_CTRL_ISP_CFG_UPD;
> -	rkisp1_write(params->rkisp1, isp_ctrl, RKISP1_CIF_ISP_CTRL);
> +	rkisp1_param_set_bits(params, RKISP1_CIF_ISP_CTRL, RKISP1_CIF_ISP_CTRL_ISP_CFG_UPD);
>  
>  	spin_lock(&params->config_lock);
>  	list_del(&cur_buf->queue);
>
diff mbox series

Patch

diff --git a/drivers/staging/media/rkisp1/rkisp1-params.c b/drivers/staging/media/rkisp1/rkisp1-params.c
index 6d69df36c495..8d881f1df1e6 100644
--- a/drivers/staging/media/rkisp1/rkisp1-params.c
+++ b/drivers/staging/media/rkisp1/rkisp1-params.c
@@ -1199,7 +1199,6 @@  void rkisp1_params_isr(struct rkisp1_device *rkisp1)
 	struct rkisp1_params *params = &rkisp1->params;
 	struct rkisp1_params_cfg *new_params;
 	struct rkisp1_buffer *cur_buf = NULL;
-	u32 isp_ctrl;
 
 	spin_lock(&params->config_lock);
 	if (!params->is_streaming) {
@@ -1222,9 +1221,7 @@  void rkisp1_params_isr(struct rkisp1_device *rkisp1)
 	rkisp1_isp_isr_meas_config(params, new_params);
 
 	/* update shadow register immediately */
-	isp_ctrl = rkisp1_read(params->rkisp1, RKISP1_CIF_ISP_CTRL);
-	isp_ctrl |= RKISP1_CIF_ISP_CTRL_ISP_CFG_UPD;
-	rkisp1_write(params->rkisp1, isp_ctrl, RKISP1_CIF_ISP_CTRL);
+	rkisp1_param_set_bits(params, RKISP1_CIF_ISP_CTRL, RKISP1_CIF_ISP_CTRL_ISP_CFG_UPD);
 
 	spin_lock(&params->config_lock);
 	list_del(&cur_buf->queue);