All of lore.kernel.org
 help / color / mirror / Atom feed
* omapdrm regression in v4.17-rc series
@ 2018-05-23 22:03 Tony Lindgren
  2018-05-24  7:58   ` Tomi Valkeinen
  0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2018-05-23 22:03 UTC (permalink / raw)
  To: Laurent Pinchart, Tomi Valkeinen
  Cc: Aaro Koskinen, ivo.g.dimitrov.75, abcloriens, sre, martijn,
	filip.matijevic.pz, Thorsten Leemhuis, clayton, patrikbachan,
	serge, linux-omap, linux-kernel, dri-devel

Hi all,

I bisected the n900 LCD issue to commit 24aac6011f70 ("drm: omapdrm:
sdi: Allocate the sdi private data structure dynamically"). Reverting
this patch makes LCD work for me again on n900.

Any ideas?

Regards,

Tony

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

* Re: omapdrm regression in v4.17-rc series
  2018-05-23 22:03 omapdrm regression in v4.17-rc series Tony Lindgren
@ 2018-05-24  7:58   ` Tomi Valkeinen
  0 siblings, 0 replies; 8+ messages in thread
From: Tomi Valkeinen @ 2018-05-24  7:58 UTC (permalink / raw)
  To: Tony Lindgren, Laurent Pinchart, Aaro Koskinen
  Cc: ivo.g.dimitrov.75, abcloriens, sre, martijn, filip.matijevic.pz,
	Thorsten Leemhuis, clayton, patrikbachan, serge, linux-omap,
	linux-kernel, dri-devel


