From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: slongerbeam@gmail.com, p.zabel@pengutronix.de,
shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com,
mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
martin.kepplinger@puri.sm, rmfrfs@gmail.com,
xavier.roumegue@oss.nxp.com, alexander.stein@ew.tq-group.com,
dorota.czaplejewicz@puri.sm, kernel@pengutronix.de,
linux-imx@nxp.com, linux-media@vger.kernel.org,
linux-staging@lists.linux.dev,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 6/8] media: imx: imx-mipi-csis: Set PIXEL_MODE for YUV422
Date: Tue, 15 Feb 2022 09:25:18 +0200 [thread overview]
Message-ID: <YgtVXkc8lcBSTLHy@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220214184318.409208-7-jacopo@jmondi.org>
Hi Jacopo,
Thank you for the patch.
On Mon, Feb 14, 2022 at 07:43:16PM +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.
>
> Verify if other YUV formats require the same setting and what is the
> appropriate setting for RAW and sRGB formats.
If it's an action item, shouldn't it be in a TODO comment in the code
instead ?
While it shouldn't be difficult to test this in RAW8 mode, I'd leave it
for later, as I don't want to get into the rabbit hole of adding
S[RGB]{4}8_0_5X16 or S[RGB]{4}10_0_5X20 formats now :-)
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
> ---
> drivers/media/platform/imx/imx-mipi-csis.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/imx/imx-mipi-csis.c b/drivers/media/platform/imx/imx-mipi-csis.c
> index f433758c8935..98a7538a6ce3 100644
> --- a/drivers/media/platform/imx/imx-mipi-csis.c
> +++ b/drivers/media/platform/imx/imx-mipi-csis.c
> @@ -173,6 +173,7 @@
> #define MIPI_CSIS_ISPCFG_PIXEL_MODE_SINGLE (0 << 12)
> #define MIPI_CSIS_ISPCFG_PIXEL_MODE_DUAL (1 << 12)
> #define MIPI_CSIS_ISPCFG_PIXEL_MODE_QUAD (2 << 12) /* i.MX8M[MNP] only */
> +#define MIPI_CSIS_ISPCFG_PIXEL_MASK (3 << 12)
> #define MIPI_CSIS_ISPCFG_ALIGN_32BIT BIT(11)
> #define MIPI_CSIS_ISPCFG_FMT(fmt) ((fmt) << 2)
> #define MIPI_CSIS_ISPCFG_FMT_MASK (0x3f << 2)
> @@ -506,7 +507,12 @@ 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);
> + val &= ~(MIPI_CSIS_ISPCFG_ALIGN_32BIT | MIPI_CSIS_ISPCFG_FMT_MASK
> + | MIPI_CSIS_ISPCFG_PIXEL_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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-02-15 7:26 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 18:43 [PATCH 0/8] media: imx: Destage imx7-mipi-csis with fixes on top Jacopo Mondi
2022-02-14 18:43 ` [PATCH 1/8] media: imx: De-stage imx7-mipi-csis Jacopo Mondi
2022-02-14 18:43 ` [PATCH 2/8] media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c Jacopo Mondi
2022-02-15 6:58 ` Laurent Pinchart
2022-02-14 18:43 ` [PATCH 3/8] staging: media: imx: Add more compatible strings Jacopo Mondi
2022-02-14 19:15 ` Laurent Pinchart
2022-02-15 8:36 ` Jacopo Mondi
2022-02-15 8:45 ` Laurent Pinchart
2022-02-15 9:17 ` Jacopo Mondi
2022-02-14 18:43 ` [PATCH 4/8] staging: media: imx: Define per-SoC info Jacopo Mondi
2022-02-14 19:20 ` Laurent Pinchart
2022-02-15 8:40 ` Jacopo Mondi
2022-02-14 18:43 ` [PATCH 5/8] staging: media: imx: Use DUAL pixel mode if available Jacopo Mondi
2022-02-15 7:12 ` Laurent Pinchart
2022-02-15 8:59 ` Jacopo Mondi
2022-02-20 13:34 ` Laurent Pinchart
2022-02-14 18:43 ` [PATCH 6/8] media: imx: imx-mipi-csis: Set PIXEL_MODE for YUV422 Jacopo Mondi
2022-02-15 7:25 ` Laurent Pinchart [this message]
2022-02-14 18:43 ` [PATCH 7/8] media: imx: imx-mipi-csis: Add RGB565_1X16 Jacopo Mondi
2022-02-15 7:26 ` Laurent Pinchart
2022-02-14 18:43 ` [PATCH 8/8] media: imx: imx-mipi-csis: Add RGB/BGR888 Jacopo Mondi
2022-02-15 7:46 ` Laurent Pinchart
2022-02-15 21:07 ` Sakari Ailus
2022-02-15 21:52 ` Laurent Pinchart
2022-02-15 23:10 ` Sakari Ailus
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=YgtVXkc8lcBSTLHy@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=dorota.czaplejewicz@puri.sm \
--cc=festevam@gmail.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jacopo@jmondi.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=martin.kepplinger@puri.sm \
--cc=mchehab@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=rmfrfs@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=slongerbeam@gmail.com \
--cc=xavier.roumegue@oss.nxp.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;
as well as URLs for NNTP newsgroup(s).