linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels
@ 2020-12-17 14:09 Robert Foss
  2021-01-21  9:50 ` Robert Foss
  2021-09-17 19:47 ` Peter Collingbourne
  0 siblings, 2 replies; 5+ messages in thread
From: Robert Foss @ 2020-12-17 14:09 UTC (permalink / raw)
  To: a.hajda, narmstrong, Laurent.pinchart, jonas, jernej.skrabec,
	airlied, daniel, dri-devel, linux-kernel, Peter Collingbourne
  Cc: John Stultz, Robert Foss, Anibal Limon, Vinod Koul, Bjorn Andersson

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>
Tested-by: Anibal Limon <anibal.limon@linaro.org>
Acked-By: Vinod Koul <vkoul@kernel.org>
Tested-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels
  2020-12-17 14:09 [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels Robert Foss
@ 2021-01-21  9:50 ` Robert Foss
  2021-03-01 20:32   ` John Stultz
  2021-09-17 19:47 ` Peter Collingbourne
  1 sibling, 1 reply; 5+ messages in thread
From: Robert Foss @ 2021-01-21  9:50 UTC (permalink / raw)
  To: Neil Armstrong, Laurent Pinchart, jonas, jernej.skrabec,
	dri-devel, linux-kernel, a.hajda, Sam Ravnborg
  Cc: John Stultz, Anibal Limon, Vinod Koul, Bjorn Andersson,
	Peter Collingbourne, airlied, Daniel Vetter

Hi,

+Sam Ravnborg

I think this patch is ready to get pulled into the drm-misc tree.

On Thu, 17 Dec 2020 at 15:09, Robert Foss <robert.foss@linaro.org> 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>
> Tested-by: Anibal Limon <anibal.limon@linaro.org>
> Acked-By: Vinod Koul <vkoul@kernel.org>
> Tested-by: Peter Collingbourne <pcc@google.com>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>  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
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels
  2021-01-21  9:50 ` Robert Foss
@ 2021-03-01 20:32   ` John Stultz
  0 siblings, 0 replies; 5+ messages in thread
From: John Stultz @ 2021-03-01 20:32 UTC (permalink / raw)
  To: Robert Foss
  Cc: Neil Armstrong, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	dri-devel, linux-kernel, Andrzej Hajda, Sam Ravnborg,
	Anibal Limon, Vinod Koul, Bjorn Andersson, Peter Collingbourne,
	David Airlie, Daniel Vetter

On Thu, Jan 21, 2021 at 1:50 AM Robert Foss <robert.foss@linaro.org> wrote:
> +Sam Ravnborg
>
> I think this patch is ready to get pulled into the drm-misc tree.
>
> On Thu, 17 Dec 2020 at 15:09, Robert Foss <robert.foss@linaro.org> 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.

Hey All, I just wanted to follow up on this patch as it seems like it
missed 5.12 ?

Just wanted to make sure it didn't slip through the cracks.

thanks
-john

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels
  2020-12-17 14:09 [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels Robert Foss
  2021-01-21  9:50 ` Robert Foss
@ 2021-09-17 19:47 ` Peter Collingbourne
  2021-09-18 12:16   ` Greg KH
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Collingbourne @ 2021-09-17 19:47 UTC (permalink / raw)
  To: Robert Foss
  Cc: a.hajda, Neil Armstrong, Laurent.pinchart, jonas, jernej.skrabec,
	airlied, Daniel Vetter, ML dri-devel, Linux Kernel Mailing List,
	John Stultz, Anibal Limon, Vinod Koul, Bjorn Andersson, # 3.4.x

On Thu, Dec 17, 2020 at 6:09 AM Robert Foss <robert.foss@linaro.org> 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>
> Tested-by: Anibal Limon <anibal.limon@linaro.org>
> Acked-By: Vinod Koul <vkoul@kernel.org>
> Tested-by: Peter Collingbourne <pcc@google.com>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

This landed in commit d1a97648ae028a44536927c87837c45ada7141c9. Since
this is a bug fix I'd like to request it to be applied to the 5.10
stable kernel.

Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels
  2021-09-17 19:47 ` Peter Collingbourne
@ 2021-09-18 12:16   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2021-09-18 12:16 UTC (permalink / raw)
  To: Peter Collingbourne
  Cc: Robert Foss, a.hajda, Neil Armstrong, Laurent.pinchart, jonas,
	jernej.skrabec, airlied, Daniel Vetter, ML dri-devel,
	Linux Kernel Mailing List, John Stultz, Anibal Limon, Vinod Koul,
	Bjorn Andersson, # 3.4.x

On Fri, Sep 17, 2021 at 12:47:05PM -0700, Peter Collingbourne wrote:
> On Thu, Dec 17, 2020 at 6:09 AM Robert Foss <robert.foss@linaro.org> 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>
> > Tested-by: Anibal Limon <anibal.limon@linaro.org>
> > Acked-By: Vinod Koul <vkoul@kernel.org>
> > Tested-by: Peter Collingbourne <pcc@google.com>
> > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> 
> This landed in commit d1a97648ae028a44536927c87837c45ada7141c9. Since
> this is a bug fix I'd like to request it to be applied to the 5.10
> stable kernel.

Now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-18 12:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 14:09 [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels Robert Foss
2021-01-21  9:50 ` Robert Foss
2021-03-01 20:32   ` John Stultz
2021-09-17 19:47 ` Peter Collingbourne
2021-09-18 12:16   ` Greg KH

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).