On 24/05/18 01:03, Tony Lindgren wrote:
> Hi all,
> 
> I bisected the n900 LCD issue to commit 24aac6011f70 ("drm: omapdrm:
> sdi: Allocate the sdi private data structure dynamically"). Reverting
> this patch makes LCD work for me again on n900.
> 
> Any ideas?

This should help to get the SDI enabled.

 Tomi

>From 4e96e6c2dedf366e081331c3825ff6fa8aabd85c Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 24 May 2018 10:53:24 +0300
Subject: [PATCH] drm/omap: fix NULL deref crash with SDI displays

Fix a NULL deref bug introduced in commit 24aac6011f70 ("drm: omapdrm:
sdi: Allocate the sdi private data structure dynamically").

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/gpu/drm/omapdrm/dss/sdi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c
index 68a40ae26f5b..1e2c931f6acf 100644
--- a/drivers/gpu/drm/omapdrm/dss/sdi.c
+++ b/drivers/gpu/drm/omapdrm/dss/sdi.c
@@ -82,7 +82,7 @@ static int sdi_calc_clock_div(struct sdi_device *sdi, unsigned long pclk,
 			      struct dispc_clock_info *dispc_cinfo)
 {
 	int i;
-	struct sdi_clk_calc_ctx ctx = { .sdi = sdi };
+	struct sdi_clk_calc_ctx ctx;
 
 	/*
 	 * DSS fclk gives us very few possibilities, so finding a good pixel
@@ -95,6 +95,9 @@ static int sdi_calc_clock_div(struct sdi_device *sdi, unsigned long pclk,
 		bool ok;
 
 		memset(&ctx, 0, sizeof(ctx));
+
+		ctx.sdi = sdi;
+
 		if (pclk > 1000 * i * i * i)
 			ctx.pck_min = max(pclk - 1000 * i * i * i, 0lu);
 		else

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

* Re: omapdrm regression in v4.17-rc series
@ 2018-05-24  7:58   ` Tomi Valkeinen
  0 siblings, 0 replies; 8+ messages in thread
From: Tomi Valkeinen @ 2018-05-24  7:58 UTC (permalink / raw)
  To: Tony Lindgren, Laurent Pinchart, Aaro Koskinen
  Cc: ivo.g.dimitrov.75, abcloriens, sre, martijn, filip.matijevic.pz,
	Thorsten Leemhuis, clayton, patrikbachan, serge, linux-omap,
	linux-kernel, dri-devel


On 24/05/18 01:03, Tony Lindgren wrote:
> Hi all,
> 
> I bisected the n900 LCD issue to commit 24aac6011f70 ("drm: omapdrm:
> sdi: Allocate the sdi private data structure dynamically"). Reverting
> this patch makes LCD work for me again on n900.
> 
> Any ideas?

This should help to get the SDI enabled.

 Tomi

>From 4e96e6c2dedf366e081331c3825ff6fa8aabd85c Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 24 May 2018 10:53:24 +0300
Subject: [PATCH] drm/omap: fix NULL deref crash with SDI displays

Fix a NULL deref bug introduced in commit 24aac6011f70 ("drm: omapdrm:
sdi: Allocate the sdi private data structure dynamically").

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/gpu/drm/omapdrm/dss/sdi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c
index 68a40ae26f5b..1e2c931f6acf 100644
--- a/drivers/gpu/drm/omapdrm/dss/sdi.c
+++ b/drivers/gpu/drm/omapdrm/dss/sdi.c
@@ -82,7 +82,7 @@ static int sdi_calc_clock_div(struct sdi_device *sdi, unsigned long pclk,
 			      struct dispc_clock_info *dispc_cinfo)
 {
 	int i;
-	struct sdi_clk_calc_ctx ctx = { .sdi = sdi };
+	struct sdi_clk_calc_ctx ctx;
 
 	/*
 	 * DSS fclk gives us very few possibilities, so finding a good pixel
@@ -95,6 +95,9 @@ static int sdi_calc_clock_div(struct sdi_device *sdi, unsigned long pclk,
 		bool ok;
 
 		memset(&ctx, 0, sizeof(ctx));
+
+		ctx.sdi = sdi;
+
 		if (pclk > 1000 * i * i * i)
 			ctx.pck_min = max(pclk - 1000 * i * i * i, 0lu);
 		else

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

* Re: omapdrm regression in v4.17-rc series
  2018-05-24  7:58   ` Tomi Valkeinen
  (?)
@ 2018-05-24 13:54   ` Tony Lindgren
  2018-05-24 16:22       ` Tomi Valkeinen
  -1 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2018-05-24 13:54 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Laurent Pinchart, Aaro Koskinen, ivo.g.dimitrov.75, abcloriens,
	sre, martijn, filip.matijevic.pz, Thorsten Leemhuis, clayton,
	patrikbachan, serge, linux-omap, linux-kernel, dri-devel

* Tomi Valkeinen <tomi.valkeinen@ti.com> [180524 08:00]:
> 
> On 24/05/18 01:03, Tony Lindgren wrote:
> > Hi all,
> > 
> > I bisected the n900 LCD issue to commit 24aac6011f70 ("drm: omapdrm:
> > sdi: Allocate the sdi private data structure dynamically"). Reverting
> > this patch makes LCD work for me again on n900.
> > 
> > Any ideas?
> 
> This should help to get the SDI enabled.

Thanks yes that fixes it:

Fixes: 24aac6011f70 ("drm: omapdrm: sdi: Allocate the sdi private data
structure dynamically")
Reported-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>

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

* Re: omapdrm regression in v4.17-rc series
  2018-05-24  7:58   ` Tomi Valkeinen
@ 2018-05-24 16:06     ` Benoit Parrot
  -1 siblings, 0 replies; 8+ messages in thread
From: Benoit Parrot @ 2018-05-24 16:06 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Tony Lindgren, Laurent Pinchart, Aaro Koskinen,
	ivo.g.dimitrov.75, abcloriens, sre, dri-devel, linux-kernel,
	martijn, filip.matijevic.pz, Thorsten Leemhuis, clayton,
	linux-omap, patrikbachan, serge

Reviewed-by: Benoit Parrot <bparrot@ti.com>

Tomi Valkeinen <tomi.valkeinen@ti.com> wrote on Thu [2018-May-24 10:58:25 +0300]:
> 
> On 24/05/18 01:03, Tony Lindgren wrote:
> > Hi all,
> > 
> > I bisected the n900 LCD issue to commit 24aac6011f70 ("drm: omapdrm:
> > sdi: Allocate the sdi private data structure dynamically"). Reverting
> > this patch makes LCD work for me again on n900.
> > 
> > Any ideas?
> 
> This should help to get the SDI enabled.
> 
>  Tomi
> 
> From 4e96e6c2dedf366e081331c3825ff6fa8aabd85c Mon Sep 17 00:00:00 2001
> From: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Date: Thu, 24 May 2018 10:53:24 +0300
> Subject: [PATCH] drm/omap: fix NULL deref crash with SDI displays
> 
> Fix a NULL deref bug introduced in commit 24aac6011f70 ("drm: omapdrm:
> sdi: Allocate the sdi private data structure dynamically").
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>  drivers/gpu/drm/omapdrm/dss/sdi.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c
> index 68a40ae26f5b..1e2c931f6acf 100644
> --- a/drivers/gpu/drm/omapdrm/dss/sdi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c
> @@ -82,7 +82,7 @@ static int sdi_calc_clock_div(struct sdi_device *sdi, unsigned long pclk,
>  			      struct dispc_clock_info *dispc_cinfo)
>  {
>  	int i;
> -	struct sdi_clk_calc_ctx ctx = { .sdi = sdi };
> +	struct sdi_clk_calc_ctx ctx;
>  
>  	/*
>  	 * DSS fclk gives us very few possibilities, so finding a good pixel
> @@ -95,6 +95,9 @@ static int sdi_calc_clock_div(struct sdi_device *sdi, unsigned long pclk,
>  		bool ok;
>  
>  		memset(&ctx, 0, sizeof(ctx));
> +
> +		ctx.sdi = sdi;
> +
>  		if (pclk > 1000 * i * i * i)
>  			ctx.pck_min = max(pclk - 1000 * i * i * i, 0lu);
>  		else
> 
> -- 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: omapdrm regression in v4.17-rc series
@ 2018-05-24 16:06     ` Benoit Parrot
  0 siblings, 0 replies; 8+ messages in thread
From: Benoit Parrot @ 2018-05-24 16:06 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: ivo.g.dimitrov.75, Aaro Koskinen, Tony Lindgren, abcloriens, sre,
	dri-devel, linux-kernel, martijn, filip.matijevic.pz,
	Thorsten Leemhuis, clayton, Laurent Pinchart, linux-omap,
	patrikbachan, serge

Reviewed-by: Benoit Parrot <bparrot@ti.com>

Tomi Valkeinen <tomi.valkeinen@ti.com> wrote on Thu [2018-May-24 10:58:25 +0300]:
> 
> On 24/05/18 01:03, Tony Lindgren wrote:
> > Hi all,
> > 
> > I bisected the n900 LCD issue to commit 24aac6011f70 ("drm: omapdrm:
> > sdi: Allocate the sdi private data structure dynamically"). Reverting
> > this patch makes LCD work for me again on n900.
> > 
> > Any ideas?
> 
> This should help to get the SDI enabled.
> 
>  Tomi
> 
> From 4e96e6c2dedf366e081331c3825ff6fa8aabd85c Mon Sep 17 00:00:00 2001
> From: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Date: Thu, 24 May 2018 10:53:24 +0300
> Subject: [PATCH] drm/omap: fix NULL deref crash with SDI displays
> 
> Fix a NULL deref bug introduced in commit 24aac6011f70 ("drm: omapdrm:
> sdi: Allocate the sdi private data structure dynamically").
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>  drivers/gpu/drm/omapdrm/dss/sdi.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c
> index 68a40ae26f5b..1e2c931f6acf 100644
> --- a/drivers/gpu/drm/omapdrm/dss/sdi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c
> @@ -82,7 +82,7 @@ static int sdi_calc_clock_div(struct sdi_device *sdi, unsigned long pclk,
>  			      struct dispc_clock_info *dispc_cinfo)
>  {
>  	int i;
> -	struct sdi_clk_calc_ctx ctx = { .sdi = sdi };
> +	struct sdi_clk_calc_ctx ctx;
>  
>  	/*
>  	 * DSS fclk gives us very few possibilities, so finding a good pixel
> @@ -95,6 +95,9 @@ static int sdi_calc_clock_div(struct sdi_device *sdi, unsigned long pclk,
>  		bool ok;
>  
>  		memset(&ctx, 0, sizeof(ctx));
> +
> +		ctx.sdi = sdi;
> +
>  		if (pclk > 1000 * i * i * i)
>  			ctx.pck_min = max(pclk - 1000 * i * i * i, 0lu);
>  		else
> 
> -- 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: omapdrm regression in v4.17-rc series
  2018-05-24 13:54   ` Tony Lindgren
@ 2018-05-24 16:22       ` Tomi Valkeinen
  0 siblings, 0 replies; 8+ messages in thread
From: Tomi Valkeinen @ 2018-05-24 16:22 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Laurent Pinchart, Aaro Koskinen, ivo.g.dimitrov.75, abcloriens,
	sre, martijn, filip.matijevic.pz, Thorsten Leemhuis, clayton,
	patrikbachan, serge, linux-omap, linux-kernel, dri-devel



On 24/05/18 16:54, Tony Lindgren wrote:
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [180524 08:00]:
>>
>> On 24/05/18 01:03, Tony Lindgren wrote:
>>> Hi all,
>>>
>>> I bisected the n900 LCD issue to commit 24aac6011f70 ("drm: omapdrm:
>>> sdi: Allocate the sdi private data structure dynamically"). Reverting
>>> this patch makes LCD work for me again on n900.
>>>
>>> Any ideas?
>>
>> This should help to get the SDI enabled.
> 
> Thanks yes that fixes it:
> 
> Fixes: 24aac6011f70 ("drm: omapdrm: sdi: Allocate the sdi private data
> structure dynamically")
> Reported-by: Tony Lindgren <tony@atomide.com>
> Tested-by: Tony Lindgren <tony@atomide.com>
> 

Thanks, pushed to drm-misc-fixes.

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

* Re: omapdrm regression in v4.17-rc series
@ 2018-05-24 16:22       ` Tomi Valkeinen
  0 siblings, 0 replies; 8+ messages in thread
From: Tomi Valkeinen @ 2018-05-24 16:22 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: ivo.g.dimitrov.75, Aaro Koskinen, abcloriens, sre, dri-devel,
	linux-kernel, martijn, filip.matijevic.pz, Thorsten Leemhuis,
	clayton, Laurent Pinchart, linux-omap, patrikbachan, serge



On 24/05/18 16:54, Tony Lindgren wrote:
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [180524 08:00]:
>>
>> On 24/05/18 01:03, Tony Lindgren wrote:
>>> Hi all,
>>>
>>> I bisected the n900 LCD issue to commit 24aac6011f70 ("drm: omapdrm:
>>> sdi: Allocate the sdi private data structure dynamically"). Reverting
>>> this patch makes LCD work for me again on n900.
>>>
>>> Any ideas?
>>
>> This should help to get the SDI enabled.
> 
> Thanks yes that fixes it:
> 
> Fixes: 24aac6011f70 ("drm: omapdrm: sdi: Allocate the sdi private data
> structure dynamically")
> Reported-by: Tony Lindgren <tony@atomide.com>
> Tested-by: Tony Lindgren <tony@atomide.com>
> 

Thanks, pushed to drm-misc-fixes.

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2018-05-24 16:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-23 22:03 omapdrm regression in v4.17-rc series Tony Lindgren
2018-05-24  7:58 ` Tomi Valkeinen
2018-05-24  7:58   ` Tomi Valkeinen
2018-05-24 13:54   ` Tony Lindgren
2018-05-24 16:22     ` Tomi Valkeinen
2018-05-24 16:22       ` Tomi Valkeinen
2018-05-24 16:06   ` Benoit Parrot
2018-05-24 16:06     ` Benoit Parrot

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.