All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Robert Foss <robert.foss@linaro.org>
Cc: Alistair Delva <adelva@google.com>,
	jernej.skrabec@siol.net, Vinod Koul <vinod.koul@linaro.org>,
	jonas@kwiboo.se, airlied@linux.ie, narmstrong@baylibre.com,
	Anibal Limon <anibal.limon@linaro.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com,
	Peter Collingbourne <pcc@google.com>
Subject: Re: [PATCH v1] drm/bridge: lt9611: Fix handling of 4k panels
Date: Thu, 10 Dec 2020 18:25:25 -0600	[thread overview]
Message-ID: <X9K8daO5DrKC+Ama@builder.lan> (raw)
In-Reply-To: <20201123104616.1412688-1-robert.foss@linaro.org>

On Mon 23 Nov 04:46 CST 2020, Robert Foss wrote:

> 4k requires two dsi pipes, so don't report MODE_OK when only a
> single pipe is configured. But rather report MODE_PANEL to
> signal that requirements of the panel are not being met.
> 
> Reported-by: Peter Collingbourne <pcc@google.com>
> Suggested-by: Peter Collingbourne <pcc@google.com>
> Signed-off-by: Robert Foss <robert.foss@linaro.org>
> Tested-by: John Stultz <john.stultz@linaro.org>

This looks very similar to what I had in the early revisions of the
driver.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/gpu/drm/bridge/lontium-lt9611.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c
> index d734d9402c35..e8eb8deb444b 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt9611.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt9611.c
> @@ -867,8 +867,14 @@ static enum drm_mode_status lt9611_bridge_mode_valid(struct drm_bridge *bridge,
>  						     const struct drm_display_mode *mode)
>  {
>  	struct lt9611_mode *lt9611_mode = lt9611_find_mode(mode);
> +	struct lt9611 *lt9611 = bridge_to_lt9611(bridge);
>  
> -	return lt9611_mode ? MODE_OK : MODE_BAD;
> +	if (!lt9611_mode)
> +		return MODE_BAD;
> +	else if (lt9611_mode->intfs > 1 && !lt9611->dsi1)
> +		return MODE_PANEL;
> +	else
> +		return MODE_OK;
>  }
>  
>  static void lt9611_bridge_pre_enable(struct drm_bridge *bridge)
> -- 
> 2.27.0
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Robert Foss <robert.foss@linaro.org>
Cc: a.hajda@samsung.com, narmstrong@baylibre.com,
	Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se,
	jernej.skrabec@siol.net, airlied@linux.ie, daniel@ffwll.ch,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	John Stultz <john.stultz@linaro.org>,
	Peter Collingbourne <pcc@google.com>,
	Alistair Delva <adelva@google.com>,
	Vinod Koul <vinod.koul@linaro.org>,
	Anibal Limon <anibal.limon@linaro.org>
Subject: Re: [PATCH v1] drm/bridge: lt9611: Fix handling of 4k panels
Date: Thu, 10 Dec 2020 18:25:25 -0600	[thread overview]
Message-ID: <X9K8daO5DrKC+Ama@builder.lan> (raw)
In-Reply-To: <20201123104616.1412688-1-robert.foss@linaro.org>

On Mon 23 Nov 04:46 CST 2020, Robert Foss wrote:

> 4k requires two dsi pipes, so don't report MODE_OK when only a
> single pipe is configured. But rather report MODE_PANEL to
> signal that requirements of the panel are not being met.
> 
> Reported-by: Peter Collingbourne <pcc@google.com>
> Suggested-by: Peter Collingbourne <pcc@google.com>
> Signed-off-by: Robert Foss <robert.foss@linaro.org>
> Tested-by: John Stultz <john.stultz@linaro.org>

This looks very similar to what I had in the early revisions of the
driver.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/gpu/drm/bridge/lontium-lt9611.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c
> index d734d9402c35..e8eb8deb444b 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt9611.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt9611.c
> @@ -867,8 +867,14 @@ static enum drm_mode_status lt9611_bridge_mode_valid(struct drm_bridge *bridge,
>  						     const struct drm_display_mode *mode)
>  {
>  	struct lt9611_mode *lt9611_mode = lt9611_find_mode(mode);
> +	struct lt9611 *lt9611 = bridge_to_lt9611(bridge);
>  
> -	return lt9611_mode ? MODE_OK : MODE_BAD;
> +	if (!lt9611_mode)
> +		return MODE_BAD;
> +	else if (lt9611_mode->intfs > 1 && !lt9611->dsi1)
> +		return MODE_PANEL;
> +	else
> +		return MODE_OK;
>  }
>  
>  static void lt9611_bridge_pre_enable(struct drm_bridge *bridge)
> -- 
> 2.27.0
> 

  parent reply	other threads:[~2020-12-11  8:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 10:46 [PATCH v1] drm/bridge: lt9611: Fix handling of 4k panels Robert Foss
2020-11-23 10:46 ` Robert Foss
2020-11-23 16:04 ` Anibal Limon
2020-11-23 16:05 ` Vinod Koul
2020-11-23 16:05   ` Vinod Koul
2020-12-10 21:00 ` Peter Collingbourne
2020-12-10 21:00   ` Peter Collingbourne
2020-12-11  0:25 ` Bjorn Andersson [this message]
2020-12-11  0:25   ` Bjorn Andersson

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=X9K8daO5DrKC+Ama@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=adelva@google.com \
    --cc=airlied@linux.ie \
    --cc=anibal.limon@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=pcc@google.com \
    --cc=robert.foss@linaro.org \
    --cc=vinod.koul@linaro.org \
    /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.