Skip to contentSkip to conversation

omapdrm regression in v4.17-rc series

DISCUSSION Tony Lindgren 3 participants 5 messages May 23, 2018 – May 24, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 7 lines · Tony Lindgren

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

Quoted 1 line

From 4e96e6c2dedf366e081331c3825ff6fa8aabd85c Mon Sep 17 00:00:00 2001

From: Tomi Valkeinen <[email protected]>
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").

---
 drivers/gpu/drm/omapdrm/dss/sdi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/omapdrm/dss/sdi.c +4 -1
index 68a40ae26f5b..1e2c931f6acf 100644
@@ -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
Signature · 1 line
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
author Tested-by
#2 lore raw
Quoted 11 lines · Tomi Valkeinen
Quoted 7 lines · Tony Lindgren

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

Reviewed-by
#4 lore raw
In reply to Tomi Valkeinen

Tomi Valkeinen <[email protected]> wrote on Thu [2018-May-24 10:58:25 +0300]:

Quoted 57 lines · Tony Lindgren
Quoted 7 lines

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 <[email protected]>
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").

---
 drivers/gpu/drm/omapdrm/dss/sdi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/omapdrm/dss/sdi.c +4 -1
index 68a40ae26f5b..1e2c931f6acf 100644
@@ -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
Signature · 6 lines
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to Tony Lindgren
Quoted 11 lines · Tony Lindgren
Quoted 10 lines · Tomi Valkeinen
Quoted 7 lines · Tony Lindgren

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?

Quoted 9 lines
Quoted 1 line

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

Thanks, pushed to drm-misc-fixes.

Tomi

Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel