2020-12-17 14:12:48

by Robert Foss

[permalink] [raw]
Subject: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels

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 <[email protected]>
Suggested-by: Peter Collingbourne <[email protected]>
Signed-off-by: Robert Foss <[email protected]>
Tested-by: John Stultz <[email protected]>
Tested-by: Anibal Limon <[email protected]>
Acked-By: Vinod Koul <[email protected]>
Tested-by: Peter Collingbourne <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
---
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


2021-01-21 09:54:25

by Robert Foss

[permalink] [raw]
Subject: Re: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels

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 <[email protected]> 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 <[email protected]>
> Suggested-by: Peter Collingbourne <[email protected]>
> Signed-off-by: Robert Foss <[email protected]>
> Tested-by: John Stultz <[email protected]>
> Tested-by: Anibal Limon <[email protected]>
> Acked-By: Vinod Koul <[email protected]>
> Tested-by: Peter Collingbourne <[email protected]>
> Reviewed-by: Bjorn Andersson <[email protected]>
> ---
> 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
>

2021-03-04 05:21:10

by John Stultz

[permalink] [raw]
Subject: Re: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels

On Thu, Jan 21, 2021 at 1:50 AM Robert Foss <[email protected]> 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 <[email protected]> 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

2021-09-18 07:56:23

by Peter Collingbourne

[permalink] [raw]
Subject: Re: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels

On Thu, Dec 17, 2020 at 6:09 AM Robert Foss <[email protected]> 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 <[email protected]>
> Suggested-by: Peter Collingbourne <[email protected]>
> Signed-off-by: Robert Foss <[email protected]>
> Tested-by: John Stultz <[email protected]>
> Tested-by: Anibal Limon <[email protected]>
> Acked-By: Vinod Koul <[email protected]>
> Tested-by: Peter Collingbourne <[email protected]>
> Reviewed-by: Bjorn Andersson <[email protected]>

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

2021-09-19 00:41:40

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels

On Fri, Sep 17, 2021 at 12:47:05PM -0700, Peter Collingbourne wrote:
> On Thu, Dec 17, 2020 at 6:09 AM Robert Foss <[email protected]> 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 <[email protected]>
> > Suggested-by: Peter Collingbourne <[email protected]>
> > Signed-off-by: Robert Foss <[email protected]>
> > Tested-by: John Stultz <[email protected]>
> > Tested-by: Anibal Limon <[email protected]>
> > Acked-By: Vinod Koul <[email protected]>
> > Tested-by: Peter Collingbourne <[email protected]>
> > Reviewed-by: Bjorn Andersson <[email protected]>
>
> 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