diff mbox series

drm/panel: panel-dsi-cm: disable TE for now

Message ID 20210227214542.99961-1-sebastian.reichel@collabora.com (mailing list archive)
State New, archived
Headers show
Series drm/panel: panel-dsi-cm: disable TE for now | expand

Commit Message

Sebastian Reichel Feb. 27, 2021, 9:45 p.m. UTC
From: Sebastian Reichel <sre@kernel.org>

Disable TE for Droid 4 panel, since implementation is currently
broken. Also disable it for N950 panel, which is untested.

Reported-by: Tony Lindgren <tony@atomide.com>
Reported-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Fixes: 4c1b935fea54 ("drm/omap: dsi: move TE GPIO handling into core")
Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
I suggest to start by fix the regression like this and look into
proper Droid 4 TE support separatly. Assumption is, that Tomi
tested taal panel, droid4 panel is 'broken' and N950 (himalaya)
is untested [*], so choosing safe default. Patch is compile-tested
only.

[*] N950 display is not yet functional on mainline, since it needs
the omap3 FIFO workaround:
https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-n900.git/commit/?h=n950-display-tony&id=d4cbc226a30b29bf2583ffff97b052c9ec68c8a3
---
 drivers/gpu/drm/panel/panel-dsi-cm.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Comments

Tony Lindgren Feb. 28, 2021, 9:20 a.m. UTC | #1
* Sebastian Reichel <sebastian.reichel@collabora.com> [210227 21:51]:
> From: Sebastian Reichel <sre@kernel.org>
> 
> Disable TE for Droid 4 panel, since implementation is currently
> broken. Also disable it for N950 panel, which is untested.
> 
> Reported-by: Tony Lindgren <tony@atomide.com>
> Reported-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> Fixes: 4c1b935fea54 ("drm/omap: dsi: move TE GPIO handling into core")
> Signed-off-by: Sebastian Reichel <sre@kernel.org>
> ---
> I suggest to start by fix the regression like this and look into
> proper Droid 4 TE support separatly. Assumption is, that Tomi
> tested taal panel, droid4 panel is 'broken' and N950 (himalaya)
> is untested [*], so choosing safe default. Patch is compile-tested
> only.

Makes sense to me and fixes the regression:

Tested-by: Tony Lindgren <tony@atomide.com>
Tomi Valkeinen March 3, 2021, 6:44 a.m. UTC | #2
On 27/02/2021 23:45, Sebastian Reichel wrote:
> From: Sebastian Reichel <sre@kernel.org>
> 
> Disable TE for Droid 4 panel, since implementation is currently
> broken. Also disable it for N950 panel, which is untested.
> 
> Reported-by: Tony Lindgren <tony@atomide.com>
> Reported-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> Fixes: 4c1b935fea54 ("drm/omap: dsi: move TE GPIO handling into core")
> Signed-off-by: Sebastian Reichel <sre@kernel.org>
> ---
> I suggest to start by fix the regression like this and look into
> proper Droid 4 TE support separatly. Assumption is, that Tomi
> tested taal panel, droid4 panel is 'broken' and N950 (himalaya)
> is untested [*], so choosing safe default. Patch is compile-tested
> only.
> 
> [*] N950 display is not yet functional on mainline, since it needs
> the omap3 FIFO workaround:
> https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-n900.git/commit/?h=n950-display-tony&id=d4cbc226a30b29bf2583ffff97b052c9ec68c8a3
> ---
>   drivers/gpu/drm/panel/panel-dsi-cm.c | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

  Tomi
Tomi Valkeinen March 16, 2021, 2:11 p.m. UTC | #3
Hi Sebastian, Sam, Thierry,

