Message ID | 20200402190419.15155-2-dafna.hirschfeld@collabora.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: staging: rkisp1: cap: various fixes for capture formats | expand |
On 4/2/20 4:04 PM, Dafna Hirschfeld wrote: > The value RKISP1_CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP equals BIT(0), > Therefore when writing it to the register there is no need to mask > it first with ~BIT(0). > > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Acked-by: Helen Koike <helen.koike@collabora.com> > --- > drivers/staging/media/rkisp1/rkisp1-capture.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c > index 45d237a77ca4..5700d7be2819 100644 > --- a/drivers/staging/media/rkisp1/rkisp1-capture.c > +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c > @@ -432,8 +432,7 @@ static void rkisp1_mp_config(struct rkisp1_capture *cap) > if (cap->pix.cfg->uv_swap) { > reg = rkisp1_read(rkisp1, RKISP1_CIF_MI_XTD_FORMAT_CTRL); > > - reg = (reg & ~BIT(0)) | > - RKISP1_CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP; > + reg = reg | RKISP1_CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP; > rkisp1_write(rkisp1, reg, RKISP1_CIF_MI_XTD_FORMAT_CTRL); > } > >
Hi Dafna, Thank you for the patch. On Thu, Apr 02, 2020 at 09:04:15PM +0200, Dafna Hirschfeld wrote: > The value RKISP1_CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP equals BIT(0), > Therefore when writing it to the register there is no need to mask > it first with ~BIT(0). > > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> > --- > drivers/staging/media/rkisp1/rkisp1-capture.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c > index 45d237a77ca4..5700d7be2819 100644 > --- a/drivers/staging/media/rkisp1/rkisp1-capture.c > +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c > @@ -432,8 +432,7 @@ static void rkisp1_mp_config(struct rkisp1_capture *cap) > if (cap->pix.cfg->uv_swap) { > reg = rkisp1_read(rkisp1, RKISP1_CIF_MI_XTD_FORMAT_CTRL); > > - reg = (reg & ~BIT(0)) | > - RKISP1_CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP; > + reg = reg | RKISP1_CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP; I'd write this reg |= RKISP1_CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP; Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > rkisp1_write(rkisp1, reg, RKISP1_CIF_MI_XTD_FORMAT_CTRL); > } >
diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c index 45d237a77ca4..5700d7be2819 100644 --- a/drivers/staging/media/rkisp1/rkisp1-capture.c +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c @@ -432,8 +432,7 @@ static void rkisp1_mp_config(struct rkisp1_capture *cap) if (cap->pix.cfg->uv_swap) { reg = rkisp1_read(rkisp1, RKISP1_CIF_MI_XTD_FORMAT_CTRL); - reg = (reg & ~BIT(0)) | - RKISP1_CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP; + reg = reg | RKISP1_CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP; rkisp1_write(rkisp1, reg, RKISP1_CIF_MI_XTD_FORMAT_CTRL); }
The value RKISP1_CIF_MI_XTD_FMT_CTRL_MP_CB_CR_SWAP equals BIT(0), Therefore when writing it to the register there is no need to mask it first with ~BIT(0). Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> --- drivers/staging/media/rkisp1/rkisp1-capture.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)