Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Mikko Perttunen <mperttunen@nvidia.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	devicetree@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	Svyatoslav Ryhel <clamor95@gmail.com>
Subject: Re: [PATCH v8 08/12] drm/tegra: output: Make panel parsing configurable
Date: Fri, 27 Nov 2026 14:01:41 +0900	[thread overview]
Message-ID: <YNjEIJ2qT8OQf1jrgwTBHw@nvidia.com> (raw)
In-Reply-To: <20261122081820.53199-9-clamor95@gmail.com>

On Sunday, November 22, 2026 5:18 PM Svyatoslav Ryhel wrote:
> The tegra_output_probe() function performs panel parsing unconditionally,
> even for devices that do not require it or that handle panel parsing on
> their own (like DSI).
> 
> This causes devices with dual DSI panels to fail, because they rely on the
> OF graph to find the secondary DSI controller, whereas
> tegra_output_probe() treats this port as a direct connection to the panel.
> An example of such a device is the Xiaomi Mi Pad. Make panel parsing
> configurable.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>  drivers/gpu/drm/tegra/drm.h    |  2 +-
>  drivers/gpu/drm/tegra/dsi.c    |  2 +-
>  drivers/gpu/drm/tegra/hdmi.c   |  2 +-
>  drivers/gpu/drm/tegra/output.c | 52 ++++++++++++++++++----------------
>  drivers/gpu/drm/tegra/rgb.c    |  2 +-
>  drivers/gpu/drm/tegra/sor.c    |  2 +-
>  6 files changed, 32 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
> index bc720ae8d95e1..e53fe68161cb8 100644
> --- a/drivers/gpu/drm/tegra/drm.h
> +++ b/drivers/gpu/drm/tegra/drm.h
> @@ -156,7 +156,7 @@ static inline struct tegra_output *connector_to_output(struct drm_connector *c)
>  }
>  
>  /* from output.c */
> -int tegra_output_probe(struct tegra_output *output);
> +int tegra_output_probe(struct tegra_output *output, bool get_panel);
>  void tegra_output_remove(struct tegra_output *output);
>  int tegra_output_init(struct drm_device *drm, struct tegra_output *output);
>  void tegra_output_exit(struct tegra_output *output);
> diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
> index b5806a53e75ac..6d6adc485e51e 100644
> --- a/drivers/gpu/drm/tegra/dsi.c
> +++ b/drivers/gpu/drm/tegra/dsi.c
> @@ -1617,7 +1617,7 @@ static int tegra_dsi_probe(struct platform_device *pdev)
>  	if (err < 0)
>  		return err;
>  
> -	err = tegra_output_probe(&dsi->output);
> +	err = tegra_output_probe(&dsi->output, false);
>  	if (err < 0)
>  		return err;
>  
> diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
> index 3a94968bd983a..e8c4347f09e69 100644
> --- a/drivers/gpu/drm/tegra/hdmi.c
> +++ b/drivers/gpu/drm/tegra/hdmi.c
> @@ -1855,7 +1855,7 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
>  
>  	hdmi->output.dev = &pdev->dev;
>  
> -	err = tegra_output_probe(&hdmi->output);
> +	err = tegra_output_probe(&hdmi->output, true);
>  	if (err < 0)
>  		return err;
>  
> diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
> index eebf0ec0eea0a..d7d7f6ce0a8c3 100644
> --- a/drivers/gpu/drm/tegra/output.c
> +++ b/drivers/gpu/drm/tegra/output.c
> @@ -93,7 +93,7 @@ static irqreturn_t hpd_irq(int irq, void *data)
>  	return IRQ_HANDLED;
>  }
>  
> -int tegra_output_probe(struct tegra_output *output)
> +int tegra_output_probe(struct tegra_output *output, bool get_panel)
>  {
>  	struct device_node *ddc, *panel;
>  	const void *edid;
> @@ -103,31 +103,33 @@ int tegra_output_probe(struct tegra_output *output)
>  	if (!output->of_node)
>  		output->of_node = output->dev->of_node;
>  
> -	err = drm_of_find_panel_or_bridge(output->of_node, -1, -1,
> -					  &output->panel, &output->bridge);
> -	if (err && err != -ENODEV)
> -		return err;
> -
> -	panel = of_parse_phandle(output->of_node, "nvidia,panel", 0);
> -	if (panel) {
> -		/*
> -		 * Don't mix nvidia,panel phandle with the graph in a
> -		 * device-tree.
> -		 */
> -		WARN_ON(output->panel || output->bridge);
> -
> -		if (output->panel) {
> -			drm_panel_put(output->panel);
> -			output->panel = NULL;
> -		}
> -
> -		output->panel = of_drm_find_panel(panel);
> -		of_node_put(panel);
> -
> -		if (IS_ERR(output->panel)) {
> -			err = PTR_ERR(output->panel);
> -			output->panel = NULL;
> +	if (get_panel) {
> +		err = drm_of_find_panel_or_bridge(output->of_node, -1, -1,
> +						  &output->panel, &output->bridge);
> +		if (err && err != -ENODEV)
>  			return err;
> +
> +		panel = of_parse_phandle(output->of_node, "nvidia,panel", 0);
> +		if (panel) {
> +			/*
> +			 * Don't mix nvidia,panel phandle with the graph in a
> +			 * device-tree.
> +			 */
> +			WARN_ON(output->panel || output->bridge);
> +
> +			if (output->panel) {
> +				drm_panel_put(output->panel);
> +				output->panel = NULL;
> +			}
> +
> +			output->panel = of_drm_find_panel(panel);
> +			of_node_put(panel);
> +
> +			if (IS_ERR(output->panel)) {
> +				err = PTR_ERR(output->panel);
> +				output->panel = NULL;
> +				return err;
> +			}
>  		}
>  	}
>  
> diff --git a/drivers/gpu/drm/tegra/rgb.c b/drivers/gpu/drm/tegra/rgb.c
> index 40a02cf5939aa..227a178f761bd 100644
> --- a/drivers/gpu/drm/tegra/rgb.c
> +++ b/drivers/gpu/drm/tegra/rgb.c
> @@ -236,7 +236,7 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
>  	rgb->output.of_node = np;
>  	rgb->dc = dc;
>  
> -	err = tegra_output_probe(&rgb->output);
> +	err = tegra_output_probe(&rgb->output, true);
>  	if (err < 0)
>  		return err;
>  
> diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
> index 061c5dbb738be..ebac9068b670f 100644
> --- a/drivers/gpu/drm/tegra/sor.c
> +++ b/drivers/gpu/drm/tegra/sor.c
> @@ -3803,7 +3803,7 @@ static int tegra_sor_probe(struct platform_device *pdev)
>  	if (err < 0)
>  		goto put_aux;
>  
> -	err = tegra_output_probe(&sor->output);
> +	err = tegra_output_probe(&sor->output, true);
>  	if (err < 0) {
>  		dev_err_probe(&pdev->dev, err, "failed to probe output\n");
>  		goto put_aux;
> -- 
> 2.53.0
> 
> 

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>




  reply	other threads:[~2026-11-27  5:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22  8:18 [PATCH v8 00/12] drm/tegra: Add support for Tegra20/Tegra30 8-bit CPU interface Svyatoslav Ryhel
2026-11-22  8:18 ` [PATCH v8 01/12] drm: Add MIPI DBI bus support for MIPI DBI Type A and B Svyatoslav Ryhel
2026-11-27  4:16   ` Mikko Perttunen
2026-11-22  8:18 ` [PATCH v8 02/12] drm/panel: panel-hitachi-tx10d07vm0baa: Convert to use MIPI DBI bus Svyatoslav Ryhel
2026-11-27  4:23   ` Mikko Perttunen
2026-11-22  8:18 ` [PATCH v8 03/12] drm/panel: panel-hitachi-tx10d07vm0baa: Convert to mipi_dbi_write_seq_multi() Svyatoslav Ryhel
2026-11-27  4:40   ` Mikko Perttunen
2026-11-22  8:18 ` [PATCH v8 04/12] drm/panel: panel-lg-lh400wv3: Convert to use MIPI DBI bus Svyatoslav Ryhel
2026-11-22  8:18 ` [PATCH v8 05/12] drm/panel: panel-lg-lh400wv3: Convert to mipi_dbi_write_seq_multi() Svyatoslav Ryhel
2026-11-27  4:40   ` Mikko Perttunen
2026-11-22  8:18 ` [PATCH v8 06/12] drm/tegra: dc: Add elements required by Tegra MIPI DBI Svyatoslav Ryhel
2026-11-27  4:56   ` Mikko Perttunen
2026-11-22  8:18 ` [PATCH v8 07/12] dt-bindings: display: tegra: Document Tegra20 DSI port Svyatoslav Ryhel
2026-11-22  8:18 ` [PATCH v8 08/12] drm/tegra: output: Make panel parsing configurable Svyatoslav Ryhel
2026-11-27  5:01   ` Mikko Perttunen [this message]
2026-11-22  8:18 ` [PATCH v8 09/12] drm/tegra: Convert to use atomic versions of drm_encoder_helper_funcs Svyatoslav Ryhel
2026-11-27  5:24   ` Mikko Perttunen
2026-11-22  8:18 ` [PATCH v8 10/12] drm/tegra: rgb: Parameterize configuration based on bus flags Svyatoslav Ryhel
2026-11-22  8:18 ` [PATCH v8 11/12] dt-bindings: display: tegra: Document 8-bit CPU parallel interface Svyatoslav Ryhel
2026-11-22  8:18 ` [PATCH v8 12/12] drm/tegra: Add support for 8-bit CPU interface Svyatoslav Ryhel

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=YNjEIJ2qT8OQf1jrgwTBHw@nvidia.com \
    --to=mperttunen@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=clamor95@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jesszhan0024@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=thierry.reding@kernel.org \
    --cc=tzimmermann@suse.de \
    /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