On 27/02/2021 23:45, Sebastian Reichel wrote:
> From: Sebastian Reichel <sre@kernel.org>
> 
> Disable TE for Droid 4 panel, since implementation is currently
> broken. Also disable it for N950 panel, which is untested.
> 
> Reported-by: Tony Lindgren <tony@atomide.com>
> Reported-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> Fixes: 4c1b935fea54 ("drm/omap: dsi: move TE GPIO handling into core")
> Signed-off-by: Sebastian Reichel <sre@kernel.org>
> ---
> I suggest to start by fix the regression like this and look into
> proper Droid 4 TE support separatly. Assumption is, that Tomi
> tested taal panel, droid4 panel is 'broken' and N950 (himalaya)
> is untested [*], so choosing safe default. Patch is compile-tested
> only.
> 
> [*] N950 display is not yet functional on mainline, since it needs
> the omap3 FIFO workaround:
> https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-n900.git/commit/?h=n950-display-tony&id=d4cbc226a30b29bf2583ffff97b052c9ec68c8a3
> ---
>   drivers/gpu/drm/panel/panel-dsi-cm.c | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

Sam, Thierry, will you pick this up or can I push to drm-misc-fixes?

  Tomi

> diff --git a/drivers/gpu/drm/panel/panel-dsi-cm.c b/drivers/gpu/drm/panel/panel-dsi-cm.c
> index af381d756ac1..5fbfb71ca3d9 100644
> --- a/drivers/gpu/drm/panel/panel-dsi-cm.c
> +++ b/drivers/gpu/drm/panel/panel-dsi-cm.c
> @@ -37,6 +37,7 @@ struct dsic_panel_data {
>   	u32 height_mm;
>   	u32 max_hs_rate;
>   	u32 max_lp_rate;
> +	bool te_support;
>   };
>   
>   struct panel_drv_data {
> @@ -334,9 +335,11 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
>   	if (r)
>   		goto err;
>   
> -	r = mipi_dsi_dcs_set_tear_on(ddata->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
> -	if (r)
> -		goto err;
> +	if (ddata->panel_data->te_support) {
> +		r = mipi_dsi_dcs_set_tear_on(ddata->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
> +		if (r)
> +			goto err;
> +	}
>   
>   	/* possible panel bug */
>   	msleep(100);
> @@ -619,6 +622,7 @@ static const struct dsic_panel_data taal_data = {
>   	.height_mm = 0,
>   	.max_hs_rate = 300000000,
>   	.max_lp_rate = 10000000,
> +	.te_support = true,
>   };
>   
>   static const struct dsic_panel_data himalaya_data = {
> @@ -629,6 +633,7 @@ static const struct dsic_panel_data himalaya_data = {
>   	.height_mm = 88,
>   	.max_hs_rate = 300000000,
>   	.max_lp_rate = 10000000,
> +	.te_support = false,
>   };
>   
>   static const struct dsic_panel_data droid4_data = {
> @@ -639,6 +644,7 @@ static const struct dsic_panel_data droid4_data = {
>   	.height_mm = 89,
>   	.max_hs_rate = 300000000,
>   	.max_lp_rate = 10000000,
> +	.te_support = false,
>   };
>   
>   static const struct of_device_id dsicm_of_match[] = {
>
Tony Lindgren April 6, 2021, 7:03 a.m. UTC | #4
Hi,

* Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> [210316 14:12]:
> Hi Sebastian, Sam, Thierry,
> 
> On 27/02/2021 23:45, Sebastian Reichel wrote:
> > From: Sebastian Reichel <sre@kernel.org>
> > 
> > Disable TE for Droid 4 panel, since implementation is currently
> > broken. Also disable it for N950 panel, which is untested.
> > 
> > Reported-by: Tony Lindgren <tony@atomide.com>
> > Reported-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> > Fixes: 4c1b935fea54 ("drm/omap: dsi: move TE GPIO handling into core")
> > Signed-off-by: Sebastian Reichel <sre@kernel.org>
> > ---
> > I suggest to start by fix the regression like this and look into
> > proper Droid 4 TE support separatly. Assumption is, that Tomi
> > tested taal panel, droid4 panel is 'broken' and N950 (himalaya)
> > is untested [*], so choosing safe default. Patch is compile-tested
> > only.
> > 
> > [*] N950 display is not yet functional on mainline, since it needs
> > the omap3 FIFO workaround:
> > https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-n900.git/commit/?h=n950-display-tony&id=d4cbc226a30b29bf2583ffff97b052c9ec68c8a3
> > ---
> >   drivers/gpu/drm/panel/panel-dsi-cm.c | 12 +++++++++---
> >   1 file changed, 9 insertions(+), 3 deletions(-)
> 
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> 
> Sam, Thierry, will you pick this up or can I push to drm-misc-fixes?

Looks like this regression fix is still pending, can you guys please
apply?

Regards,

Tony


> > diff --git a/drivers/gpu/drm/panel/panel-dsi-cm.c b/drivers/gpu/drm/panel/panel-dsi-cm.c
> > index af381d756ac1..5fbfb71ca3d9 100644
> > --- a/drivers/gpu/drm/panel/panel-dsi-cm.c
> > +++ b/drivers/gpu/drm/panel/panel-dsi-cm.c
> > @@ -37,6 +37,7 @@ struct dsic_panel_data {
> >   	u32 height_mm;
> >   	u32 max_hs_rate;
> >   	u32 max_lp_rate;
> > +	bool te_support;
> >   };
> >   struct panel_drv_data {
> > @@ -334,9 +335,11 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
> >   	if (r)
> >   		goto err;
> > -	r = mipi_dsi_dcs_set_tear_on(ddata->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
> > -	if (r)
> > -		goto err;
> > +	if (ddata->panel_data->te_support) {
> > +		r = mipi_dsi_dcs_set_tear_on(ddata->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
> > +		if (r)
> > +			goto err;
> > +	}
> >   	/* possible panel bug */
> >   	msleep(100);
> > @@ -619,6 +622,7 @@ static const struct dsic_panel_data taal_data = {
> >   	.height_mm = 0,
> >   	.max_hs_rate = 300000000,
> >   	.max_lp_rate = 10000000,
> > +	.te_support = true,
> >   };
> >   static const struct dsic_panel_data himalaya_data = {
> > @@ -629,6 +633,7 @@ static const struct dsic_panel_data himalaya_data = {
> >   	.height_mm = 88,
> >   	.max_hs_rate = 300000000,
> >   	.max_lp_rate = 10000000,
> > +	.te_support = false,
> >   };
> >   static const struct dsic_panel_data droid4_data = {
> > @@ -639,6 +644,7 @@ static const struct dsic_panel_data droid4_data = {
> >   	.height_mm = 89,
> >   	.max_hs_rate = 300000000,
> >   	.max_lp_rate = 10000000,
> > +	.te_support = false,
> >   };
> >   static const struct of_device_id dsicm_of_match[] = {
> > 
>
Thierry Reding April 6, 2021, 1:51 p.m. UTC | #5
On Tue, Mar 16, 2021 at 04:11:30PM +0200, Tomi Valkeinen wrote:
> Hi Sebastian, Sam, Thierry,
> 
> On 27/02/2021 23:45, Sebastian Reichel wrote:
> > From: Sebastian Reichel <sre@kernel.org>
> > 
> > Disable TE for Droid 4 panel, since implementation is currently
> > broken. Also disable it for N950 panel, which is untested.
> > 
> > Reported-by: Tony Lindgren <tony@atomide.com>
> > Reported-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> > Fixes: 4c1b935fea54 ("drm/omap: dsi: move TE GPIO handling into core")
> > Signed-off-by: Sebastian Reichel <sre@kernel.org>
> > ---
> > I suggest to start by fix the regression like this and look into
> > proper Droid 4 TE support separatly. Assumption is, that Tomi
> > tested taal panel, droid4 panel is 'broken' and N950 (himalaya)
> > is untested [*], so choosing safe default. Patch is compile-tested
> > only.
> > 
> > [*] N950 display is not yet functional on mainline, since it needs
> > the omap3 FIFO workaround:
> > https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-n900.git/commit/?h=n950-display-tony&id=d4cbc226a30b29bf2583ffff97b052c9ec68c8a3
> > ---
> >   drivers/gpu/drm/panel/panel-dsi-cm.c | 12 +++++++++---
> >   1 file changed, 9 insertions(+), 3 deletions(-)
> 
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> 
> Sam, Thierry, will you pick this up or can I push to drm-misc-fixes?

Sorry, I had missed this. Feel free to take this through drm-misc
yourself:

Acked-by: Thierry Reding <treding@nvidia.com>
Tomi Valkeinen April 6, 2021, 2:54 p.m. UTC | #6
On 06/04/2021 16:51, Thierry Reding wrote:
> On Tue, Mar 16, 2021 at 04:11:30PM +0200, Tomi Valkeinen wrote:
>> Hi Sebastian, Sam, Thierry,
>>
>> On 27/02/2021 23:45, Sebastian Reichel wrote:
>>> From: Sebastian Reichel <sre@kernel.org>
>>>
>>> Disable TE for Droid 4 panel, since implementation is currently
>>> broken. Also disable it for N950 panel, which is untested.
>>>
>>> Reported-by: Tony Lindgren <tony@atomide.com>
>>> Reported-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>>> Fixes: 4c1b935fea54 ("drm/omap: dsi: move TE GPIO handling into core")
>>> Signed-off-by: Sebastian Reichel <sre@kernel.org>
>>> ---
>>> I suggest to start by fix the regression like this and look into
>>> proper Droid 4 TE support separatly. Assumption is, that Tomi
>>> tested taal panel, droid4 panel is 'broken' and N950 (himalaya)
>>> is untested [*], so choosing safe default. Patch is compile-tested
>>> only.
>>>
>>> [*] N950 display is not yet functional on mainline, since it needs
>>> the omap3 FIFO workaround:
>>> https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-n900.git/commit/?h=n950-display-tony&id=d4cbc226a30b29bf2583ffff97b052c9ec68c8a3
>>> ---
>>>    drivers/gpu/drm/panel/panel-dsi-cm.c | 12 +++++++++---
>>>    1 file changed, 9 insertions(+), 3 deletions(-)
>>
>> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>>
>> Sam, Thierry, will you pick this up or can I push to drm-misc-fixes?
> 
> Sorry, I had missed this. Feel free to take this through drm-misc
> yourself:
> 
> Acked-by: Thierry Reding <treding@nvidia.com>

Thanks! I have pushed this to drm-misc-fixes.

  Tomi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-dsi-cm.c b/drivers/gpu/drm/panel/panel-dsi-cm.c
index af381d756ac1..5fbfb71ca3d9 100644
--- a/drivers/gpu/drm/panel/panel-dsi-cm.c
+++ b/drivers/gpu/drm/panel/panel-dsi-cm.c
@@ -37,6 +37,7 @@  struct dsic_panel_data {
 	u32 height_mm;
 	u32 max_hs_rate;
 	u32 max_lp_rate;
+	bool te_support;
 };
 
 struct panel_drv_data {
@@ -334,9 +335,11 @@  static int dsicm_power_on(struct panel_drv_data *ddata)
 	if (r)
 		goto err;
 
-	r = mipi_dsi_dcs_set_tear_on(ddata->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
-	if (r)
-		goto err;
+	if (ddata->panel_data->te_support) {
+		r = mipi_dsi_dcs_set_tear_on(ddata->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
+		if (r)
+			goto err;
+	}
 
 	/* possible panel bug */
 	msleep(100);
@@ -619,6 +622,7 @@  static const struct dsic_panel_data taal_data = {
 	.height_mm = 0,
 	.max_hs_rate = 300000000,
 	.max_lp_rate = 10000000,
+	.te_support = true,
 };
 
 static const struct dsic_panel_data himalaya_data = {
@@ -629,6 +633,7 @@  static const struct dsic_panel_data himalaya_data = {
 	.height_mm = 88,
 	.max_hs_rate = 300000000,
 	.max_lp_rate = 10000000,
+	.te_support = false,
 };
 
 static const struct dsic_panel_data droid4_data = {
@@ -639,6 +644,7 @@  static const struct dsic_panel_data droid4_data = {
 	.height_mm = 89,
 	.max_hs_rate = 300000000,
 	.max_lp_rate = 10000000,
+	.te_support = false,
 };
 
 static const struct of_device_id dsicm_of_match[] = {