All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Jagan Teki <jagan@amarulasolutions.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Inki Dae <inki.dae@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Fancy Fang <chen.fang@nxp.com>,
	Tim Harvey <tharvey@gateworks.com>,
	Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
	Adam Ford <aford173@gmail.com>,
	Neil Armstrong <narmstrong@linaro.org>,
	Robert Foss <robert.foss@linaro.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
Cc: Matteo Lisi <matteo.lisi@engicam.com>,
	dri-devel@lists.freedesktop.org,
	linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-amarula <linux-amarula@amarulasolutions.com>
Subject: Re: [PATCH v7 05/10] drm: bridge: samsung-dsim: Add atomic_check
Date: Sat, 15 Oct 2022 23:23:01 +0200	[thread overview]
Message-ID: <acc210c6-f3ae-a836-e2fc-5b1872b5bbd7@denx.de> (raw)
In-Reply-To: <20221005151309.7278-6-jagan@amarulasolutions.com>

On 10/5/22 17:13, Jagan Teki wrote:
> Look like an explicit fixing up of mode_flags is required for DSIM IP
> present in i.MX8M Mini/Nano SoCs.
> 
> At least the LCDIF + DSIM needs active low sync polarities in order
> to correlate the correct sync flags of the surrounding components in
> the chain to make sure the whole pipeline can work properly.
> 
> On the other hand the i.MX 8M Mini Applications Processor Reference Manual,
> Rev. 3, 11/2020 says.
> "13.6.3.5.2 RGB interface
>   Vsync, Hsync, and VDEN are active high signals."
> 
> No clear evidence about whether it can be documentation issues or
> something, so added a comment FIXME for this and updated the active low
> sync polarities using SAMSUNG_DSIM_TYPE_IMX8MM hw_type.

[...]

> +static int samsung_dsim_atomic_check(struct drm_bridge *bridge,
> +				     struct drm_bridge_state *bridge_state,
> +				     struct drm_crtc_state *crtc_state,
> +				     struct drm_connector_state *conn_state)
> +{
> +	struct samsung_dsim *dsi = bridge_to_dsi(bridge);
> +	struct drm_display_mode *adjusted_mode = &crtc_state->adjusted_mode;
> +
> +	if (dsi->plat_data->hw_type == SAMSUNG_DSIM_TYPE_IMX8MM) {
> +		/**
> +		 * FIXME:
> +		 * At least LCDIF + DSIM needs active low sync,
> +		 * but i.MX 8M Mini Applications Processor Reference Manual,
> +		 * Rev. 3, 11/2020 says
> +		 *
> +		 * 13.6.3.5.2 RGB interface
> +		 * Vsync, Hsync, and VDEN are active high signals.
> +		 */
> +		adjusted_mode->flags |= (DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC);
> +		adjusted_mode->flags &= ~(DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC);
> +	}

It would be good to explain what exactly is going on here in the 
comment, the comment says "Vsync, Hsync, and VDEN are active high 
signals." and the code below does exact opposite and sets NxSYNC flags.

Yes, the MX8MM/MN does need HS/VS/DE active LOW, it is a quirk of that 
MXSFB-DSIM glue logic. The MX8MP needs the exact opposite on all three, 
active HIGH.

It would also be good to mention both MX8MM and MX8MN are affected, not 
only MX8MM.

WARNING: multiple messages have this Message-ID (diff)
From: Marek Vasut <marex@denx.de>
To: Jagan Teki <jagan@amarulasolutions.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Inki Dae <inki.dae@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Fancy Fang <chen.fang@nxp.com>,
	Tim Harvey <tharvey@gateworks.com>,
	Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
	Adam Ford <aford173@gmail.com>,
	Neil Armstrong <narmstrong@linaro.org>,
	Robert Foss <robert.foss@linaro.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
Cc: linux-samsung-soc@vger.kernel.org,
	Matteo Lisi <matteo.lisi@engicam.com>,
	dri-devel@lists.freedesktop.org,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-amarula <linux-amarula@amarulasolutions.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 05/10] drm: bridge: samsung-dsim: Add atomic_check
Date: Sat, 15 Oct 2022 23:23:01 +0200	[thread overview]
Message-ID: <acc210c6-f3ae-a836-e2fc-5b1872b5bbd7@denx.de> (raw)
In-Reply-To: <20221005151309.7278-6-jagan@amarulasolutions.com>

On 10/5/22 17:13, Jagan Teki wrote:
> Look like an explicit fixing up of mode_flags is required for DSIM IP
> present in i.MX8M Mini/Nano SoCs.
> 
> At least the LCDIF + DSIM needs active low sync polarities in order
> to correlate the correct sync flags of the surrounding components in
> the chain to make sure the whole pipeline can work properly.
> 
> On the other hand the i.MX 8M Mini Applications Processor Reference Manual,
> Rev. 3, 11/2020 says.
> "13.6.3.5.2 RGB interface
>   Vsync, Hsync, and VDEN are active high signals."
> 
> No clear evidence about whether it can be documentation issues or
> something, so added a comment FIXME for this and updated the active low
> sync polarities using SAMSUNG_DSIM_TYPE_IMX8MM hw_type.

[...]

> +static int samsung_dsim_atomic_check(struct drm_bridge *bridge,
> +				     struct drm_bridge_state *bridge_state,
> +				     struct drm_crtc_state *crtc_state,
> +				     struct drm_connector_state *conn_state)
> +{
> +	struct samsung_dsim *dsi = bridge_to_dsi(bridge);
> +	struct drm_display_mode *adjusted_mode = &crtc_state->adjusted_mode;
> +
> +	if (dsi->plat_data->hw_type == SAMSUNG_DSIM_TYPE_IMX8MM) {
> +		/**
> +		 * FIXME:
> +		 * At least LCDIF + DSIM needs active low sync,
> +		 * but i.MX 8M Mini Applications Processor Reference Manual,
> +		 * Rev. 3, 11/2020 says
> +		 *
> +		 * 13.6.3.5.2 RGB interface
> +		 * Vsync, Hsync, and VDEN are active high signals.
> +		 */
> +		adjusted_mode->flags |= (DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC);
> +		adjusted_mode->flags &= ~(DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC);
> +	}

It would be good to explain what exactly is going on here in the 
comment, the comment says "Vsync, Hsync, and VDEN are active high 
signals." and the code below does exact opposite and sets NxSYNC flags.

Yes, the MX8MM/MN does need HS/VS/DE active LOW, it is a quirk of that 
MXSFB-DSIM glue logic. The MX8MP needs the exact opposite on all three, 
active HIGH.

It would also be good to mention both MX8MM and MX8MN are affected, not 
only MX8MM.

WARNING: multiple messages have this Message-ID (diff)
From: Marek Vasut <marex@denx.de>
To: Jagan Teki <jagan@amarulasolutions.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Inki Dae <inki.dae@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Fancy Fang <chen.fang@nxp.com>,
	Tim Harvey <tharvey@gateworks.com>,
	Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
	Adam Ford <aford173@gmail.com>,
	Neil Armstrong <narmstrong@linaro.org>,
	Robert Foss <robert.foss@linaro.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
Cc: Matteo Lisi <matteo.lisi@engicam.com>,
	dri-devel@lists.freedesktop.org,
	linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-amarula <linux-amarula@amarulasolutions.com>
Subject: Re: [PATCH v7 05/10] drm: bridge: samsung-dsim: Add atomic_check
Date: Sat, 15 Oct 2022 23:23:01 +0200	[thread overview]
Message-ID: <acc210c6-f3ae-a836-e2fc-5b1872b5bbd7@denx.de> (raw)
In-Reply-To: <20221005151309.7278-6-jagan@amarulasolutions.com>

On 10/5/22 17:13, Jagan Teki wrote:
> Look like an explicit fixing up of mode_flags is required for DSIM IP
> present in i.MX8M Mini/Nano SoCs.
> 
> At least the LCDIF + DSIM needs active low sync polarities in order
> to correlate the correct sync flags of the surrounding components in
> the chain to make sure the whole pipeline can work properly.
> 
> On the other hand the i.MX 8M Mini Applications Processor Reference Manual,
> Rev. 3, 11/2020 says.
> "13.6.3.5.2 RGB interface
>   Vsync, Hsync, and VDEN are active high signals."
> 
> No clear evidence about whether it can be documentation issues or
> something, so added a comment FIXME for this and updated the active low
> sync polarities using SAMSUNG_DSIM_TYPE_IMX8MM hw_type.

[...]

> +static int samsung_dsim_atomic_check(struct drm_bridge *bridge,
> +				     struct drm_bridge_state *bridge_state,
> +				     struct drm_crtc_state *crtc_state,
> +				     struct drm_connector_state *conn_state)
> +{
> +	struct samsung_dsim *dsi = bridge_to_dsi(bridge);
> +	struct drm_display_mode *adjusted_mode = &crtc_state->adjusted_mode;
> +
> +	if (dsi->plat_data->hw_type == SAMSUNG_DSIM_TYPE_IMX8MM) {
> +		/**
> +		 * FIXME:
> +		 * At least LCDIF + DSIM needs active low sync,
> +		 * but i.MX 8M Mini Applications Processor Reference Manual,
> +		 * Rev. 3, 11/2020 says
> +		 *
> +		 * 13.6.3.5.2 RGB interface
> +		 * Vsync, Hsync, and VDEN are active high signals.
> +		 */
> +		adjusted_mode->flags |= (DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC);
> +		adjusted_mode->flags &= ~(DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC);
> +	}

It would be good to explain what exactly is going on here in the 
comment, the comment says "Vsync, Hsync, and VDEN are active high 
signals." and the code below does exact opposite and sets NxSYNC flags.

Yes, the MX8MM/MN does need HS/VS/DE active LOW, it is a quirk of that 
MXSFB-DSIM glue logic. The MX8MP needs the exact opposite on all three, 
active HIGH.

It would also be good to mention both MX8MM and MX8MN are affected, not 
only MX8MM.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-10-15 21:23 UTC|newest]

Thread overview: 157+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20221005151323eucas1p2c69fc9989b84a9d74d568469ccd81f35@eucas1p2.samsung.com>
2022-10-05 15:12 ` [PATCH v7 00/10] drm: bridge: Add Samsung MIPI DSIM bridge Jagan Teki
2022-10-05 15:12   ` Jagan Teki
2022-10-05 15:12   ` Jagan Teki
2022-10-05 15:13   ` [PATCH v7 01/10] drm: bridge: Add Samsung DSIM bridge driver Jagan Teki
2022-10-15 21:46     ` Marek Vasut
2022-10-15 21:46       ` Marek Vasut
2022-10-15 21:46       ` Marek Vasut
2022-10-17  2:49       ` Jagan Teki
2022-10-17  2:49         ` Jagan Teki
2022-10-17  2:49         ` Jagan Teki
2022-10-17  7:19         ` Marek Vasut
2022-10-17  7:19           ` Marek Vasut
2022-10-17  7:19           ` Marek Vasut
2022-10-17  7:43           ` Jagan Teki
2022-10-17  7:43             ` Jagan Teki
2022-10-17  7:43             ` Jagan Teki
2022-10-17  8:48             ` Marek Vasut
2022-10-17  8:48               ` Marek Vasut
2022-10-17  8:48               ` Marek Vasut
2022-10-17  9:01               ` Marek Szyprowski
2022-10-17  9:01                 ` Marek Szyprowski
2022-10-17  9:01                 ` Marek Szyprowski
2022-10-18  3:05                 ` Jagan Teki
2022-10-18  3:05                   ` Jagan Teki
2022-10-18  3:05                   ` Jagan Teki
2022-10-28 12:12                   ` Jagan Teki
2022-10-28 12:12                     ` Jagan Teki
2022-10-28 12:12                     ` Jagan Teki
2022-10-05 15:13   ` [PATCH v7 02/10] drm: bridge: samsung-dsim: Lookup OF-graph or Child node devices Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-15 21:48     ` Marek Vasut
2022-10-15 21:48       ` Marek Vasut
2022-10-15 21:48       ` Marek Vasut
2022-10-17  2:52       ` Jagan Teki
2022-10-17  2:52         ` Jagan Teki
2022-10-17  2:52         ` Jagan Teki
2022-10-05 15:13   ` [PATCH v7 03/10] drm: bridge: samsung-dsim: Mark PHY as optional Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-15 21:50     ` Marek Vasut
2022-10-15 21:50       ` Marek Vasut
2022-10-15 21:50       ` Marek Vasut
2022-10-05 15:13   ` [PATCH v7 04/10] drm: bridge: samsung-dsim: Handle proper DSI host initialization Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-05 15:13   ` [PATCH v7 05/10] drm: bridge: samsung-dsim: Add atomic_check Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-15 21:23     ` Marek Vasut [this message]
2022-10-15 21:23       ` Marek Vasut
2022-10-15 21:23       ` Marek Vasut
2022-10-17  3:54       ` Jagan Teki
2022-10-17  3:54         ` Jagan Teki
2022-10-17  3:54         ` Jagan Teki
2022-10-17  7:23         ` Marek Vasut
2022-10-17  7:23           ` Marek Vasut
2022-10-17  7:23           ` Marek Vasut
2022-10-17  7:51           ` Jagan Teki
2022-10-17  7:51             ` Jagan Teki
2022-10-17  7:51             ` Jagan Teki
2022-10-05 15:13   ` [PATCH v7 06/10] drm: bridge: samsung-dsim: Add platform PLL_P (PMS_P) offset Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-15 21:56     ` Marek Vasut
2022-10-15 21:56       ` Marek Vasut
2022-10-15 21:56       ` Marek Vasut
2022-10-05 15:13   ` [PATCH v7 07/10] drm: bridge: samsung-dsim: Add atomic_get_input_bus_fmts Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-15 22:01     ` Marek Vasut
2022-10-15 22:01       ` Marek Vasut
2022-10-15 22:01       ` Marek Vasut
2022-10-17  3:58       ` Jagan Teki
2022-10-17  3:58         ` Jagan Teki
2022-10-17  3:58         ` Jagan Teki
2022-10-17  7:24         ` Marek Vasut
2022-10-17  7:24           ` Marek Vasut
2022-10-17  7:24           ` Marek Vasut
2022-11-03  7:40           ` Jagan Teki
2022-11-03  7:40             ` Jagan Teki
2022-11-03  7:40             ` Jagan Teki
2022-11-03 16:03             ` Marek Vasut
2022-11-03 16:03               ` Marek Vasut
2022-11-03 16:03               ` Marek Vasut
2022-11-03  9:39       ` Jagan Teki
2022-11-03  9:39         ` Jagan Teki
2022-11-03  9:39         ` Jagan Teki
2022-11-03 16:02         ` Marek Vasut
2022-11-03 16:02           ` Marek Vasut
2022-11-03 16:02           ` Marek Vasut
2022-11-03 17:27           ` Jagan Teki
2022-11-03 17:27             ` Jagan Teki
2022-11-03 17:27             ` Jagan Teki
2022-11-03 18:58             ` Marek Vasut
2022-11-03 18:58               ` Marek Vasut
2022-11-03 18:58               ` Marek Vasut
2022-11-07 17:00               ` Jagan Teki
2022-11-07 17:00                 ` Jagan Teki
2022-11-07 17:00                 ` Jagan Teki
2022-10-05 15:13   ` [PATCH v7 08/10] drm: bridge: samsung-dsim: Add input_bus_flags Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-15 21:37     ` Marek Vasut
2022-10-15 21:37       ` Marek Vasut
2022-10-15 21:37       ` Marek Vasut
2022-10-05 15:13   ` [PATCH v7 09/10] dt-bindings: display: exynos: dsim: Add NXP i.MX8MM support Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-15 22:02     ` Marek Vasut
2022-10-15 22:02       ` Marek Vasut
2022-10-15 22:02       ` Marek Vasut
2022-10-05 15:13   ` [PATCH v7 10/10] drm: bridge: samsung-dsim: Add " Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-05 15:13     ` Jagan Teki
2022-10-15 21:30     ` Marek Vasut
2022-10-15 21:30       ` Marek Vasut
2022-10-15 21:30       ` Marek Vasut
2022-10-05 20:51   ` [PATCH v7 00/10] drm: bridge: Add Samsung MIPI DSIM bridge Marek Szyprowski
2022-10-05 20:51     ` Marek Szyprowski
2022-10-05 20:51     ` Marek Szyprowski
2022-10-06 14:21     ` Jagan Teki
2022-10-06 14:21       ` Jagan Teki
2022-10-06 14:21       ` Jagan Teki
2022-10-06 15:26     ` Tim Harvey
2022-10-06 15:26       ` Tim Harvey
2022-10-06 15:26       ` Tim Harvey
2022-10-19 10:16   ` Marcel Ziswiler
2022-10-19 10:16     ` Marcel Ziswiler
2022-10-19 10:16     ` Marcel Ziswiler
2022-10-20  9:20   ` Robert Foss
2022-10-20  9:20     ` Robert Foss
2022-10-20  9:20     ` Robert Foss
2022-10-24  8:44   ` Alexander Stein
2022-10-24  8:44     ` Alexander Stein
2022-10-24  8:44     ` Alexander Stein
2022-10-28 14:37   ` Sébastien Szymanski
2022-10-28 14:37     ` Sébastien Szymanski
2022-10-28 14:37     ` Sébastien Szymanski
2022-11-07 16:34   ` Frieder Schrempf
2022-11-07 16:34     ` Frieder Schrempf
2022-11-07 16:34     ` Frieder Schrempf
2022-11-10 15:54     ` Fabio Estevam
2022-11-10 15:54       ` Fabio Estevam
2022-11-10 15:54       ` Fabio Estevam
2022-11-10 16:03       ` Jagan Teki
2022-11-10 16:03         ` Jagan Teki
2022-11-10 16:03         ` Jagan Teki
2022-11-10 16:59         ` Marek Vasut
2022-11-10 16:59           ` Marek Vasut
2022-11-10 16:59           ` Marek Vasut
2022-11-10 17:37           ` Jagan Teki
2022-11-10 17:37             ` Jagan Teki
2022-11-10 17:37             ` Jagan Teki
2022-11-10 17:41             ` Marek Vasut
2022-11-10 17:41               ` Marek Vasut
2022-11-10 17:41               ` Marek Vasut

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=acc210c6-f3ae-a836-e2fc-5b1872b5bbd7@denx.de \
    --to=marex@denx.de \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=aford173@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=chen.fang@nxp.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frieder.schrempf@kontron.de \
    --cc=inki.dae@samsung.com \
    --cc=jagan@amarulasolutions.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=matteo.lisi@engicam.com \
    --cc=michael@amarulasolutions.com \
    --cc=narmstrong@linaro.org \
    --cc=robert.foss@linaro.org \
    --cc=sw0312.kim@samsung.com \
    --cc=tharvey@gateworks.com \
    --cc=tommaso.merciai@amarulasolutions.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.