drm/panel: Use refcounted allocation in place of devm_kzalloc()
Subsystems (6)
cover drm/panel: Use refcounted allocation in place of devm_kzalloc()
Start converting drivers to use the API - devm_drm_panel_alloc().
This series addresses only 10 drivers. There are 98 more to go. Sending this series to mostly get feedback. if any change is required, it will be incorporated in the next version and in the next series that will address the remaining drivers.
---
Anusha Srivatsa (10):
panel/abt-y030xx067a: Use the refcounted allocation in place of devm_kzalloc() panel/arm-versatile: Use the refcounted allocation in place of devm_kzalloc() panel/z00t-tm5p5-n35596: Use refcounted allocation in place of devm_kzalloc() panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc() panel/bf060y8m-aj0: Use refcounted allocation in place of devm_kzalloc() panel/th101mb31ig002-28a: Use refcounted allocation in place of devm_kzalloc() panel/boe-tv101wum-ll2: Use refcounted allocation in place of devm_kzalloc() panel/dsi-cm: Use refcounted allocation in place of devm_kzalloc() panel/ebbg-ft8719: Use refcounted allocation in place of devm_kzalloc() panel/panel-edp: Use refcounted allocation in place of devm_kzalloc()
drivers/gpu/drm/panel/panel-abt-y030xx067a.c | 10 ++++------ drivers/gpu/drm/panel/panel-arm-versatile.c | 11 +++++------ drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c | 11 +++++------ drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c | 11 +++++------ drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 11 +++++------ drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c | 10 +++++----- drivers/gpu/drm/panel/panel-dsi-cm.c | 10 ++++------ drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 11 +++++------ drivers/gpu/drm/panel/panel-edp.c | 9 ++++----- 10 files changed, 46 insertions(+), 58 deletions(-)
---
base-commit: de04bb0089a96cc00d13b12cbf66a088befe3057
change-id: 20250401-b4-drm-panel-mass-driver-convert-ddca32e95d16
Best regards,
Signature · 1 line
Anusha Srivatsa <[email protected]>
PATCH 1/10 panel/abt-y030xx067a: Use the refcounted allocation in place of devm_kzalloc()
Move to using the new API devm_drm_panel_alloc() to allocate the panel.
--- drivers/gpu/drm/panel/panel-abt-y030xx067a.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-abt-y030xx067a.c +4 -6
@@ -279,9 +279,10 @@ static int y030xx067a_probe(struct spi_device *spi)struct y030xx067a *priv;int err; - priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; + priv = devm_drm_panel_alloc(dev, struct y030xx067a, panel, + &y030xx067a_funcs,DRM_MODE_CONNECTOR_DPI ); +if (IS_ERR (priv)) +return PTR_ERR (priv); priv->spi = spi;spi_set_drvdata (spi, priv);
@@ -306,9 +307,6 @@ static int y030xx067a_probe(struct spi_device *spi)return dev_err_probe (dev,PTR_ERR (priv->reset_gpio),"Failed to get reset GPIO\n" ); -drm_panel_init (&priv->panel, dev, &y030xx067a_funcs, -DRM_MODE_CONNECTOR_DPI ); - err =drm_panel_of_backlight (&priv->panel);if (err)return err;
Signature · 1 line
2.48.1
PATCH 2/10 panel/arm-versatile: Use the refcounted allocation in place of devm_kzalloc()
In reply to Anusha SrivatsaMove to using the new API devm_drm_panel_alloc() to allocate the panel.
--- drivers/gpu/drm/panel/panel-arm-versatile.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-arm-versatile.c +5 -6
@@ -306,9 +306,11 @@ static int versatile_panel_probe(struct platform_device *pdev)return PTR_ERR (map); } - vpanel =devm_kzalloc (dev,sizeof (*vpanel),GFP_KERNEL ); -if (!vpanel) -return -ENOMEM ; + vpanel = devm_drm_panel_alloc(dev, struct versatile_panel, panel, + &versatile_panel_drm_funcs, +DRM_MODE_CONNECTOR_DPI ); +if (IS_ERR (vpanel)) +return PTR_ERR (vpanel); ret =regmap_read (map,SYS_CLCD , &val);if (ret) {
@@ -348,9 +350,6 @@ static int versatile_panel_probe(struct platform_device *pdev)dev_info (dev,"panel mounted on IB2 daughterboard\n" ); } -drm_panel_init (&vpanel->panel, dev, &versatile_panel_drm_funcs, -DRM_MODE_CONNECTOR_DPI ); -drm_panel_add (&vpanel->panel);return 0 ;
Signature · 1 line
2.48.1
Re: [PATCH 02/10] panel/arm-versatile: Use the refcounted allocation in place of devm_kzalloc()
Quoted 4 lines · Anusha Srivatsa
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>
Yours,
Linus Walleij
PATCH 3/10 panel/z00t-tm5p5-n35596: Use refcounted allocation in place of devm_kzalloc()
In reply to Anusha SrivatsaMove to using the new API devm_drm_panel_alloc() to allocate the panel.
--- drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c +5 -6
@@ -224,9 +224,11 @@ static int tm5p5_nt35596_probe(struct mipi_dsi_device *dsi)struct tm5p5_nt35596 *ctx;int ret; - ctx =devm_kzalloc (dev,sizeof (*ctx),GFP_KERNEL ); -if (!ctx) -return -ENOMEM ; + ctx = devm_drm_panel_alloc(dev, struct tm5p5_nt35596, panel, + &tm5p5_nt35596_panel_funcs, +DRM_MODE_CONNECTOR_DSI ); +if (IS_ERR (ctx)) +return PTR_ERR (ctx); ctx->supplies[0 ].supply ="vdd" ; ctx->supplies[1 ].supply ="vddio" ;
@@ -253,9 +255,6 @@ static int tm5p5_nt35596_probe(struct mipi_dsi_device *dsi)MIPI_DSI_MODE_VIDEO_HSE |MIPI_DSI_MODE_NO_EOT_PACKET |MIPI_DSI_CLOCK_NON_CONTINUOUS |MIPI_DSI_MODE_LPM ; -drm_panel_init (&ctx->panel, dev, &tm5p5_nt35596_panel_funcs, -DRM_MODE_CONNECTOR_DSI ); - ctx->panel.backlight =tm5p5_nt35596_create_backlight (dsi);if (IS_ERR (ctx->panel.backlight)) { ret =PTR_ERR (ctx->panel.backlight);
Signature · 1 line
2.48.1
PATCH 4/10 panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
In reply to Anusha SrivatsaMove to using the new API devm_drm_panel_alloc() to allocate the panel.
--- drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +4 -6
@@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi) spi->mode |=SPI_MODE_3 |SPI_3WIRE ; - priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, + &a030jtn01_funcs,DRM_MODE_CONNECTOR_DPI ); +if (IS_ERR (panel)) +return PTR_ERR (panel); priv->spi = spi;spi_set_drvdata (spi, priv);
@@ -223,9 +224,6 @@ static int a030jtn01_probe(struct spi_device *spi)if (IS_ERR (priv->reset_gpio))return dev_err_probe (dev,PTR_ERR (priv->reset_gpio),"Failed to get reset GPIO" ); -drm_panel_init (&priv->panel, dev, &a030jtn01_funcs, -DRM_MODE_CONNECTOR_DPI ); - err =drm_panel_of_backlight (&priv->panel);if (err)return err;
Signature · 1 line
2.48.1
Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Hi,
Quoted 13 lines · Anusha Srivatsa
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0
drivers/gpu/drm/panel/panel-auo-a030jtn01.c static int a030jtn01_probe(struct spi_device *spi) · line 204
Quoted 8 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-3@@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi) spi->mode |=SPI_MODE_3 |SPI_3WIRE ; - priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, + &a030jtn01_funcs,DRM_MODE_CONNECTOR_DPI );
This doesn't compile and (yet) it's pushed already to drm-tip. AFAIU it's supposed to be
priv = devm_drm_panel_alloc(...);
Quoted 19 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-3+if (IS_ERR (panel)) +return PTR_ERR (panel); priv->spi = spi;spi_set_drvdata (spi, priv);@@ -223,9 +224,6 @@ static int a030jtn01_probe(struct spi_device *spi)if (IS_ERR (priv->reset_gpio))return dev_err_probe (dev,PTR_ERR (priv->reset_gpio),"Failed to get reset GPIO" ); -drm_panel_init (&priv->panel, dev, &a030jtn01_funcs, -DRM_MODE_CONNECTOR_DPI ); - err =drm_panel_of_backlight (&priv->panel);if (err)return err;Signature · 2 lines
-- 2.48.1
Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Quoted 28 lines · Imre Deak
Hi,
Quoted 13 lines · Anusha Srivatsa
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0drivers/gpu/drm/panel/panel-auo-a030jtn01.c static int a030jtn01_probe(struct spi_device *spi) · line 204
Quoted 8 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-3@@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi) spi->mode |=SPI_MODE_3 |SPI_3WIRE ; - priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, + &a030jtn01_funcs,DRM_MODE_CONNECTOR_DPI );This doesn't compile and (yet) it's pushed already to drm-tip. AFAIU it's supposed to be
Quoted 1 line
priv = devm_drm_panel_alloc(...);
Yes:
drivers/gpu/drm/panel/panel-auo-a030jtn01.c: In function ‘a030jtn01_probe’:drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: error: ‘panel’ undeclared (first use in this function)
203 | panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel,
| ^~~~~drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: note: each undeclared identifier is reported only once for each function it appears in
Please turn on the config options for particular module if you are making changes to that module.
Quoted 20 lines
Quoted 20 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-4+if (IS_ERR (panel)) +return PTR_ERR (panel); priv->spi = spi;spi_set_drvdata (spi, priv);@@ -223,9 +224,6 @@ static int a030jtn01_probe(struct spi_device *spi)if (IS_ERR (priv->reset_gpio))return dev_err_probe (dev,PTR_ERR (priv->reset_gpio),"Failed to get reset GPIO" ); -drm_panel_init (&priv->panel, dev, &a030jtn01_funcs, -DRM_MODE_CONNECTOR_DPI ); - err =drm_panel_of_backlight (&priv->panel);if (err)return err; --2.48.1
Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Quoted 34 lines · Ashutosh
Quoted 28 lines · Imre Deak
Hi,
Quoted 13 lines · Anusha Srivatsa
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0drivers/gpu/drm/panel/panel-auo-a030jtn01.c static int a030jtn01_probe(struct spi_device *spi) · line 204
Quoted 8 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-3@@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi) spi->mode |=SPI_MODE_3 |SPI_3WIRE ; - priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, + &a030jtn01_funcs,DRM_MODE_CONNECTOR_DPI );This doesn't compile and (yet) it's pushed already to drm-tip. AFAIU it's supposed to be
Quoted 1 line
priv = devm_drm_panel_alloc(...);Yes:
Quoted 8 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c: In function ‘a030jtn01_probe’:drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: error: ‘panel’ undeclared (first use in this function)203 | panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, | ^~~~~
drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: note: each undeclared identifier is reported only once for each function it appears inPlease turn on the config options for particular module if you are making changes to that module.
Though probably, you can argue, that the pre-merge CI build should already be doing this. A sort of allmodconfig for the DRM subsystem, so that these kinds of issues don't get missed.
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-4+if (IS_ERR (panel)) +return PTR_ERR (panel); priv->spi = spi;spi_set_drvdata (spi, priv);@@ -223,9 +224,6 @@ static int a030jtn01_probe(struct spi_device *spi)if (IS_ERR (priv->reset_gpio))return dev_err_probe (dev,PTR_ERR (priv->reset_gpio),"Failed to get reset GPIO" ); -drm_panel_init (&priv->panel, dev, &a030jtn01_funcs, -DRM_MODE_CONNECTOR_DPI ); - err =drm_panel_of_backlight (&priv->panel);if (err)return err; --2.48.1
Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Quoted 42 lines · Ashutosh
Quoted 40 lines · Ashutosh
Quoted 28 lines · Imre Deak
Hi,
Quoted 13 lines · Anusha Srivatsa
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0drivers/gpu/drm/panel/panel-auo-a030jtn01.c static int a030jtn01_probe(struct spi_device *spi) · line 204
Quoted 8 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-3@@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi) spi->mode |=SPI_MODE_3 |SPI_3WIRE ; - priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, + &a030jtn01_funcs,DRM_MODE_CONNECTOR_DPI );This doesn't compile and (yet) it's pushed already to drm-tip. AFAIU it's supposed to be
Quoted 1 line
priv = devm_drm_panel_alloc(...);Yes:
drivers/gpu/drm/panel/panel-auo-a030jtn01.c: In function ‘a030jtn01_probe’:drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: error: ‘panel’ undeclared (first use in this function)203 | panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, | ^~~~~
drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: note: each undeclared identifier is reported only once for each function it appears in
Quoted 6 lines
Quoted 2 lines
Please turn on the config options for particular module if you are making changes to that module.
Though probably, you can argue, that the pre-merge CI build should already be doing this. A sort of allmodconfig for the DRM subsystem, so that these kinds of issues don't get missed.
More compile errors:
I'm still getting some allmodconfig errors:
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c: In function 'boe_th101mb31ig002_dsi_probe':../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9: error: 'panel' undeclared (first use in this function)
352 | panel = devm_drm_panel_alloc(dev, struct panel_desc, panel,
| ^~~~~../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9: note: each undeclared identifier is reported only once for each function it appears in In file included from ../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:18:../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:38: error: 'dev' undeclared (first use in this function); did you mean 'cdev'?
352 | panel = devm_drm_panel_alloc(dev, struct panel_desc, panel,
| ^~~../include/drm/drm_panel.h:305:41: note: in definition of macro 'devm_drm_panel_alloc'
305 | ((type *)__devm_drm_panel_alloc(dev, sizeof(type), \
| ^~~
In file included from ../include/uapi/linux/posix_types.h:5,
from ../include/uapi/linux/types.h:14,
from ../include/linux/types.h:6,
from ../include/linux/math.h:5,
from ../include/linux/delay.h:12,
from ../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:8:
../include/linux/stddef.h:16:33: error: 'struct panel_desc' has no member named 'panel'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~
../include/drm/drm_panel.h:306:41: note: in expansion of macro 'offsetof'
306 | offsetof(type, member), funcs, \
| ^~~~~~~~
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:17: note: in expansion of macro 'devm_drm_panel_alloc'
352 | panel = devm_drm_panel_alloc(dev, struct panel_desc, panel,
| ^~~~~~~~~~~~~~~~~~~~Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-4+if (IS_ERR (panel)) +return PTR_ERR (panel); priv->spi = spi;spi_set_drvdata (spi, priv);@@ -223,9 +224,6 @@ static int a030jtn01_probe(struct spi_device *spi)if (IS_ERR (priv->reset_gpio))return dev_err_probe (dev,PTR_ERR (priv->reset_gpio),"Failed to get reset GPIO" ); -drm_panel_init (&priv->panel, dev, &a030jtn01_funcs, -DRM_MODE_CONNECTOR_DPI ); - err =drm_panel_of_backlight (&priv->panel);if (err)return err; --2.48.1
Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Quoted 68 lines · Ashutosh
Quoted 42 lines · Ashutosh
Quoted 40 lines · Ashutosh
Quoted 28 lines · Imre Deak
Hi,
Quoted 13 lines · Anusha Srivatsa
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0drivers/gpu/drm/panel/panel-auo-a030jtn01.c static int a030jtn01_probe(struct spi_device *spi) · line 204
Quoted 8 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-3@@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi) spi->mode |=SPI_MODE_3 |SPI_3WIRE ; - priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, + &a030jtn01_funcs,DRM_MODE_CONNECTOR_DPI );This doesn't compile and (yet) it's pushed already to drm-tip. AFAIU it's supposed to be
Quoted 1 line
priv = devm_drm_panel_alloc(...);Yes:
drivers/gpu/drm/panel/panel-auo-a030jtn01.c: In function ‘a030jtn01_probe’:drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: error: ‘panel’ undeclared (first use in this function)203 | panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, | ^~~~~
drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: note: each undeclared identifier is reported only once for each function it appears inQuoted 6 lines
Quoted 2 lines
Please turn on the config options for particular module if you are making changes to that module.
Though probably, you can argue, that the pre-merge CI build should already be doing this. A sort of allmodconfig for the DRM subsystem, so that these kinds of issues don't get missed.
More compile errors:
I'm still getting some allmodconfig errors:
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c: In function 'boe_th101mb31ig002_dsi_probe':../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9: error: 'panel' undeclared (first use in this function)352 | panel = devm_drm_panel_alloc(dev, struct panel_desc, panel, | ^~~~~
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9: note: each undeclared identifier is reported only once for each function it appears in In file included from../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:18:../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:38: error: 'dev' undeclared (first use in this function); did you mean 'cdev'?
352 | panel = devm_drm_panel_alloc(dev, structpanel_desc, panel,
| ^~~../include/drm/drm_panel.h:305:41: note: in definition of macro 'devm_drm_panel_alloc'
305 | ((type *)__devm_drm_panel_alloc(dev, sizeof(type), \
| ^~~
In file included from../include/uapi/linux/posix_types.h:5,
Quoted 15 lines
from ../include/uapi/linux/types.h:14,
from ../include/linux/types.h:6,
from ../include/linux/math.h:5,
from ../include/linux/delay.h:12,
from ../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:8:
../include/linux/stddef.h:16:33: error: 'struct panel_desc' has no member named 'panel'
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~
../include/drm/drm_panel.h:306:41: note: in expansion of macro 'offsetof'
306 | offsetof(type, member), funcs, \
| ^~~~~~~~
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:17: note: in expansion of macro 'devm_drm_panel_alloc'
352 | panel = devm_drm_panel_alloc(dev, struct panel_desc, panel,
| ^~~~~~~~~~~~~~~~~~~~In case it is not clear, to reproduce and fix these, do:
make -j$(nproc) allmodconfig
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-4+if (IS_ERR (panel)) +return PTR_ERR (panel); priv->spi = spi;spi_set_drvdata (spi, priv);@@ -223,9 +224,6 @@ static int a030jtn01_probe(struct spi_device *spi)if (IS_ERR (priv->reset_gpio))return dev_err_probe (dev,PTR_ERR (priv->reset_gpio),"Failed to get reset GPIO" ); -drm_panel_init (&priv->panel, dev, &a030jtn01_funcs, -DRM_MODE_CONNECTOR_DPI ); - err =drm_panel_of_backlight (&priv->panel);if (err)return err; --2.48.1
RE: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Quoted 117 lines
-----Original Message-----
From: dri-devel <[email protected]> On Behalf Of Dixit, Ashutosh
Sent: Tuesday, April 8, 2025 9:31 AM
To: Anusha Srivatsa <[email protected]>
Cc: Deak, Imre <[email protected]>; Neil Armstrong <[email protected]>; Jessica Zhang <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Thomas Zimmermann <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; Linus Walleij <[email protected]>; Joel Selvaraj <[email protected]>; Douglas Anderson <[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place ofdevm_kzalloc()Quoted 18 lines · Ashutosh
Quoted 16 lines · Ashutosh
Quoted 14 lines · Ashutosh
Quoted 12 lines · Imre Deak
Hi,
Quoted 8 lines · Anusha Srivatsa
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0index
77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41eQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
faf4028950214b056a95100644drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0@@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c static int a030jtn01_probe(struct spi_device *spi)
Quoted 7 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-3spi->mode |=SPI_MODE_3 |SPI_3WIRE ; - priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, + &a030jtn01_funcs,
DRM_MODE_CONNECTOR_DPI);Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
This doesn't compile and (yet) it's pushed already to drm-tip. AFAIU it's supposed to be
priv = devm_drm_panel_alloc(...);Yes:
drivers/gpu/drm/panel/panel-auo-a030jtn01.c: In function‘a030jtn01_probe’:
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: error: ‘panel’undeclared (first use in this function)
Quoted 13 lines
Quoted 6 lines
Quoted 6 lines
203 | panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, | ^~~~~
drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: note: each undeclared identifier is reported only once for each function it appears inQuoted 6 lines
Quoted 2 lines
Please turn on the config options for particular module if you are making changes to that module.
Though probably, you can argue, that the pre-merge CI build should already be doing this. A sort of allmodconfig for the DRM subsystem, so that these kinds of issues don't get missed.
Quoted 5 lines
More compile errors:
I'm still getting some allmodconfig errors:
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c: In function'
boe_th101mb31ig002_dsi_probe':Quoted 1 line
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9: error:'panel' undeclared (first use in this function)
Quoted 4 lines
352 | panel = devm_drm_panel_alloc(dev, struct panel_desc, panel, | ^~~~~
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9: note:
each undeclared identifier is reported only once for each function it appearsin In file included from ../drivers/gpu/drm/panel/panel-boe- th101mb31ig002-28a.c:18:
Quoted 1 line
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:38: error:'dev' undeclared (first use in this function); did you mean 'cdev'?
Quoted 3 lines
352 | panel = devm_drm_panel_alloc(dev, struct
panel_desc, panel,
| ^~~../include/drm/drm_panel.h:305:41: note: in definition of macro'
devm_drm_panel_alloc'Quoted 8 lines
305 | ((type *)__devm_drm_panel_alloc(dev, sizeof(type), \
| ^~~
In file included from../include/uapi/linux/posix_types.h:5,from ../include/uapi/linux/types.h:14, from ../include/linux/types.h:6, from ../include/linux/math.h:5, from ../include/linux/delay.h:12, from ../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:8:
Quoted 1 line
../include/linux/stddef.h:16:33: error: 'structpanel_desc' has no membernamed 'panel'
Quoted 6 lines
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~ ../include/drm/drm_panel.h:306:41: note: in expansion of macro 'offsetof' 306 | offsetof(type, member), funcs, \ | ^~~~~~~~
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:17: note:
Quoted 10 lines
in expansion of macro '
devm_drm_panel_alloc'Quoted 3 lines
352 | panel = devm_drm_panel_alloc(dev, struct
panel_desc, panel,| ^~~~~~~~~~~~~~~~~~~~In case it is not clear, to reproduce and fix these, do:
make -j$(nproc) allmodconfig
We will need more changes than fixing the variable names.
I get this error
ERROR: modpost: "__devm_drm_panel_alloc" [drivers/gpu/drm/panel/panel-auo-a030jtn01.ko] undefined! make[2]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
make[1]: *** [/home/chaitanya/exodus/repos/drm-tip-sandbox/Makefile:1956: modpost] Error 2
make: *** [Makefile:248: __sub-make] Error 2
after making the following change.
@@ -200,10 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi)
spi->mode |= SPI_MODE_3 | SPI_3WIRE;
- panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel,
+ priv = devm_drm_panel_alloc(dev, struct a030jtn01, panel,
&a030jtn01_funcs, DRM_MODE_CONNECTOR_DPI);
- if (IS_ERR(panel))
- return PTR_ERR(panel);
+ if (IS_ERR(priv))
+ return PTR_ERR(priv);
Regards
Chaitanya
Quoted 29 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c static int a030jtn01_probe(struct spi_device
Quoted 6 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-0+if (IS_ERR (panel)) +return PTR_ERR (panel); priv->spi = spi;spi_set_drvdata(spi, priv);drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0@@ -223,9 +224,6 @@ static int a030jtn01_probe(struct spi_device*spi)
Quoted 15 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c static int a030jtn01_probe(struct spi_device · line 225
Quoted 2 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0if (IS_ERR (priv->reset_gpio)) return dev_err_probe(dev, PTR_ERR(priv-
reset_gpio), "FailedQuoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-3to get reset GPIO"); - drm_panel_init(&priv->panel, dev, &a030jtn01_funcs, -DRM_MODE_CONNECTOR_DPI ); - err =drm_panel_of_backlight (&priv->panel);if (err)return err;--
2.48.1
Maxime Ripard
maintainerRe: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Quoted 130 lines · Chaitanya Kumar
Quoted 117 lines
-----Original Message-----
From: dri-devel <[email protected]> On Behalf Of Dixit, Ashutosh
Sent: Tuesday, April 8, 2025 9:31 AM
To: Anusha Srivatsa <[email protected]>
Cc: Deak, Imre <[email protected]>; Neil Armstrong <[email protected]>; Jessica Zhang <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Thomas Zimmermann <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; Linus Walleij <[email protected]>; Joel Selvaraj <[email protected]>; Douglas Anderson <[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place ofdevm_kzalloc()Quoted 18 lines · Ashutosh
Quoted 16 lines · Ashutosh
Quoted 14 lines · Ashutosh
Quoted 12 lines · Imre Deak
Hi,
Quoted 8 lines · Anusha Srivatsa
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0index
77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41eQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
faf4028950214b056a95100644drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0@@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c static int a030jtn01_probe(struct · line 205
Quoted 7 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-3spi->mode |=SPI_MODE_3 |SPI_3WIRE ; - priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, + &a030jtn01_funcs,
DRM_MODE_CONNECTOR_DPI);Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
This doesn't compile and (yet) it's pushed already to drm-tip. AFAIU it's supposed to be
priv = devm_drm_panel_alloc(...);Yes:
drivers/gpu/drm/panel/panel-auo-a030jtn01.c: In function‘a030jtn01_probe’:
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: error: ‘panel’undeclared (first use in this function)
Quoted 13 lines
Quoted 6 lines
Quoted 6 lines
203 | panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, | ^~~~~
drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: note: each undeclared identifier is reported only once for each function it appears inQuoted 6 lines
Quoted 2 lines
Please turn on the config options for particular module if you are making changes to that module.
Though probably, you can argue, that the pre-merge CI build should already be doing this. A sort of allmodconfig for the DRM subsystem, so that these kinds of issues don't get missed.
Quoted 5 lines
More compile errors:
I'm still getting some allmodconfig errors:
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c: In function'
boe_th101mb31ig002_dsi_probe':Quoted 1 line
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9: error:'panel' undeclared (first use in this function)
Quoted 4 lines
352 | panel = devm_drm_panel_alloc(dev, struct panel_desc, panel, | ^~~~~
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9: note:
each undeclared identifier is reported only once for each function it appearsin In file included from ../drivers/gpu/drm/panel/panel-boe- th101mb31ig002-28a.c:18:
Quoted 1 line
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:38: error:'dev' undeclared (first use in this function); did you mean 'cdev'?
Quoted 3 lines
352 | panel = devm_drm_panel_alloc(dev, struct
panel_desc, panel,
| ^~~../include/drm/drm_panel.h:305:41: note: in definition of macro'
devm_drm_panel_alloc'Quoted 8 lines
305 | ((type *)__devm_drm_panel_alloc(dev, sizeof(type), \
| ^~~
In file included from../include/uapi/linux/posix_types.h:5,from ../include/uapi/linux/types.h:14, from ../include/linux/types.h:6, from ../include/linux/math.h:5, from ../include/linux/delay.h:12, from ../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:8:
Quoted 1 line
../include/linux/stddef.h:16:33: error: 'structpanel_desc' has no membernamed 'panel'
Quoted 6 lines
16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~ ../include/drm/drm_panel.h:306:41: note: in expansion of macro 'offsetof' 306 | offsetof(type, member), funcs, \ | ^~~~~~~~
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:17: note:Quoted 10 lines
in expansion of macro '
devm_drm_panel_alloc'Quoted 3 lines
352 | panel = devm_drm_panel_alloc(dev, struct
panel_desc, panel,| ^~~~~~~~~~~~~~~~~~~~In case it is not clear, to reproduce and fix these, do:
make -j$(nproc) allmodconfigWe will need more changes than fixing the variable names.
Quoted 8 lines
I get this error
ERROR: modpost: "
__devm_drm_panel_alloc" [drivers/gpu/drm/panel/panel-auo-a030jtn01.ko] undefined! make[2]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
make[1]: *** [/home/chaitanya/exodus/repos/drm-tip-sandbox/Makefile:1956: modpost] Error 2
make: *** [Makefile:248: __sub-make] Error 2after making the following change.
I couldn't reproduce this one on current drm-misc-next with arm64 and x86 allmodconfig. Could you share your configuration?
Maxime
RE: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Quoted 170 lines
-----Original Message-----
From: Maxime Ripard <[email protected]>
Sent: Tuesday, April 8, 2025 6:20 PM
To: Borah, Chaitanya Kumar <[email protected]>
Cc: Dixit, Ashutosh <[email protected]>; Anusha Srivatsa <[email protected]>; Deak, Imre <[email protected]>; Neil Armstrong <[email protected]>; Jessica Zhang <[email protected]>; Maarten Lankhorst <[email protected]>; Thomas Zimmermann <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; Linus Walleij <[email protected]>; Joel Selvaraj <[email protected]>; Douglas Anderson <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place ofdevm_kzalloc()Quoted 12 lines · Chaitanya Kumar
Quoted 12 lines
-----Original Message-----
From: dri-devel <[email protected]> On Behalf Of Dixit, Ashutosh
Sent: Tuesday, April 8, 2025 9:31 AM
To: Anusha Srivatsa <[email protected]>
Cc: Deak, Imre <[email protected]>; Neil Armstrong <[email protected]>; Jessica Zhang <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Thomas Zimmermann <[email protected]>;David
Quoted 51 lines
Quoted 51 lines
Airlie <[email protected]>; Simona Vetter <[email protected]>; Linus Walleij <[email protected]>; Joel Selvaraj <[email protected]>; Douglas Anderson <[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place ofdevm_kzalloc()Quoted 19 lines · Ashutosh
Quoted 17 lines · Ashutosh
Quoted 15 lines · Ashutosh
Quoted 13 lines · Imre Deak
Hi,
Quoted 9 lines · Anusha Srivatsa
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0index
77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41eQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
faf4028950214b056a95100644drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0@@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c static int a030jtn01_probe(struct · line 205
Quoted 7 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-3spi->mode |=SPI_MODE_3 |SPI_3WIRE ; - priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, + &a030jtn01_funcs,
DRM_MODE_CONNECTOR_DPI);Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
This doesn't compile and (yet) it's pushed already to drm-tip. AFAIU it's supposed to be
priv = devm_drm_panel_alloc(...);Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Yes:
drivers/gpu/drm/panel/panel-auo-a030jtn01.c: In function‘a030jtn01_probe’:
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: error: ‘panel’undeclared (first use in this function)
Quoted 1 line
Quoted 1 line
Quoted 1 line
203 | panel = devm_drm_panel_alloc(dev, struct a030jtn01,
panel,
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Quoted 7 lines
| ^~~~~
drivers/gpu/drm/panel/panel-auo-a030jtn01.c:203:9: note: each undeclared identifier is reported only once for each function it appears inPlease turn on the config options for particular module if you are making changes to that module.
Though probably, you can argue, that the pre-merge CI build should already be doing this. A sort of allmodconfig for the DRM subsystem, so that these kinds of issues don't get missed.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
More compile errors:
I'm still getting some allmodconfig errors:
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c: In function'
boe_th101mb31ig002_dsi_probe':Quoted 1 line
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9:error:
Quoted 2 lines
Quoted 2 lines
'panel' undeclared (first use in this function)
Quoted 1 line
352 | panel = devm_drm_panel_alloc(dev, struct
panel_desc,panel,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
| ^~~~~
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9:note:
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
each undeclared identifier is reported only once for each function it appears
in In file included from ../drivers/gpu/drm/panel/panel-boe- th101mb31ig002-28a.c:18:
Quoted 1 line
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:38:error:
Quoted 2 lines
Quoted 2 lines
'dev' undeclared (first use in this function); did you mean 'cdev'?
Quoted 1 line
352 | panel = devm_drm_panel_alloc(dev, struct
panel_desc,panel,
Quoted 12 lines
Quoted 12 lines
Quoted 2 lines
| ^~~
../include/drm/drm_panel.h:305:41: note: in definition of macro'
devm_drm_panel_alloc'Quoted 9 lines
305 | ((type *)__devm_drm_panel_alloc(dev, sizeof(type), \
| ^~~
In file included from../include/uapi/linux/posix_types.h:5,from ../include/uapi/linux/types.h:14, from ../include/linux/types.h:6, from ../include/linux/math.h:5, from ../include/linux/delay.h:12, from../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-
Quoted 5 lines
Quoted 5 lines
28a.c:8:
Quoted 2 lines
../include/linux/stddef.h:16:33: error: 'structpanel_desc' has no membernamed 'panel'
Quoted 1 line
16 | #define
offsetof(TYPE, MEMBER)__builtin_offsetof(TYPE,MEMBER)
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
| ^~~~~~~~~~~~~~~~~~
../include/drm/drm_panel.h:306:41: note: in expansion of macro'offsetof'
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
306 | offsetof(type, member), funcs, \ | ^~~~~~~~
../drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:17:note:
Quoted 2 lines
Quoted 2 lines
in expansion of macro '
devm_drm_panel_alloc'Quoted 1 line
352 | panel = devm_drm_panel_alloc(dev, struct
panel_desc,panel,
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
| ^~~~~~~~~~~~~~~~~~~~In case it is not clear, to reproduce and fix these, do:
make -j$(nproc) allmodconfigQuoted 5 lines
We will need more changes than fixing the variable names.
I get this error
ERROR: modpost: "
__devm_drm_panel_alloc"[
drivers/gpu/drm/panel/panel-auo-a030jtn01.ko] undefined!Quoted 3 lines
make[2]: *** [
scripts/Makefile.modpost:147: Module.symvers] Error 1 make[1]: *** [/home/chaitanya/exodus/repos/drm-tip-sandbox/Makefile:1956:
Quoted 9 lines
modpost]
Quoted 4 lines
Error 2
make: *** [Makefile:248: __sub-make] Error 2after making the following change.
I couldn't reproduce this one on current drm-misc-next with arm64 and x86 allmodconfig. Could you share your configuration?
Here is the config that our CI uses
https://gitlab.freedesktop.org/drm/xe/ci/-/raw/main/kernel/kconfig
Regards
Chaitanya
Quoted 1 line
Maxime
RE: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Quoted 15 lines · Chaitanya Kumar
Quoted 15 lines
Quoted 5 lines
We will need more changes than fixing the variable names.
I get this error
ERROR: modpost: "
__devm_drm_panel_alloc"[
drivers/gpu/drm/panel/panel-auo-a030jtn01.ko] undefined!Quoted 3 lines
make[2]: *** [
scripts/Makefile.modpost:147: Module.symvers] Error 1 make[1]: *** [/home/chaitanya/exodus/repos/drm-tip-sandbox/Makefile:1956:modpost]
Quoted 4 lines
Error 2
make: *** [Makefile:248: __sub-make] Error 2after making the following change.
Quoted 7 lines
Quoted 3 lines
I couldn't reproduce this one on current drm-misc-next with arm64 and x86 allmodconfig. Could you share your configuration?
Here is the config that our CI uses
https://gitlab.freedesktop.org/drm/xe/ci/-/raw/main/kernel/kconfig
There's
CONFIG_DRM_PANEL=y
# CONFIG_OF is not set
but __devm_drm_panel_alloc is inside #ifdef CONFIG_OF. I don't know that it should be.
There are some stubs in drm_panel.h for !CONFIG_OF but not this one.
Finally, DRM_PANEL_AUO_A030JTN01 does not depend on OF.
That's the issue, but I don't know what the correct fix would be.
BR,
Jani.
Signature · 1 line
Jani Nikula, Intel
Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Quoted 32 lines · Jani Nikula
Quoted 15 lines · Chaitanya Kumar
Quoted 15 lines
Quoted 5 lines
We will need more changes than fixing the variable names.
I get this error
ERROR: modpost: "
__devm_drm_panel_alloc"[
drivers/gpu/drm/panel/panel-auo-a030jtn01.ko] undefined!Quoted 3 lines
make[2]: *** [
scripts/Makefile.modpost:147: Module.symvers] Error 1 make[1]: *** [/home/chaitanya/exodus/repos/drm-tip-sandbox/Makefile:1956:modpost]
Quoted 4 lines
Error 2
make: *** [Makefile:248: __sub-make] Error 2after making the following change.
Quoted 7 lines
Quoted 3 lines
I couldn't reproduce this one on current drm-misc-next with arm64 and x86 allmodconfig. Could you share your configuration?
Here is the config that our CI uses
https://gitlab.freedesktop.org/drm/xe/ci/-/raw/main/kernel/kconfig
There's
CONFIG_DRM_PANEL=y
#CONFIG_OFis not setbut
__devm_drm_panel_allocis inside #ifdefCONFIG_OF. I don't know that it should be.
Quoted 6 lines
There are some stubs in
drm_panel.hfor !CONFIG_OF but not this one.Finally,
DRM_PANEL_AUO_A030JTN01does not depend on OF.That's the issue, but I don't know what the correct fix would be.
I'l send a patch.
Quoted 8 lines
BR,
Jani.Signature · 1 line
Jani Nikula, Intel
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Quoted 33 lines · Dmitry Baryshkov
Quoted 32 lines · Jani Nikula
Quoted 15 lines · Chaitanya Kumar
Quoted 15 lines
Quoted 5 lines
We will need more changes than fixing the variable names.
I get this error
ERROR: modpost: "
__devm_drm_panel_alloc"[
drivers/gpu/drm/panel/panel-auo-a030jtn01.ko] undefined!Quoted 3 lines
make[2]: *** [
scripts/Makefile.modpost:147: Module.symvers] Error 1 make[1]: *** [/home/chaitanya/exodus/repos/drm-tip-sandbox/Makefile:1956:modpost]
Quoted 4 lines
Error 2
make: *** [Makefile:248: __sub-make] Error 2after making the following change.
Quoted 7 lines
Quoted 3 lines
I couldn't reproduce this one on current drm-misc-next with arm64 and x86 allmodconfig. Could you share your configuration?
Here is the config that our CI uses
https://gitlab.freedesktop.org/drm/xe/ci/-/raw/main/kernel/kconfig
There's
CONFIG_DRM_PANEL=y
#CONFIG_OFis not setbut
__devm_drm_panel_allocis inside #ifdefCONFIG_OF. I don't know that it should be.
Quoted 8 lines
Quoted 6 lines
There are some stubs in
drm_panel.hfor !CONFIG_OF but not this one.Finally,
DRM_PANEL_AUO_A030JTN01does not depend on OF.That's the issue, but I don't know what the correct fix would be.
I'l send a patch.
I wish I had seen this thread before the patch series mentioned in IRC to fix it. The additional patch needed is probably something like in
https://lore.kernel.org/dri-devel/nyrjnvctqnk6f3x5q7rlmy5nb7iopoti56pgh43zqknici5ms4@cibpldh7epra/
?
Lucas De Marchi
Maxime Ripard
maintainerRe: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
In reply to Imre DeakQuoted 27 lines · Imre Deak
Hi,
Quoted 13 lines · Anusha Srivatsa
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/panel/panel-auo-a030jtn01.c +0
-0drivers/gpu/drm/panel/panel-auo-a030jtn01.c static int a030jtn01_probe(struct spi_device *spi) · line 204
Quoted 8 lines
drivers/gpu/drm/panel/panel-auo-a030jtn01.c +2
-3@@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi) spi->mode |=SPI_MODE_3 |SPI_3WIRE ; - priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel, + &a030jtn01_funcs,DRM_MODE_CONNECTOR_DPI );This doesn't compile and (yet) it's pushed already to drm-tip. AFAIU it's supposed to be
Quoted 2 lines
priv = devm_drm_panel_alloc(...);
I fixed it (and the other breakages) there:
https://lore.kernel.org/dri-devel/[email protected]/
Maxime
PATCH 5/10 panel/bf060y8m-aj0: Use refcounted allocation in place of devm_kzalloc()
In reply to Anusha SrivatsaMove to using the new API devm_drm_panel_alloc() to allocate the panel.
--- drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c +5 -6
@@ -350,9 +350,11 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi)struct boe_bf060y8m_aj0 *boe;int ret; - boe =devm_kzalloc (dev,sizeof (*boe),GFP_KERNEL ); -if (!boe) -return -ENOMEM ; + boe = devm_drm_panel_alloc(dev, struct boe_bf060y8m_aj0, panel, + &boe_bf060y8m_aj0_panel_funcs, +DRM_MODE_CONNECTOR_DSI ); +if (IS_ERR (boe)) +return PTR_ERR (boe); ret =boe_bf060y8m_aj0_init_vregs (boe, dev);if (ret)
@@ -374,9 +376,6 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi)MIPI_DSI_CLOCK_NON_CONTINUOUS |MIPI_DSI_MODE_LPM ; -drm_panel_init (&boe->panel, dev, &boe_bf060y8m_aj0_panel_funcs, -DRM_MODE_CONNECTOR_DSI ); - boe->panel.prepare_prev_first = true; boe->panel.backlight =boe_bf060y8m_aj0_create_backlight (dsi);
Signature · 1 line
2.48.1
PATCH 6/10 panel/th101mb31ig002-28a: Use refcounted allocation in place of devm_kzalloc()
In reply to Anusha SrivatsaMove to using the new API devm_drm_panel_alloc() to allocate the panel.
--- drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c +5 -6
@@ -349,9 +349,11 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)const struct panel_desc *desc;int ret; - ctx =devm_kzalloc (&dsi->dev,sizeof (*ctx),GFP_KERNEL ); -if (!ctx) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct panel_desc, panel, + &boe_th101mb31ig002_funcs, +DRM_MODE_CONNECTOR_DSI ); +if (IS_ERR (panel)) +return PTR_ERR (panel);mipi_dsi_set_drvdata (dsi, ctx); ctx->dsi = dsi;
@@ -383,9 +385,6 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)return dev_err_probe (&dsi->dev, ret,"Failed to get orientation\n" ); -drm_panel_init (&ctx->panel, &dsi->dev, &boe_th101mb31ig002_funcs, -DRM_MODE_CONNECTOR_DSI ); - ret =drm_panel_of_backlight (&ctx->panel);if (ret)return ret;
Signature · 1 line
2.48.1
Thomas Zimmermann
maintainerRe: [PATCH 06/10] panel/th101mb31ig002-28a: Use refcounted allocation in place of devm_kzalloc()
Hi
this patch doesn't build.
linux/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c: In function ‘boe_th101mb31ig002_dsi_probe’:linux/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9: error: ‘panel’ undeclared (first use in this function)
352 | panel = devm_drm_panel_alloc(dev, struct panel_desc, panel,
| ^~~~~linux/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:9: note: each undeclared identifier is reported only once for each function it appears in In file included from linux/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:18:linux/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c:352:38: error: ‘dev’ undeclared (first use in this function); did you mean ‘cdev’? 352 | panel = devm_drm_panel_alloc(dev, struct panel_desc, panel,
| ^~~
Please fix.
Best regards
Thomas
Am 01.04.25 um 18:03 schrieb Anusha Srivatsa:
Quoted 38 lines
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c +5
-6@@ -349,9 +349,11 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)const struct panel_desc *desc;int ret; - ctx =devm_kzalloc (&dsi->dev,sizeof (*ctx),GFP_KERNEL ); -if (!ctx) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct panel_desc, panel, + &boe_th101mb31ig002_funcs, +DRM_MODE_CONNECTOR_DSI ); +if (IS_ERR (panel)) +return PTR_ERR (panel);mipi_dsi_set_drvdata (dsi, ctx); ctx->dsi = dsi;@@ -383,9 +385,6 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)return dev_err_probe (&dsi->dev, ret,"Failed to get orientation\n" ); -drm_panel_init (&ctx->panel, &dsi->dev, &boe_th101mb31ig002_funcs, -DRM_MODE_CONNECTOR_DSI ); - ret =drm_panel_of_backlight (&ctx->panel);if (ret)return ret;
Signature · 7 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
PATCH 7/10 panel/boe-tv101wum-ll2: Use refcounted allocation in place of devm_kzalloc()
In reply to Anusha SrivatsaMove to using the new API devm_drm_panel_alloc() to allocate the panel.
--- drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c +5 -5
@@ -166,9 +166,11 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi)struct boe_tv101wum_ll2 *ctx;int ret; - ctx =devm_kzalloc (dev,sizeof (*ctx),GFP_KERNEL ); -if (!ctx) -return -ENOMEM ; + ctx = devm_drm_panel_alloc(dev, struct boe_tv101wum_ll2, panel, + &boe_tv101wum_ll2_panel_funcs, + DRM_MODE_CONNECTOR_DSI + if (IS_ERR(panel)) + return PTR_ERR(panel); ret = devm_regulator_bulk_get_const(&dsi->dev, ARRAY_SIZE(boe_tv101wum_ll2_supplies),
@@ -190,8 +192,6 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi) dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST |MIPI_DSI_MODE_VIDEO_HSE ; -drm_panel_init (&ctx->panel, dev, &boe_tv101wum_ll2_panel_funcs, -DRM_MODE_CONNECTOR_DSI ); ctx->panel.prepare_prev_first = true; ret =drm_panel_of_backlight (&ctx->panel);
Signature · 1 line
2.48.1
Thomas Zimmermann
maintainerRe: [PATCH 07/10] panel/boe-tv101wum-ll2: Use refcounted allocation in place of devm_kzalloc()
Hi,
this patch doesn't build.
linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c: In function ‘boe_tv101wum_ll2_probe’:linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c:241:23: error: unterminated argument list invoking macro "devm_drm_panel_alloc"
241 | MODULE_LICENSE("GPL");
| ^linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c:169:15: error: ‘devm_drm_panel_alloc’ undeclared (first use in this function); did you mean ‘devm_drm_panel_add_follower’? 169 | ctx = devm_drm_panel_alloc(dev, struct boe_tv101wum_ll2, panel,
| ^~~~~~~~~~~~~~~~~~~~
| devm_drm_panel_add_followerlinux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c:169:15: note: each undeclared identifier is reported only once for each function it appears in linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c:169:35: error: expected ‘;’ at end of input
169 | ctx = devm_drm_panel_alloc(dev, struct boe_tv101wum_ll2, panel,
| ^
| ;
......linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c:169:9: error: expected declaration or statement at end of input
169 | ctx = devm_drm_panel_alloc(dev, struct boe_tv101wum_ll2, panel,
| ^~~linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c:167:13: warning: unused variable ‘ret’ [-Wunused-variable]
167 | int ret;
| ^~~linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c:166:34: warning: variable ‘ctx’ set but not used [-Wunused-but-set-variable]
166 | struct boe_tv101wum_ll2 *ctx;
| ^~~linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c:165:24: warning: unused variable ‘dev’ [-Wunused-variable]
165 | struct device *dev = &dsi->dev;
| ^~~linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c:169:9: error: no return statement in function returning non-void [-Werror=return-type]
169 | ctx = devm_drm_panel_alloc(dev, struct boe_tv101wum_ll2, panel,
| ^~~linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c: At top level:linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c:163:12: warning: ‘boe_tv101wum_ll2_probe’ defined but not used [-Wunused-function]
163 | static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi)
| ^~~~~~~~~~~~~~~~~~~~~~linux/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c:157:37: warning: ‘boe_tv101wum_ll2_panel_funcs’ defined but not used [-Wunused-const-variable=] 157 | static const struct drm_panel_funcs boe_tv101wum_ll2_panel_funcs = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Please fix.
Best regard
Thomas
Am 01.04.25 um 18:03 schrieb Anusha Srivatsa:
Quoted 37 lines
Move to using the new API
devm_drm_panel_alloc()to allocate the panel.Signed-off-by Anusha Srivatsa <[email protected]>--- drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c +5
-5@@ -166,9 +166,11 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi)struct boe_tv101wum_ll2 *ctx;int ret; - ctx =devm_kzalloc (dev,sizeof (*ctx),GFP_KERNEL ); -if (!ctx) -return -ENOMEM ; + ctx = devm_drm_panel_alloc(dev, struct boe_tv101wum_ll2, panel, + &boe_tv101wum_ll2_panel_funcs, + DRM_MODE_CONNECTOR_DSI + if (IS_ERR(panel)) + return PTR_ERR(panel); ret = devm_regulator_bulk_get_const(&dsi->dev, ARRAY_SIZE(boe_tv101wum_ll2_supplies),@@ -190,8 +192,6 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi) dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST |MIPI_DSI_MODE_VIDEO_HSE ; -drm_panel_init (&ctx->panel, dev, &boe_tv101wum_ll2_panel_funcs, -DRM_MODE_CONNECTOR_DSI ); ctx->panel.prepare_prev_first = true; ret =drm_panel_of_backlight (&ctx->panel);
Signature · 7 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
PATCH 8/10 panel/dsi-cm: Use refcounted allocation in place of devm_kzalloc()
In reply to Anusha SrivatsaMove to using the new API devm_drm_panel_alloc() to allocate the panel.
--- drivers/gpu/drm/panel/panel-dsi-cm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-dsi-cm.c +4 -6
@@ -511,9 +511,10 @@ static int dsicm_probe(struct mipi_dsi_device *dsi)dev_dbg (dev,"probe\n" ); - ddata =devm_kzalloc (dev,sizeof (*ddata),GFP_KERNEL ); -if (!ddata) -return -ENOMEM ; + ddata = devm_drm_panel_alloc(dev, struct panel_drv_data, panel, + &dsicm_panel_funcs,DRM_MODE_CONNECTOR_DSI ); +if (IS_ERR (ddata)) +return PTR_ERR (ddata);mipi_dsi_set_drvdata (dsi, ddata); ddata->dsi = dsi;
@@ -530,9 +531,6 @@ static int dsicm_probe(struct mipi_dsi_device *dsi)dsicm_hw_reset (ddata); -drm_panel_init (&ddata->panel, dev, &dsicm_panel_funcs, -DRM_MODE_CONNECTOR_DSI ); -if (ddata->use_dsi_backlight) {struct backlight_properties props = {0 }; props.max_brightness =255 ;
Signature · 1 line
2.48.1
PATCH 9/10 panel/ebbg-ft8719: Use refcounted allocation in place of devm_kzalloc()
In reply to Anusha SrivatsaMove to using the new API devm_drm_panel_alloc() to allocate the panel.
--- drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/panel/panel-ebbg-ft8719.c +5 -6
@@ -163,9 +163,11 @@ static int ebbg_ft8719_probe(struct mipi_dsi_device *dsi)struct ebbg_ft8719 *ctx;int i, ret; - ctx =devm_kzalloc (dev,sizeof (*ctx),GFP_KERNEL ); -if (!ctx) -return -ENOMEM ; + ctx = devm_drm_panel_alloc(dev, struct ebbg_ft8719, panel, + &ebbg_ft8719_panel_funcs, +DRM_MODE_CONNECTOR_DSI ); +if (IS_ERR (ctx)) +return PTR_ERR (ctx);for (i =0 ; i <ARRAY_SIZE (ctx->supplies); i++) ctx->supplies[i].supply = regulator_names[i];
@@ -196,9 +198,6 @@ static int ebbg_ft8719_probe(struct mipi_dsi_device *dsi) dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST |MIPI_DSI_CLOCK_NON_CONTINUOUS ; -drm_panel_init (&ctx->panel, dev, &ebbg_ft8719_panel_funcs, -DRM_MODE_CONNECTOR_DSI ); - ret =drm_panel_of_backlight (&ctx->panel);if (ret)return dev_err_probe (dev, ret,"Failed to get backlight\n" );
Signature · 1 line
2.48.1
PATCH 10/10 panel/panel-edp: Use refcounted allocation in place of devm_kzalloc()
In reply to Anusha SrivatsaMove to using the new API devm_drm_panel_alloc() to allocate the panel.
--- drivers/gpu/drm/panel/panel-edp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/panel/panel-edp.c +4 -5
@@ -839,9 +839,10 @@ static int panel_edp_probe(struct device *dev, const struct panel_desc *desc,struct device_node *ddc;int err; - panel =devm_kzalloc (dev,sizeof (*panel),GFP_KERNEL ); -if (!panel) -return -ENOMEM ; + panel = devm_drm_panel_alloc(dev, struct panel_edp, base, + &panel_edp_funcs, DRM_MODE_CONNECTOR_eDP); +if (IS_ERR (panel)) +return PTR_ERR (panel); panel->prepared_time =0 ; panel->desc = desc;
@@ -886,8 +887,6 @@ static int panel_edp_probe(struct device *dev, const struct panel_desc *desc,dev_set_drvdata (dev, panel); -drm_panel_init (&panel->base, dev, &panel_edp_funcs, DRM_MODE_CONNECTOR_eDP); - err =drm_panel_of_backlight (&panel->base);if (err) goto err_finished_ddc_init;
Signature · 1 line
2.48.1
Quoted 32 lines · Anusha Srivatsa
Start converting drivers to use the API -
devm_drm_panel_alloc().This series addresses only 10 drivers. There are 98 more to go. Sending this series to mostly get feedback. if any change is required, it will be incorporated in the next version and in the next series that will address the remaining drivers.
Signed-off-by Anusha Srivatsa <[email protected]>---
Anusha Srivatsa (10):
panel/abt-y030xx067a: Use the refcounted allocation in place ofdevm_kzalloc()panel/arm-versatile: Use the refcounted allocation in place ofdevm_kzalloc()panel/z00t-tm5p5-n35596: Use refcounted allocation in place ofdevm_kzalloc()panel/auo-a030jtn01: Use refcounted allocation in place ofdevm_kzalloc()panel/bf060y8m-aj0: Use refcounted allocation in place ofdevm_kzalloc()panel/th101mb31ig002-28a: Use refcounted allocation in place ofdevm_kzalloc()panel/boe-tv101wum-ll2: Use refcounted allocation in place ofdevm_kzalloc()panel/dsi-cm: Use refcounted allocation in place ofdevm_kzalloc()panel/ebbg-ft8719: Use refcounted allocation in place ofdevm_kzalloc()panel/panel-edp: Use refcounted allocation in place ofdevm_kzalloc()drivers/gpu/drm/panel/panel-abt-y030xx067a.c | 10 ++++------ drivers/gpu/drm/panel/panel-arm-versatile.c | 11 +++++------ drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c | 11 +++++------ drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c | 11 +++++------ drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 11 +++++------ drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c | 10 +++++----- drivers/gpu/drm/panel/panel-dsi-cm.c | 10 ++++------ drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 11 +++++------ drivers/gpu/drm/panel/panel-edp.c | 9 ++++----- 10 files changed, 46 insertions(+), 58 deletions(-)
Quoted 5 lines
---
base-commit:de04bb0089a96cc00d13b12cbf66a088befe3057
change-id: 20250401-b4-drm-panel-mass-driver-convert-ddca32e95d16Best regards,
Looks good to me
Quoted 47 lines · Neil Armstrong
Quoted 3 lines · Anusha Srivatsa
Start converting drivers to use the API -
devm_drm_panel_alloc().This series addresses only 10 drivers. There are 98 more to go. Sending
this
Quoted 8 lines
series to mostly get feedback. if any change is required, it will be incorporated in the next version and in the next series that will address the remaining drivers.
Signed-off-by Anusha Srivatsa <[email protected]>---
Anusha Srivatsa (10):panel/abt-y030xx067a: Use the refcounted allocation in place of
devm_kzalloc()Quoted 1 line
panel/arm-versatile: Use the refcounted allocation in place of
devm_kzalloc()Quoted 1 line
panel/z00t-tm5p5-n35596: Use refcounted allocation in place of
devm_kzalloc()Quoted 1 line
panel/auo-a030jtn01: Use refcounted allocation in place of
devm_kzalloc()Quoted 1 line
panel/bf060y8m-aj0: Use refcounted allocation in place of
devm_kzalloc()Quoted 1 line
panel/th101mb31ig002-28a: Use refcounted allocation in place of
devm_kzalloc()Quoted 1 line
panel/boe-tv101wum-ll2: Use refcounted allocation in place of
devm_kzalloc()Quoted 2 lines
panel/dsi-cm: Use refcounted allocation in place of
devm_kzalloc()panel/ebbg-ft8719: Use refcounted allocation in place of
devm_kzalloc()Quoted 1 line
panel/panel-edp: Use refcounted allocation in place of
devm_kzalloc()Quoted 16 lines
drivers/gpu/drm/panel/panel-abt-y030xx067a.c | 10 ++++------ drivers/gpu/drm/panel/panel-arm-versatile.c | 11 +++++------ drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c | 11 +++++------ drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------ drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c | 11 +++++------ drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 11 +++++------ drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c | 10 +++++----- drivers/gpu/drm/panel/panel-dsi-cm.c | 10 ++++------ drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 11 +++++------ drivers/gpu/drm/panel/panel-edp.c | 9 ++++----- 10 files changed, 46 insertions(+), 58 deletions(-)---
base-commit:de04bb0089a96cc00d13b12cbf66a088befe3057
change-id: 20250401-b4-drm-panel-mass-driver-convert-ddca32e95d16
Quoted 5 lines
Quoted 1 line
Best regards,
Looks good to me
Reviewed-by Neil Armstrong <[email protected]>
Thanks!
Anusha
Quoted 8 lines · Anusha Srivatsa
Start converting drivers to use the API -
devm_drm_panel_alloc().This series addresses only 10 drivers. There are 98 more to go. Sending this series to mostly get feedback. if any change is required, it will be incorporated in the next version and in the next series that will address the remaining drivers.
[...]
Applied to misc/kernel.git (drm-misc-next).
Thanks!
Maxime