* [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5
@ 2025-07-11 4:31 Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 01/14] drm/panel/lq101r1sx01: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
` (14 more replies)
0 siblings, 15 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Use the new API devm_drm_panel_alloc() for panel allocations.
A major chunk of driver conversion was sent in a 3 part series
which is already merged. The coccinelle patch that was used to
identify unsafe panel allocations didnt flag about 20 drivers.
Not using any semantic patch for the remaining drivers.
This series does the conversion by not passing explicit type
to the helper and maintaining type safety suggested by Geert.
Link to part 1, 2 and 3 of driver conversion:
https://patchwork.freedesktop.org/series/147082/
https://patchwork.freedesktop.org/series/147157/
https://patchwork.freedesktop.org/series/147246/
Link to part 4 that incorporates type safety:
https://patchwork.freedesktop.org/series/151355/
Geert's suggestion
https://lore.kernel.org/dri-devel/CAN9Xe3TXZa1nrCLkHadiBkOO=q1ue8Jwc3V13pXcbAc9AFS2-Q@mail.gmail.com/
This is the final set of drivers.
A total of 86 drivers covered in part 1, 2 and 3 are converted
by passing explicit type and is not type safe. Changes to those
will be addressed in the upcoming series.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
Anusha Srivatsa (14):
drm/panel/lq101r1sx01: Use refcounted allocation in place of devm_kzalloc()
drm/panel/raspberrypi: Use refcounted allocation in place of devm_kzalloc()
drm/panel/vvx10f034n00: Use refcounted allocation in place of devm_kzalloc()
drm/panel/osd101t2587-53ts: Use refcounted allocation in place of devm_kzalloc()
drm/panel/novatek-nt36672a: Use refcounted allocation in place of devm_kzalloc()
drm/panel/lg-sw43408: Use refcounted allocation in place of devm_kzalloc()
drm/panel/kd097d04: Use refcounted allocation in place of devm_kzalloc()
drm/panel/khadas-ts050: Use refcounted allocation in place of devm_kzalloc()
drm/panel/jdi-lt070me05000: Use refcounted allocation in place of devm_kzalloc()
drm/panel/lpm102a188a: Use refcounted allocation in place of devm_kzalloc()
drm/panel/ilitek-ili9882t: Use refcounted allocation in place of devm_kzalloc()
drm/panel/himax-hx83102: Use refcounted allocation in place of devm_kzalloc()
drm/panel/boe-tv101wum-nl6: Use refcounted allocation in place of devm_kzalloc()
drm/panel/boe-himax8279d: Use refcounted allocation in place of devm_kzalloc()
drivers/gpu/drm/panel/panel-boe-himax8279d.c | 11 +++++------
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 10 +++++-----
drivers/gpu/drm/panel/panel-himax-hx83102.c | 10 +++++-----
drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 10 +++++-----
drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c | 12 ++++++------
drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 11 +++++------
drivers/gpu/drm/panel/panel-khadas-ts050.c | 13 ++++++-------
drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 12 ++++++------
drivers/gpu/drm/panel/panel-lg-sw43408.c | 10 +++++-----
drivers/gpu/drm/panel/panel-novatek-nt36672a.c | 10 +++++-----
drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c | 12 ++++++------
drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 12 ++++++------
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 12 ++++++------
drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 11 +++++------
14 files changed, 76 insertions(+), 80 deletions(-)
---
base-commit: bead8800222768dab1a421206350d530b0c45254
change-id: 20250710-b4-driver-convert-last-part-july-34db91cbdf7a
Best regards,
--
Anusha Srivatsa <asrivats@redhat.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 01/14] drm/panel/lq101r1sx01: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 02/14] drm/panel/raspberrypi: " Anusha Srivatsa
` (13 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
index a0d76d588da1a276c5875ad291195d01a0c0495c..d159b0e4fdb6bfb00beb60de660db59ed2c9c566 100644
--- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
+++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
@@ -279,9 +279,6 @@ static int sharp_panel_add(struct sharp_panel *sharp)
if (IS_ERR(sharp->supply))
return PTR_ERR(sharp->supply);
- drm_panel_init(&sharp->base, &sharp->link1->dev, &sharp_panel_funcs,
- DRM_MODE_CONNECTOR_DSI);
-
ret = drm_panel_of_backlight(&sharp->base);
if (ret)
return ret;
@@ -323,10 +320,12 @@ static int sharp_panel_probe(struct mipi_dsi_device *dsi)
/* register a panel for only the DSI-LINK1 interface */
if (secondary) {
- sharp = devm_kzalloc(&dsi->dev, sizeof(*sharp), GFP_KERNEL);
- if (!sharp) {
+ sharp = devm_drm_panel_alloc(&dsi->dev, __typeof(*sharp), base,
+ &sharp_panel_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+ if (IS_ERR(sharp)) {
put_device(&secondary->dev);
- return -ENOMEM;
+ return PTR_ERR(sharp);
}
mipi_dsi_set_drvdata(dsi, sharp);
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 02/14] drm/panel/raspberrypi: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 01/14] drm/panel/lq101r1sx01: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 03/14] drm/panel/vvx10f034n00: " Anusha Srivatsa
` (12 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
index e10e469aa7a6c5684c9240ea74c8d1184c7723a5..dc4bb8ad913185f94e3f7e1a34fbddc31f21f098 100644
--- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
+++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
@@ -373,9 +373,12 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c)
.node = NULL,
};
- ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
- if (!ts)
- return -ENOMEM;
+ ts = devm_drm_panel_alloc(dev, __typeof(*ts), base,
+ &rpi_touchscreen_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(ts))
+ return PTR_ERR(ts);
i2c_set_clientdata(i2c, ts);
@@ -428,9 +431,6 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c)
return PTR_ERR(ts->dsi);
}
- drm_panel_init(&ts->base, dev, &rpi_touchscreen_funcs,
- DRM_MODE_CONNECTOR_DSI);
-
/* This appears last, as it's what will unblock the DSI host
* driver's component bind function.
*/
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 03/14] drm/panel/vvx10f034n00: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 01/14] drm/panel/lq101r1sx01: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 02/14] drm/panel/raspberrypi: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 04/14] drm/panel/osd101t2587-53ts: " Anusha Srivatsa
` (11 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
index d1c5c9bc3c56a6fe12096ca7b08e34e490699207..3c3308fc55df08a24d62fadbef00080667ea3902 100644
--- a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
+++ b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
@@ -166,9 +166,6 @@ static int wuxga_nt_panel_add(struct wuxga_nt_panel *wuxga_nt)
if (IS_ERR(wuxga_nt->supply))
return PTR_ERR(wuxga_nt->supply);
- drm_panel_init(&wuxga_nt->base, &wuxga_nt->dsi->dev,
- &wuxga_nt_panel_funcs, DRM_MODE_CONNECTOR_DSI);
-
ret = drm_panel_of_backlight(&wuxga_nt->base);
if (ret)
return ret;
@@ -196,9 +193,12 @@ static int wuxga_nt_panel_probe(struct mipi_dsi_device *dsi)
MIPI_DSI_CLOCK_NON_CONTINUOUS |
MIPI_DSI_MODE_LPM;
- wuxga_nt = devm_kzalloc(&dsi->dev, sizeof(*wuxga_nt), GFP_KERNEL);
- if (!wuxga_nt)
- return -ENOMEM;
+ wuxga_nt = devm_drm_panel_alloc(&dsi->dev, __typeof(*wuxga_nt), base,
+ &wuxga_nt_panel_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(wuxga_nt))
+ return PTR_ERR(wuxga_nt);
mipi_dsi_set_drvdata(dsi, wuxga_nt);
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 04/14] drm/panel/osd101t2587-53ts: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (2 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 03/14] drm/panel/vvx10f034n00: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 05/14] drm/panel/novatek-nt36672a: " Anusha Srivatsa
` (10 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c b/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
index dbea84f515142dbf77236552643bb0e4546d0ca8..2334b77f348ce61e98b74f7b26d4021be412c376 100644
--- a/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
+++ b/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
@@ -132,9 +132,6 @@ static int osd101t2587_panel_add(struct osd101t2587_panel *osd101t2587)
if (IS_ERR(osd101t2587->supply))
return PTR_ERR(osd101t2587->supply);
- drm_panel_init(&osd101t2587->base, &osd101t2587->dsi->dev,
- &osd101t2587_panel_funcs, DRM_MODE_CONNECTOR_DSI);
-
ret = drm_panel_of_backlight(&osd101t2587->base);
if (ret)
return ret;
@@ -161,9 +158,12 @@ static int osd101t2587_panel_probe(struct mipi_dsi_device *dsi)
MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_NO_EOT_PACKET;
- osd101t2587 = devm_kzalloc(&dsi->dev, sizeof(*osd101t2587), GFP_KERNEL);
- if (!osd101t2587)
- return -ENOMEM;
+ osd101t2587 = devm_drm_panel_alloc(&dsi->dev, __typeof(*osd101t2587), base,
+ &osd101t2587_panel_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(osd101t2587))
+ return PTR_ERR(osd101t2587);
mipi_dsi_set_drvdata(dsi, osd101t2587);
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 05/14] drm/panel/novatek-nt36672a: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (3 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 04/14] drm/panel/osd101t2587-53ts: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 06/14] drm/panel/lg-sw43408: " Anusha Srivatsa
` (9 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-novatek-nt36672a.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
index c2abd20e0734bd1e94fa3692e41d442170ab24c3..29e1f6aea48060384f4639999174b67097a6c8a7 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
@@ -608,8 +608,6 @@ static int nt36672a_panel_add(struct nt36672a_panel *pinfo)
return dev_err_probe(dev, PTR_ERR(pinfo->reset_gpio),
"failed to get reset gpio from DT\n");
- drm_panel_init(&pinfo->base, dev, &panel_funcs, DRM_MODE_CONNECTOR_DSI);
-
ret = drm_panel_of_backlight(&pinfo->base);
if (ret)
return dev_err_probe(dev, ret, "Failed to get backlight\n");
@@ -625,9 +623,11 @@ static int nt36672a_panel_probe(struct mipi_dsi_device *dsi)
const struct nt36672a_panel_desc *desc;
int err;
- pinfo = devm_kzalloc(&dsi->dev, sizeof(*pinfo), GFP_KERNEL);
- if (!pinfo)
- return -ENOMEM;
+ pinfo = devm_drm_panel_alloc(&dsi->dev, __typeof(*pinfo), base,
+ &panel_funcs, DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(pinfo))
+ return PTR_ERR(pinfo);
desc = of_device_get_match_data(&dsi->dev);
dsi->mode_flags = desc->mode_flags;
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 06/14] drm/panel/lg-sw43408: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (4 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 05/14] drm/panel/novatek-nt36672a: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 07/14] drm/panel/kd097d04: " Anusha Srivatsa
` (8 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-lg-sw43408.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-lg-sw43408.c b/drivers/gpu/drm/panel/panel-lg-sw43408.c
index f3dcc39670eae866030e705a30c6cfb2594a70bb..46a56ea92ad9ff3a7e60e0ad0810f4082dbed620 100644
--- a/drivers/gpu/drm/panel/panel-lg-sw43408.c
+++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c
@@ -246,8 +246,6 @@ static int sw43408_add(struct sw43408_panel *ctx)
ctx->base.prepare_prev_first = true;
- drm_panel_init(&ctx->base, dev, &sw43408_funcs, DRM_MODE_CONNECTOR_DSI);
-
drm_panel_add(&ctx->base);
return ret;
}
@@ -257,9 +255,11 @@ static int sw43408_probe(struct mipi_dsi_device *dsi)
struct sw43408_panel *ctx;
int ret;
- ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL);
- if (!ctx)
- return -ENOMEM;
+ ctx = devm_drm_panel_alloc(&dsi->dev, __typeof(*ctx), base,
+ &sw43408_funcs, DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(ctx))
+ return PTR_ERR(ctx);
dsi->mode_flags = MIPI_DSI_MODE_LPM;
dsi->format = MIPI_DSI_FMT_RGB888;
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 07/14] drm/panel/kd097d04: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (5 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 06/14] drm/panel/lg-sw43408: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 08/14] drm/panel/khadas-ts050: " Anusha Srivatsa
` (7 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c b/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c
index d6b912277196ee68a7ca57bfefb327dee11596fa..2fc7b0779b37b28c7ed2fba6b28459c8a9d27e70 100644
--- a/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c
+++ b/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c
@@ -337,9 +337,6 @@ static int kingdisplay_panel_add(struct kingdisplay_panel *kingdisplay)
kingdisplay->enable_gpio = NULL;
}
- drm_panel_init(&kingdisplay->base, &kingdisplay->link->dev,
- &kingdisplay_panel_funcs, DRM_MODE_CONNECTOR_DSI);
-
err = drm_panel_of_backlight(&kingdisplay->base);
if (err)
return err;
@@ -364,9 +361,12 @@ static int kingdisplay_panel_probe(struct mipi_dsi_device *dsi)
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_LPM;
- kingdisplay = devm_kzalloc(&dsi->dev, sizeof(*kingdisplay), GFP_KERNEL);
- if (!kingdisplay)
- return -ENOMEM;
+ kingdisplay = devm_drm_panel_alloc(&dsi->dev, __typeof(*kingdisplay), base,
+ &kingdisplay_panel_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(kingdisplay))
+ return PTR_ERR(kingdisplay);
mipi_dsi_set_drvdata(dsi, kingdisplay);
kingdisplay->link = dsi;
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 08/14] drm/panel/khadas-ts050: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (6 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 07/14] drm/panel/kd097d04: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 09/14] drm/panel/jdi-lt070me05000: " Anusha Srivatsa
` (6 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-khadas-ts050.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-khadas-ts050.c b/drivers/gpu/drm/panel/panel-khadas-ts050.c
index 0e5e8e57bd1e573af934fe22b59f6513aac4dae4..67ca055f06f39f74ec4c34120c644d97b62c3921 100644
--- a/drivers/gpu/drm/panel/panel-khadas-ts050.c
+++ b/drivers/gpu/drm/panel/panel-khadas-ts050.c
@@ -821,9 +821,6 @@ static int khadas_ts050_panel_add(struct khadas_ts050_panel *khadas_ts050)
return dev_err_probe(dev, PTR_ERR(khadas_ts050->enable_gpio),
"failed to get enable gpio");
- drm_panel_init(&khadas_ts050->base, &khadas_ts050->link->dev,
- &khadas_ts050_panel_funcs, DRM_MODE_CONNECTOR_DSI);
-
err = drm_panel_of_backlight(&khadas_ts050->base);
if (err)
return err;
@@ -850,10 +847,12 @@ static int khadas_ts050_panel_probe(struct mipi_dsi_device *dsi)
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET;
- khadas_ts050 = devm_kzalloc(&dsi->dev, sizeof(*khadas_ts050),
- GFP_KERNEL);
- if (!khadas_ts050)
- return -ENOMEM;
+ khadas_ts050 = devm_drm_panel_alloc(&dsi->dev, __typeof(*khadas_ts050),
+ base, &khadas_ts050_panel_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(khadas_ts050))
+ return PTR_ERR(khadas_ts050);
khadas_ts050->panel_data = (struct khadas_ts050_panel_data *)data;
mipi_dsi_set_drvdata(dsi, khadas_ts050);
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 09/14] drm/panel/jdi-lt070me05000: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (7 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 08/14] drm/panel/khadas-ts050: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 10/14] drm/panel/lpm102a188a: " Anusha Srivatsa
` (5 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
index b1ce186de2616be03fa9f94d0e0724141e9dcbac..3513e5c4dd8c6ee3c9c8836e8d150d838d8666cd 100644
--- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
+++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
@@ -402,9 +402,6 @@ static int jdi_panel_add(struct jdi_panel *jdi)
return dev_err_probe(dev, PTR_ERR(jdi->backlight),
"failed to register backlight %d\n", ret);
- drm_panel_init(&jdi->base, &jdi->dsi->dev, &jdi_panel_funcs,
- DRM_MODE_CONNECTOR_DSI);
-
drm_panel_add(&jdi->base);
return 0;
@@ -426,9 +423,11 @@ static int jdi_panel_probe(struct mipi_dsi_device *dsi)
dsi->mode_flags = MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO |
MIPI_DSI_CLOCK_NON_CONTINUOUS;
- jdi = devm_kzalloc(&dsi->dev, sizeof(*jdi), GFP_KERNEL);
- if (!jdi)
- return -ENOMEM;
+ jdi = devm_drm_panel_alloc(&dsi->dev, __typeof(*jdi), base,
+ &jdi_panel_funcs, DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(jdi))
+ return PTR_ERR(jdi);
mipi_dsi_set_drvdata(dsi, jdi);
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 10/14] drm/panel/lpm102a188a: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (8 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 09/14] drm/panel/jdi-lt070me05000: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 11/14] drm/panel/ilitek-ili9882t: " Anusha Srivatsa
` (4 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c b/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c
index 5b5082efb282bcf705cf2d38dea24901e9803648..5f897e143758c2be51c39a20eeda2ecd09e1fbee 100644
--- a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c
+++ b/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c
@@ -435,9 +435,6 @@ static int jdi_panel_add(struct jdi_panel *jdi)
return dev_err_probe(dev, PTR_ERR(jdi->backlight),
"failed to create backlight\n");
- drm_panel_init(&jdi->base, &jdi->link1->dev, &jdi_panel_funcs,
- DRM_MODE_CONNECTOR_DSI);
-
drm_panel_add(&jdi->base);
return 0;
@@ -475,10 +472,13 @@ static int jdi_panel_dsi_probe(struct mipi_dsi_device *dsi)
/* register a panel for only the DSI-LINK1 interface */
if (secondary) {
- jdi = devm_kzalloc(&dsi->dev, sizeof(*jdi), GFP_KERNEL);
- if (!jdi) {
+ jdi = devm_drm_panel_alloc(&dsi->dev, __typeof(*jdi),
+ base, &jdi_panel_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(jdi)) {
put_device(&secondary->dev);
- return -ENOMEM;
+ return PTR_ERR(jdi);
}
mipi_dsi_set_drvdata(dsi, jdi);
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 11/14] drm/panel/ilitek-ili9882t: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (9 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 10/14] drm/panel/lpm102a188a: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 12/14] drm/panel/himax-hx83102: " Anusha Srivatsa
` (3 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
index 3c24a63b6be8c710a1b7f3524b537d3cb6fc63d3..85c7059be214e722e795e3a55420a32fcfee2e4f 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
@@ -614,8 +614,6 @@ static int ili9882t_add(struct ili9882t *ili)
gpiod_set_value(ili->enable_gpio, 0);
- drm_panel_init(&ili->base, dev, &ili9882t_funcs,
- DRM_MODE_CONNECTOR_DSI);
err = of_drm_get_panel_orientation(dev->of_node, &ili->orientation);
if (err < 0) {
dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err);
@@ -640,9 +638,11 @@ static int ili9882t_probe(struct mipi_dsi_device *dsi)
int ret;
const struct panel_desc *desc;
- ili = devm_kzalloc(&dsi->dev, sizeof(*ili), GFP_KERNEL);
- if (!ili)
- return -ENOMEM;
+ ili = devm_drm_panel_alloc(&dsi->dev, __typeof(*ili), base,
+ &ili9882t_funcs, DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(ili))
+ return PTR_ERR(ili);
desc = of_device_get_match_data(&dsi->dev);
dsi->lanes = desc->lanes;
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 12/14] drm/panel/himax-hx83102: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (10 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 11/14] drm/panel/ilitek-ili9882t: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 13/14] drm/panel/boe-tv101wum-nl6: " Anusha Srivatsa
` (2 subsequent siblings)
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-himax-hx83102.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-himax-hx83102.c b/drivers/gpu/drm/panel/panel-himax-hx83102.c
index 66abfc44e424829e295f5848153d548176b9dda9..4c432d207634d2d976a9e7cb7744b1fefa10420d 100644
--- a/drivers/gpu/drm/panel/panel-himax-hx83102.c
+++ b/drivers/gpu/drm/panel/panel-himax-hx83102.c
@@ -989,8 +989,6 @@ static int hx83102_panel_add(struct hx83102 *ctx)
ctx->base.prepare_prev_first = true;
- drm_panel_init(&ctx->base, dev, &hx83102_drm_funcs,
- DRM_MODE_CONNECTOR_DSI);
err = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation);
if (err < 0)
return dev_err_probe(dev, err, "failed to get orientation\n");
@@ -1013,9 +1011,11 @@ static int hx83102_probe(struct mipi_dsi_device *dsi)
int ret;
const struct hx83102_panel_desc *desc;
- ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL);
- if (!ctx)
- return -ENOMEM;
+ ctx = devm_drm_panel_alloc(&dsi->dev, __typeof(*ctx), base,
+ &hx83102_drm_funcs, DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(ctx))
+ return PTR_ERR(ctx);
desc = of_device_get_match_data(&dsi->dev);
dsi->lanes = 4;
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 13/14] drm/panel/boe-tv101wum-nl6: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (11 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 12/14] drm/panel/himax-hx83102: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 14/14] drm/panel/boe-himax8279d: " Anusha Srivatsa
2025-07-16 15:37 ` [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Maxime Ripard
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
index 3e5b0d8636d087596aeb3ef0a9feef14157942ca..d5fe105bdbdde5147c5392945928148ebfdf53b5 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -1720,8 +1720,6 @@ static int boe_panel_add(struct boe_panel *boe)
boe->base.prepare_prev_first = true;
- drm_panel_init(&boe->base, dev, &boe_panel_funcs,
- DRM_MODE_CONNECTOR_DSI);
err = of_drm_get_panel_orientation(dev->of_node, &boe->orientation);
if (err < 0) {
dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err);
@@ -1746,9 +1744,11 @@ static int boe_panel_probe(struct mipi_dsi_device *dsi)
int ret;
const struct panel_desc *desc;
- boe = devm_kzalloc(&dsi->dev, sizeof(*boe), GFP_KERNEL);
- if (!boe)
- return -ENOMEM;
+ boe = devm_drm_panel_alloc(&dsi->dev, __typeof(*boe), base,
+ &boe_panel_funcs, DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(boe))
+ return PTR_ERR(boe);
desc = of_device_get_match_data(&dsi->dev);
dsi->lanes = desc->lanes;
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 14/14] drm/panel/boe-himax8279d: Use refcounted allocation in place of devm_kzalloc()
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (12 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 13/14] drm/panel/boe-tv101wum-nl6: " Anusha Srivatsa
@ 2025-07-11 4:31 ` Anusha Srivatsa
2025-07-16 15:37 ` [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Maxime Ripard
14 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-11 4:31 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han
Cc: dri-devel, linux-kernel, linux-rpi-kernel, linux-arm-kernel,
Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-boe-himax8279d.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
index df746baae301cf70d9fa940b36aae2712e73b3e3..4a8560b4b899a4da3b307dcb43682303d0543813 100644
--- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
+++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
@@ -847,9 +847,6 @@ static int panel_add(struct panel_info *pinfo)
"failed to get enable gpio\n");
}
- drm_panel_init(&pinfo->base, dev, &panel_funcs,
- DRM_MODE_CONNECTOR_DSI);
-
ret = drm_panel_of_backlight(&pinfo->base);
if (ret)
return ret;
@@ -865,9 +862,11 @@ static int panel_probe(struct mipi_dsi_device *dsi)
const struct panel_desc *desc;
int err;
- pinfo = devm_kzalloc(&dsi->dev, sizeof(*pinfo), GFP_KERNEL);
- if (!pinfo)
- return -ENOMEM;
+ pinfo = devm_drm_panel_alloc(&dsi->dev, __typeof(*pinfo), base,
+ &panel_funcs, DRM_MODE_CONNECTOR_DSI);
+
+ if (IS_ERR(pinfo))
+ return PTR_ERR(pinfo);
desc = of_device_get_match_data(&dsi->dev);
dsi->mode_flags = desc->mode_flags;
--
2.48.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
` (13 preceding siblings ...)
2025-07-11 4:31 ` [PATCH 14/14] drm/panel/boe-himax8279d: " Anusha Srivatsa
@ 2025-07-16 15:37 ` Maxime Ripard
2025-07-17 2:09 ` Anusha Srivatsa
14 siblings, 1 reply; 17+ messages in thread
From: Maxime Ripard @ 2025-07-16 15:37 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han, Anusha Srivatsa
Cc: Maxime Ripard, dri-devel, linux-kernel, linux-rpi-kernel,
linux-arm-kernel
On Thu, 10 Jul 2025 23:31:11 -0500, Anusha Srivatsa wrote:
> Use the new API devm_drm_panel_alloc() for panel allocations.
> A major chunk of driver conversion was sent in a 3 part series
> which is already merged. The coccinelle patch that was used to
> identify unsafe panel allocations didnt flag about 20 drivers.
>
> Not using any semantic patch for the remaining drivers.
> This series does the conversion by not passing explicit type
> to the helper and maintaining type safety suggested by Geert.
>
> [...]
Applied to misc/kernel.git (drm-misc-next).
Thanks!
Maxime
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5
2025-07-16 15:37 ` [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Maxime Ripard
@ 2025-07-17 2:09 ` Anusha Srivatsa
0 siblings, 0 replies; 17+ messages in thread
From: Anusha Srivatsa @ 2025-07-17 2:09 UTC (permalink / raw)
To: Maxime Ripard
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, Florian Fainelli,
Broadcom internal kernel review list, Sumit Semwal,
Casey Connolly, Jerry Han, dri-devel, linux-kernel,
linux-rpi-kernel, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 733 bytes --]
On Wed, Jul 16, 2025 at 11:37 AM Maxime Ripard <mripard@kernel.org> wrote:
> On Thu, 10 Jul 2025 23:31:11 -0500, Anusha Srivatsa wrote:
> > Use the new API devm_drm_panel_alloc() for panel allocations.
> > A major chunk of driver conversion was sent in a 3 part series
> > which is already merged. The coccinelle patch that was used to
> > identify unsafe panel allocations didnt flag about 20 drivers.
> >
> > Not using any semantic patch for the remaining drivers.
> > This series does the conversion by not passing explicit type
> > to the helper and maintaining type safety suggested by Geert.
> >
> > [...]
>
> Applied to misc/kernel.git (drm-misc-next).
>
>
Thanks!!
Anusha
> Thanks!
> Maxime
>
>
[-- Attachment #2: Type: text/html, Size: 1304 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2025-07-17 3:14 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11 4:31 [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 01/14] drm/panel/lq101r1sx01: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 02/14] drm/panel/raspberrypi: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 03/14] drm/panel/vvx10f034n00: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 04/14] drm/panel/osd101t2587-53ts: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 05/14] drm/panel/novatek-nt36672a: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 06/14] drm/panel/lg-sw43408: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 07/14] drm/panel/kd097d04: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 08/14] drm/panel/khadas-ts050: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 09/14] drm/panel/jdi-lt070me05000: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 10/14] drm/panel/lpm102a188a: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 11/14] drm/panel/ilitek-ili9882t: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 12/14] drm/panel/himax-hx83102: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 13/14] drm/panel/boe-tv101wum-nl6: " Anusha Srivatsa
2025-07-11 4:31 ` [PATCH 14/14] drm/panel/boe-himax8279d: " Anusha Srivatsa
2025-07-16 15:37 ` [PATCH 00/14] drm/panel: Use refcounted allocation in place of devm_kzalloc() - Part5 Maxime Ripard
2025-07-17 2:09 ` Anusha Srivatsa
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).