From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
Rui Miguel Silva <rmfrfs@gmail.com>,
Steve Longerbeam <slongerbeam@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 2/2] staging: media: imx: imx7-mipi-csic: Set PIXEL_MODE for YUV422
Date: Wed, 19 Jan 2022 16:26:33 +0200 [thread overview]
Message-ID: <YegfmRSeLvqy6T9L@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220119112024.11339-3-jacopo@jmondi.org>
Hi Jacopo,
Thank you for the patch.
On Wed, Jan 19, 2022 at 12:20:24PM +0100, Jacopo Mondi wrote:
> Bits 13 and 12 of the ISP_CONFIGn register configure the PIXEL_MODE
> which specifies the sampling size, in pixel component units, on the
> CSI-2 output data interface when data are transferred to memory.
>
> The register description in the chip manual specifies that DUAL mode
> should be used for YUV422 data but does not clarify the reason.
>
> Todo: verify if other YUV formats require the same setting and what is the
> appropriate setting for RAW and sRGB formats.
I'll also test it on i.MX8MM, I recall I had to *not* set
PIXEL_MODE_DUAL on that platform for YUV to work.
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> ---
> drivers/staging/media/imx/imx7-mipi-csis.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
> index cb54bb7491d9..e96989c46479 100644
> --- a/drivers/staging/media/imx/imx7-mipi-csis.c
> +++ b/drivers/staging/media/imx/imx7-mipi-csis.c
> @@ -499,6 +499,10 @@ static void __mipi_csis_set_format(struct csi_state *state)
> /* Color format */
> val = mipi_csis_read(state, MIPI_CSIS_ISP_CONFIG_CH(0));
> val &= ~(MIPI_CSIS_ISPCFG_ALIGN_32BIT | MIPI_CSIS_ISPCFG_FMT_MASK);
> +
> + if (state->csis_fmt->data_type == MIPI_CSI2_DATA_TYPE_YUV422_8)
> + val |= MIPI_CSIS_ISPCFG_PIXEL_MODE_DUAL;
> +
> val |= MIPI_CSIS_ISPCFG_FMT(state->csis_fmt->data_type);
> mipi_csis_write(state, MIPI_CSIS_ISP_CONFIG_CH(0), val);
>
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2022-01-19 14:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 11:20 [PATCH 0/2] staging: media: imx7-mipi-csis: Two small fixes Jacopo Mondi
2022-01-19 11:20 ` [PATCH 1/2] staging: media: imx: imx7-mipi-csic: Resume on debug Jacopo Mondi
2022-01-19 14:24 ` Laurent Pinchart
2022-01-25 3:18 ` Laurent Pinchart
2022-01-25 10:22 ` Jacopo Mondi
2022-01-26 0:28 ` Laurent Pinchart
2022-01-19 11:20 ` [PATCH 2/2] staging: media: imx: imx7-mipi-csic: Set PIXEL_MODE for YUV422 Jacopo Mondi
2022-01-19 14:26 ` Laurent Pinchart [this message]
2022-01-19 16:21 ` [PATCH 0/2] staging: media: imx7-mipi-csis: Two small fixes Rui Miguel Silva
2022-01-21 8:29 ` Jacopo Mondi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YegfmRSeLvqy6T9L@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=jacopo@jmondi.org \
--cc=jbrunet@baylibre.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=rmfrfs@gmail.com \
--cc=slongerbeam@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox