* [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc()
@ 2025-04-01 16:03 Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 01/10] panel/abt-y030xx067a: Use the " Anusha Srivatsa
` (11 more replies)
0 siblings, 12 replies; 28+ messages in thread
From: Anusha Srivatsa @ 2025-04-01 16:03 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel, 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 <asrivats@redhat.com>
---
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,
--
Anusha Srivatsa <asrivats@redhat.com>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 01/10] panel/abt-y030xx067a: Use the refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
@ 2025-04-01 16:03 ` Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 02/10] panel/arm-versatile: " Anusha Srivatsa
` (10 subsequent siblings)
11 siblings, 0 replies; 28+ messages in thread
From: Anusha Srivatsa @ 2025-04-01 16:03 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel, Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-abt-y030xx067a.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-abt-y030xx067a.c b/drivers/gpu/drm/panel/panel-abt-y030xx067a.c
index 4692c36fe2172694b2d91f6fddf8161a68953a30..87fb0fd29658809eb3b97a23053ae53ba1a4e37e 100644
--- a/drivers/gpu/drm/panel/panel-abt-y030xx067a.c
+++ b/drivers/gpu/drm/panel/panel-abt-y030xx067a.c
@@ -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;
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 02/10] panel/arm-versatile: Use the refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 01/10] panel/abt-y030xx067a: Use the " Anusha Srivatsa
@ 2025-04-01 16:03 ` Anusha Srivatsa
2025-04-15 8:01 ` Linus Walleij
2025-04-01 16:03 ` [PATCH 03/10] panel/z00t-tm5p5-n35596: Use " Anusha Srivatsa
` (9 subsequent siblings)
11 siblings, 1 reply; 28+ messages in thread
From: Anusha Srivatsa @ 2025-04-01 16:03 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel, Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-arm-versatile.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-arm-versatile.c b/drivers/gpu/drm/panel/panel-arm-versatile.c
index 503ecea72c5eac6614ecb280a0669d64c9d85b90..ea5119018df47832bd6b2a859c602484b8c66b33 100644
--- a/drivers/gpu/drm/panel/panel-arm-versatile.c
+++ b/drivers/gpu/drm/panel/panel-arm-versatile.c
@@ -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;
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 03/10] panel/z00t-tm5p5-n35596: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 01/10] panel/abt-y030xx067a: Use the " Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 02/10] panel/arm-versatile: " Anusha Srivatsa
@ 2025-04-01 16:03 ` Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 04/10] panel/auo-a030jtn01: " Anusha Srivatsa
` (8 subsequent siblings)
11 siblings, 0 replies; 28+ messages in thread
From: Anusha Srivatsa @ 2025-04-01 16:03 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel, Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c b/drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c
index b05a663c134c974df2909e228d6b2e67e39d54c0..db006576d7046b65eb698c64c9ac3c5f7b69b68d 100644
--- a/drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c
+++ b/drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c
@@ -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);
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
` (2 preceding siblings ...)
2025-04-01 16:03 ` [PATCH 03/10] panel/z00t-tm5p5-n35596: Use " Anusha Srivatsa
@ 2025-04-01 16:03 ` Anusha Srivatsa
2025-04-07 15:49 ` Imre Deak
2025-04-01 16:03 ` [PATCH 05/10] panel/bf060y8m-aj0: " Anusha Srivatsa
` (7 subsequent siblings)
11 siblings, 1 reply; 28+ messages in thread
From: Anusha Srivatsa @ 2025-04-01 16:03 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel, Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
index 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41efaf4028950214b056a95 100644
--- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
+++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
@@ -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;
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 05/10] panel/bf060y8m-aj0: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
` (3 preceding siblings ...)
2025-04-01 16:03 ` [PATCH 04/10] panel/auo-a030jtn01: " Anusha Srivatsa
@ 2025-04-01 16:03 ` Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 06/10] panel/th101mb31ig002-28a: " Anusha Srivatsa
` (6 subsequent siblings)
11 siblings, 0 replies; 28+ messages in thread
From: Anusha Srivatsa @ 2025-04-01 16:03 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel, Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
index 7e66db4a88bbed27920107458d01efd9cf4986df..5eb0727438cd73360f5360aba55f1eb1659fc7c6 100644
--- a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
+++ b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
@@ -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);
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 06/10] panel/th101mb31ig002-28a: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
` (4 preceding siblings ...)
2025-04-01 16:03 ` [PATCH 05/10] panel/bf060y8m-aj0: " Anusha Srivatsa
@ 2025-04-01 16:03 ` Anusha Srivatsa
2025-04-08 8:24 ` Thomas Zimmermann
2025-04-01 16:03 ` [PATCH 07/10] panel/boe-tv101wum-ll2: " Anusha Srivatsa
` (5 subsequent siblings)
11 siblings, 1 reply; 28+ messages in thread
From: Anusha Srivatsa @ 2025-04-01 16:03 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel, Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
index 0b87f1e6ecaea71f10a249bdc53466d281f07a34..7ae196424b6dfb731cd1ea48363c4fa1e6c36464 100644
--- a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
+++ b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
@@ -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;
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 07/10] panel/boe-tv101wum-ll2: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
` (5 preceding siblings ...)
2025-04-01 16:03 ` [PATCH 06/10] panel/th101mb31ig002-28a: " Anusha Srivatsa
@ 2025-04-01 16:03 ` Anusha Srivatsa
2025-04-08 8:27 ` Thomas Zimmermann
2025-04-01 16:03 ` [PATCH 08/10] panel/dsi-cm: " Anusha Srivatsa
` (4 subsequent siblings)
11 siblings, 1 reply; 28+ messages in thread
From: Anusha Srivatsa @ 2025-04-01 16:03 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel, Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
index 50e4a5341bc65727b5ed6ba43a11f5ab9ac9f5b9..04c7890cc51db43bdc6e38cdae8f7f21fd48009f 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
@@ -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);
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 08/10] panel/dsi-cm: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
` (6 preceding siblings ...)
2025-04-01 16:03 ` [PATCH 07/10] panel/boe-tv101wum-ll2: " Anusha Srivatsa
@ 2025-04-01 16:03 ` Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 09/10] panel/ebbg-ft8719: " Anusha Srivatsa
` (3 subsequent siblings)
11 siblings, 0 replies; 28+ messages in thread
From: Anusha Srivatsa @ 2025-04-01 16:03 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel, Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-dsi-cm.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-dsi-cm.c b/drivers/gpu/drm/panel/panel-dsi-cm.c
index 6b3f4d664d2ade668525660394cf81924436492e..ae6e9ffc46cb49ddb53981815ad248953bb37fbb 100644
--- a/drivers/gpu/drm/panel/panel-dsi-cm.c
+++ b/drivers/gpu/drm/panel/panel-dsi-cm.c
@@ -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;
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 09/10] panel/ebbg-ft8719: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
` (7 preceding siblings ...)
2025-04-01 16:03 ` [PATCH 08/10] panel/dsi-cm: " Anusha Srivatsa
@ 2025-04-01 16:03 ` Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 10/10] panel/panel-edp: " Anusha Srivatsa
` (2 subsequent siblings)
11 siblings, 0 replies; 28+ messages in thread
From: Anusha Srivatsa @ 2025-04-01 16:03 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel, Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-ebbg-ft8719.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c
index 0bfed0ec0bbcef79c767db05846a3e3da56e82ad..fb9f9f42be4f26e75d4481742d8d1c81ea7095d1 100644
--- a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c
+++ b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c
@@ -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");
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 10/10] panel/panel-edp: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
` (8 preceding siblings ...)
2025-04-01 16:03 ` [PATCH 09/10] panel/ebbg-ft8719: " Anusha Srivatsa
@ 2025-04-01 16:03 ` Anusha Srivatsa
2025-04-02 14:24 ` [PATCH 00/10] drm/panel: " Neil Armstrong
2025-04-07 8:34 ` Maxime Ripard
11 siblings, 0 replies; 28+ messages in thread
From: Anusha Srivatsa @ 2025-04-01 16:03 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel, Anusha Srivatsa
Move to using the new API devm_drm_panel_alloc() to allocate the
panel.
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
drivers/gpu/drm/panel/panel-edp.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index 52028c8f8988d4b771bd2604256aea4cde4f4020..e8fe0014143fd0f86ee51c94f2afd24416fa0c12 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -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;
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
` (9 preceding siblings ...)
2025-04-01 16:03 ` [PATCH 10/10] panel/panel-edp: " Anusha Srivatsa
@ 2025-04-02 14:24 ` Neil Armstrong
2025-04-07 8:34 ` Maxime Ripard
11 siblings, 0 replies; 28+ messages in thread
From: Neil Armstrong @ 2025-04-02 14:24 UTC (permalink / raw)
To: Anusha Srivatsa, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel
On 01/04/2025 18:03, Anusha Srivatsa wrote:
> 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 <asrivats@redhat.com>
> ---
> 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,
Looks good to me
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
` (10 preceding siblings ...)
2025-04-02 14:24 ` [PATCH 00/10] drm/panel: " Neil Armstrong
@ 2025-04-07 8:34 ` Maxime Ripard
11 siblings, 0 replies; 28+ messages in thread
From: Maxime Ripard @ 2025-04-07 8:34 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson, Anusha Srivatsa
Cc: Maxime Ripard, dri-devel, linux-kernel
On Tue, 01 Apr 2025 12:03:43 -0400, Anusha Srivatsa wrote:
> 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
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 ` [PATCH 04/10] panel/auo-a030jtn01: " Anusha Srivatsa
@ 2025-04-07 15:49 ` Imre Deak
2025-04-07 23:22 ` Dixit, Ashutosh
2025-04-08 12:48 ` Maxime Ripard
0 siblings, 2 replies; 28+ messages in thread
From: Imre Deak @ 2025-04-07 15:49 UTC (permalink / raw)
To: Anusha Srivatsa
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson, dri-devel, linux-kernel
Hi,
On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote:
> Move to using the new API devm_drm_panel_alloc() to allocate the
> panel.
>
> Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
> ---
> drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> index 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41efaf4028950214b056a95 100644
> --- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> +++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> @@ -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(...);
> + 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
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-07 15:49 ` Imre Deak
@ 2025-04-07 23:22 ` Dixit, Ashutosh
2025-04-08 0:18 ` Dixit, Ashutosh
2025-04-08 12:48 ` Maxime Ripard
1 sibling, 1 reply; 28+ messages in thread
From: Dixit, Ashutosh @ 2025-04-07 23:22 UTC (permalink / raw)
To: Anusha Srivatsa
Cc: imre.deak, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Linus Walleij, Joel Selvaraj, Douglas Anderson, dri-devel,
linux-kernel
On Mon, 07 Apr 2025 08:49:23 -0700, Imre Deak wrote:
>
> Hi,
>
> On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote:
> > Move to using the new API devm_drm_panel_alloc() to allocate the
> > panel.
> >
> > Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
> > ---
> > drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------
> > 1 file changed, 4 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > index 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41efaf4028950214b056a95 100644
> > --- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > +++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > @@ -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(...);
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.
>
> > + 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
> >
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-07 23:22 ` Dixit, Ashutosh
@ 2025-04-08 0:18 ` Dixit, Ashutosh
2025-04-08 1:40 ` Dixit, Ashutosh
0 siblings, 1 reply; 28+ messages in thread
From: Dixit, Ashutosh @ 2025-04-08 0:18 UTC (permalink / raw)
To: Anusha Srivatsa
Cc: imre.deak, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Linus Walleij, Joel Selvaraj, Douglas Anderson, dri-devel,
linux-kernel
On Mon, 07 Apr 2025 16:22:40 -0700, Dixit, Ashutosh wrote:
>
> On Mon, 07 Apr 2025 08:49:23 -0700, Imre Deak wrote:
> >
> > Hi,
> >
> > On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote:
> > > Move to using the new API devm_drm_panel_alloc() to allocate the
> > > panel.
> > >
> > > Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
> > > ---
> > > drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------
> > > 1 file changed, 4 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > index 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41efaf4028950214b056a95 100644
> > > --- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > +++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > @@ -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(...);
>
> 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.
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.
>
> >
> > > + 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
> > >
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-08 0:18 ` Dixit, Ashutosh
@ 2025-04-08 1:40 ` Dixit, Ashutosh
2025-04-08 4:01 ` Dixit, Ashutosh
0 siblings, 1 reply; 28+ messages in thread
From: Dixit, Ashutosh @ 2025-04-08 1:40 UTC (permalink / raw)
To: Anusha Srivatsa
Cc: imre.deak, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Linus Walleij, Joel Selvaraj, Douglas Anderson, dri-devel,
linux-kernel
On Mon, 07 Apr 2025 17:18:23 -0700, Dixit, Ashutosh wrote:
>
> On Mon, 07 Apr 2025 16:22:40 -0700, Dixit, Ashutosh wrote:
> >
> > On Mon, 07 Apr 2025 08:49:23 -0700, Imre Deak wrote:
> > >
> > > Hi,
> > >
> > > On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote:
> > > > Move to using the new API devm_drm_panel_alloc() to allocate the
> > > > panel.
> > > >
> > > > Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
> > > > ---
> > > > drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------
> > > > 1 file changed, 4 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > index 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41efaf4028950214b056a95 100644
> > > > --- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > +++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > @@ -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(...);
> >
> > 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.
>
> 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,
| ^~~~~~~~~~~~~~~~~~~~
>
>
> >
> > >
> > > > + 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
> > > >
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-08 1:40 ` Dixit, Ashutosh
@ 2025-04-08 4:01 ` Dixit, Ashutosh
2025-04-08 6:47 ` Borah, Chaitanya Kumar
0 siblings, 1 reply; 28+ messages in thread
From: Dixit, Ashutosh @ 2025-04-08 4:01 UTC (permalink / raw)
To: Anusha Srivatsa
Cc: imre.deak, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Linus Walleij, Joel Selvaraj, Douglas Anderson, dri-devel,
linux-kernel
On Mon, 07 Apr 2025 18:40:24 -0700, Dixit, Ashutosh wrote:
>
> On Mon, 07 Apr 2025 17:18:23 -0700, Dixit, Ashutosh wrote:
> >
> > On Mon, 07 Apr 2025 16:22:40 -0700, Dixit, Ashutosh wrote:
> > >
> > > On Mon, 07 Apr 2025 08:49:23 -0700, Imre Deak wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote:
> > > > > Move to using the new API devm_drm_panel_alloc() to allocate the
> > > > > panel.
> > > > >
> > > > > Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
> > > > > ---
> > > > > drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------
> > > > > 1 file changed, 4 insertions(+), 6 deletions(-)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > index 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41efaf4028950214b056a95 100644
> > > > > --- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > +++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > @@ -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(...);
> > >
> > > 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.
> >
> > 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,
> | ^~~~~~~~~~~~~~~~~~~~
>
In case it is not clear, to reproduce and fix these, do:
make -j$(nproc) allmodconfig
>
>
>
> >
> >
> > >
> > > >
> > > > > + 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
> > > > >
^ permalink raw reply [flat|nested] 28+ messages in thread
* RE: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-08 4:01 ` Dixit, Ashutosh
@ 2025-04-08 6:47 ` Borah, Chaitanya Kumar
2025-04-08 12:50 ` Maxime Ripard
0 siblings, 1 reply; 28+ messages in thread
From: Borah, Chaitanya Kumar @ 2025-04-08 6:47 UTC (permalink / raw)
To: Dixit, Ashutosh, Anusha Srivatsa
Cc: Deak, Imre, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Linus Walleij, Joel Selvaraj, Douglas Anderson,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
> -----Original Message-----
> From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of Dixit,
> Ashutosh
> Sent: Tuesday, April 8, 2025 9:31 AM
> To: Anusha Srivatsa <asrivats@redhat.com>
> Cc: Deak, Imre <imre.deak@intel.com>; Neil Armstrong
> <neil.armstrong@linaro.org>; Jessica Zhang <quic_jesszhan@quicinc.com>;
> Maarten Lankhorst <maarten.lankhorst@linux.intel.com>; Maxime Ripard
> <mripard@kernel.org>; Thomas Zimmermann <tzimmermann@suse.de>;
> David Airlie <airlied@gmail.com>; Simona Vetter <simona@ffwll.ch>; Linus
> Walleij <linus.walleij@linaro.org>; Joel Selvaraj <jo@jsfamily.in>; Douglas
> Anderson <dianders@chromium.org>; dri-devel@lists.freedesktop.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation
> in place of devm_kzalloc()
>
> On Mon, 07 Apr 2025 18:40:24 -0700, Dixit, Ashutosh wrote:
> >
> > On Mon, 07 Apr 2025 17:18:23 -0700, Dixit, Ashutosh wrote:
> > >
> > > On Mon, 07 Apr 2025 16:22:40 -0700, Dixit, Ashutosh wrote:
> > > >
> > > > On Mon, 07 Apr 2025 08:49:23 -0700, Imre Deak wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote:
> > > > > > Move to using the new API devm_drm_panel_alloc() to allocate
> > > > > > the panel.
> > > > > >
> > > > > > Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
> > > > > > ---
> > > > > > drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------
> > > > > > 1 file changed, 4 insertions(+), 6 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > index
> > > > > >
> 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41e
> > > > > > faf4028950214b056a95 100644
> > > > > > --- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > +++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > @@ -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(...);
> > > >
> > > > 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.
> > >
> > > 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,
> > | ^~~~~~~~~~~~~~~~~~~~
> >
>
> 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
> >
> >
> >
> > >
> > >
> > > >
> > > > >
> > > > > > + 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
> > > > > >
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 06/10] panel/th101mb31ig002-28a: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 ` [PATCH 06/10] panel/th101mb31ig002-28a: " Anusha Srivatsa
@ 2025-04-08 8:24 ` Thomas Zimmermann
0 siblings, 0 replies; 28+ messages in thread
From: Thomas Zimmermann @ 2025-04-08 8:24 UTC (permalink / raw)
To: Anusha Srivatsa, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel
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:
> Move to using the new API devm_drm_panel_alloc() to allocate the
> panel.
>
> Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
> ---
> drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
> index 0b87f1e6ecaea71f10a249bdc53466d281f07a34..7ae196424b6dfb731cd1ea48363c4fa1e6c36464 100644
> --- a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
> +++ b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
> @@ -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;
>
--
--
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)
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 07/10] panel/boe-tv101wum-ll2: Use refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 ` [PATCH 07/10] panel/boe-tv101wum-ll2: " Anusha Srivatsa
@ 2025-04-08 8:27 ` Thomas Zimmermann
0 siblings, 0 replies; 28+ messages in thread
From: Thomas Zimmermann @ 2025-04-08 8:27 UTC (permalink / raw)
To: Anusha Srivatsa, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson
Cc: dri-devel, linux-kernel
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_follower
linux/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:
> Move to using the new API devm_drm_panel_alloc() to allocate the
> panel.
>
> Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
> ---
> drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
> index 50e4a5341bc65727b5ed6ba43a11f5ab9ac9f5b9..04c7890cc51db43bdc6e38cdae8f7f21fd48009f 100644
> --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
> +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
> @@ -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);
>
--
--
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)
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-07 15:49 ` Imre Deak
2025-04-07 23:22 ` Dixit, Ashutosh
@ 2025-04-08 12:48 ` Maxime Ripard
1 sibling, 0 replies; 28+ messages in thread
From: Maxime Ripard @ 2025-04-08 12:48 UTC (permalink / raw)
To: Imre Deak
Cc: Anusha Srivatsa, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Joel Selvaraj, Douglas Anderson, dri-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1378 bytes --]
On Mon, Apr 07, 2025 at 06:49:23PM +0300, Imre Deak wrote:
> Hi,
>
> On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote:
> > Move to using the new API devm_drm_panel_alloc() to allocate the
> > panel.
> >
> > Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
> > ---
> > drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------
> > 1 file changed, 4 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > index 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41efaf4028950214b056a95 100644
> > --- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > +++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > @@ -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(...);
>
I fixed it (and the other breakages) there:
https://lore.kernel.org/dri-devel/20250408122008.1676235-1-mripard@kernel.org/
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-08 6:47 ` Borah, Chaitanya Kumar
@ 2025-04-08 12:50 ` Maxime Ripard
2025-04-08 13:03 ` Borah, Chaitanya Kumar
0 siblings, 1 reply; 28+ messages in thread
From: Maxime Ripard @ 2025-04-08 12:50 UTC (permalink / raw)
To: Borah, Chaitanya Kumar
Cc: Dixit, Ashutosh, Anusha Srivatsa, Deak, Imre, Neil Armstrong,
Jessica Zhang, Maarten Lankhorst, Thomas Zimmermann, David Airlie,
Simona Vetter, Linus Walleij, Joel Selvaraj, Douglas Anderson,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 6768 bytes --]
On Tue, Apr 08, 2025 at 06:47:06AM +0000, Borah, Chaitanya Kumar wrote:
>
>
> > -----Original Message-----
> > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of Dixit,
> > Ashutosh
> > Sent: Tuesday, April 8, 2025 9:31 AM
> > To: Anusha Srivatsa <asrivats@redhat.com>
> > Cc: Deak, Imre <imre.deak@intel.com>; Neil Armstrong
> > <neil.armstrong@linaro.org>; Jessica Zhang <quic_jesszhan@quicinc.com>;
> > Maarten Lankhorst <maarten.lankhorst@linux.intel.com>; Maxime Ripard
> > <mripard@kernel.org>; Thomas Zimmermann <tzimmermann@suse.de>;
> > David Airlie <airlied@gmail.com>; Simona Vetter <simona@ffwll.ch>; Linus
> > Walleij <linus.walleij@linaro.org>; Joel Selvaraj <jo@jsfamily.in>; Douglas
> > Anderson <dianders@chromium.org>; dri-devel@lists.freedesktop.org; linux-
> > kernel@vger.kernel.org
> > Subject: Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation
> > in place of devm_kzalloc()
> >
> > On Mon, 07 Apr 2025 18:40:24 -0700, Dixit, Ashutosh wrote:
> > >
> > > On Mon, 07 Apr 2025 17:18:23 -0700, Dixit, Ashutosh wrote:
> > > >
> > > > On Mon, 07 Apr 2025 16:22:40 -0700, Dixit, Ashutosh wrote:
> > > > >
> > > > > On Mon, 07 Apr 2025 08:49:23 -0700, Imre Deak wrote:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote:
> > > > > > > Move to using the new API devm_drm_panel_alloc() to allocate
> > > > > > > the panel.
> > > > > > >
> > > > > > > Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
> > > > > > > ---
> > > > > > > drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------
> > > > > > > 1 file changed, 4 insertions(+), 6 deletions(-)
> > > > > > >
> > > > > > > diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > > b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > > index
> > > > > > >
> > 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41e
> > > > > > > faf4028950214b056a95 100644
> > > > > > > --- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > > +++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > > @@ -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(...);
> > > > >
> > > > > 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.
> > > >
> > > > 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,
> > > | ^~~~~~~~~~~~~~~~~~~~
> > >
> >
> > 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.
I couldn't reproduce this one on current drm-misc-next with arm64 and
x86 allmodconfig. Could you share your configuration?
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* RE: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-08 12:50 ` Maxime Ripard
@ 2025-04-08 13:03 ` Borah, Chaitanya Kumar
2025-04-08 13:51 ` Jani Nikula
0 siblings, 1 reply; 28+ messages in thread
From: Borah, Chaitanya Kumar @ 2025-04-08 13:03 UTC (permalink / raw)
To: Maxime Ripard
Cc: Dixit, Ashutosh, Anusha Srivatsa, Deak, Imre, Neil Armstrong,
Jessica Zhang, Maarten Lankhorst, Thomas Zimmermann, David Airlie,
Simona Vetter, Linus Walleij, Joel Selvaraj, Douglas Anderson,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Maxime Ripard <mripard@kernel.org>
> Sent: Tuesday, April 8, 2025 6:20 PM
> To: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>
> Cc: Dixit, Ashutosh <ashutosh.dixit@intel.com>; Anusha Srivatsa
> <asrivats@redhat.com>; Deak, Imre <imre.deak@intel.com>; Neil Armstrong
> <neil.armstrong@linaro.org>; Jessica Zhang <quic_jesszhan@quicinc.com>;
> Maarten Lankhorst <maarten.lankhorst@linux.intel.com>; Thomas
> Zimmermann <tzimmermann@suse.de>; David Airlie <airlied@gmail.com>;
> Simona Vetter <simona@ffwll.ch>; Linus Walleij <linus.walleij@linaro.org>;
> Joel Selvaraj <jo@jsfamily.in>; Douglas Anderson <dianders@chromium.org>;
> dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in
> place of devm_kzalloc()
>
> On Tue, Apr 08, 2025 at 06:47:06AM +0000, Borah, Chaitanya Kumar wrote:
> >
> >
> > > -----Original Message-----
> > > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf
> > > Of Dixit, Ashutosh
> > > Sent: Tuesday, April 8, 2025 9:31 AM
> > > To: Anusha Srivatsa <asrivats@redhat.com>
> > > Cc: Deak, Imre <imre.deak@intel.com>; Neil Armstrong
> > > <neil.armstrong@linaro.org>; Jessica Zhang
> > > <quic_jesszhan@quicinc.com>; Maarten Lankhorst
> > > <maarten.lankhorst@linux.intel.com>; Maxime Ripard
> > > <mripard@kernel.org>; Thomas Zimmermann <tzimmermann@suse.de>;
> David
> > > Airlie <airlied@gmail.com>; Simona Vetter <simona@ffwll.ch>; Linus
> > > Walleij <linus.walleij@linaro.org>; Joel Selvaraj <jo@jsfamily.in>;
> > > Douglas Anderson <dianders@chromium.org>;
> > > dri-devel@lists.freedesktop.org; linux- kernel@vger.kernel.org
> > > Subject: Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted
> > > allocation in place of devm_kzalloc()
> > >
> > > On Mon, 07 Apr 2025 18:40:24 -0700, Dixit, Ashutosh wrote:
> > > >
> > > > On Mon, 07 Apr 2025 17:18:23 -0700, Dixit, Ashutosh wrote:
> > > > >
> > > > > On Mon, 07 Apr 2025 16:22:40 -0700, Dixit, Ashutosh wrote:
> > > > > >
> > > > > > On Mon, 07 Apr 2025 08:49:23 -0700, Imre Deak wrote:
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote:
> > > > > > > > Move to using the new API devm_drm_panel_alloc() to
> > > > > > > > allocate the panel.
> > > > > > > >
> > > > > > > > Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
> > > > > > > > ---
> > > > > > > > drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10
> > > > > > > > ++++------
> > > > > > > > 1 file changed, 4 insertions(+), 6 deletions(-)
> > > > > > > >
> > > > > > > > diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > > > b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > > > index
> > > > > > > >
> > > 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41e
> > > > > > > > faf4028950214b056a95 100644
> > > > > > > > --- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > > > +++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > > > > > > > @@ -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(...);
> > > > > >
> > > > > > 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.
> > > > >
> > > > > 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,
> > > > | ^~~~~~~~~~~~~~~~~~~~
> > > >
> > >
> > > 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.
>
> 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
> Maxime
^ permalink raw reply [flat|nested] 28+ messages in thread
* RE: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-08 13:03 ` Borah, Chaitanya Kumar
@ 2025-04-08 13:51 ` Jani Nikula
2025-04-08 14:26 ` Dmitry Baryshkov
0 siblings, 1 reply; 28+ messages in thread
From: Jani Nikula @ 2025-04-08 13:51 UTC (permalink / raw)
To: Borah, Chaitanya Kumar, Maxime Ripard
Cc: Dixit, Ashutosh, Anusha Srivatsa, Deak, Imre, Neil Armstrong,
Jessica Zhang, Maarten Lankhorst, Thomas Zimmermann, David Airlie,
Simona Vetter, Linus Walleij, Joel Selvaraj, Douglas Anderson,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
On Tue, 08 Apr 2025, "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com> wrote:
>> > 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.
>>
>> 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.
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-08 13:51 ` Jani Nikula
@ 2025-04-08 14:26 ` Dmitry Baryshkov
2025-04-08 14:38 ` Lucas De Marchi
0 siblings, 1 reply; 28+ messages in thread
From: Dmitry Baryshkov @ 2025-04-08 14:26 UTC (permalink / raw)
To: Jani Nikula
Cc: Borah, Chaitanya Kumar, Maxime Ripard, Dixit, Ashutosh,
Anusha Srivatsa, Deak, Imre, Neil Armstrong, Jessica Zhang,
Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter,
Linus Walleij, Joel Selvaraj, Douglas Anderson,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
On Tue, Apr 08, 2025 at 04:51:25PM +0300, Jani Nikula wrote:
> On Tue, 08 Apr 2025, "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com> wrote:
> >> > 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.
> >>
> >> 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.
I'l send a patch.
>
>
> BR,
> Jani.
>
>
> --
> Jani Nikula, Intel
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
2025-04-08 14:26 ` Dmitry Baryshkov
@ 2025-04-08 14:38 ` Lucas De Marchi
0 siblings, 0 replies; 28+ messages in thread
From: Lucas De Marchi @ 2025-04-08 14:38 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Jani Nikula, Borah, Chaitanya Kumar, Maxime Ripard,
Dixit, Ashutosh, Anusha Srivatsa, Deak, Imre, Neil Armstrong,
Jessica Zhang, Maarten Lankhorst, Thomas Zimmermann, David Airlie,
Simona Vetter, Linus Walleij, Joel Selvaraj, Douglas Anderson,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
On Tue, Apr 08, 2025 at 05:26:27PM +0300, Dmitry Baryshkov wrote:
>On Tue, Apr 08, 2025 at 04:51:25PM +0300, Jani Nikula wrote:
>> On Tue, 08 Apr 2025, "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com> wrote:
>> >> > 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.
>> >>
>> >> 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.
>
>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
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 02/10] panel/arm-versatile: Use the refcounted allocation in place of devm_kzalloc()
2025-04-01 16:03 ` [PATCH 02/10] panel/arm-versatile: " Anusha Srivatsa
@ 2025-04-15 8:01 ` Linus Walleij
0 siblings, 0 replies; 28+ messages in thread
From: Linus Walleij @ 2025-04-15 8:01 UTC (permalink / raw)
To: Anusha Srivatsa
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Joel Selvaraj,
Douglas Anderson, dri-devel, linux-kernel
On Tue, Apr 1, 2025 at 7:05 PM Anusha Srivatsa <asrivats@redhat.com> wrote:
> Move to using the new API devm_drm_panel_alloc() to allocate the
> panel.
>
> Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2025-04-15 8:02 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 16:03 [PATCH 00/10] drm/panel: Use refcounted allocation in place of devm_kzalloc() Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 01/10] panel/abt-y030xx067a: Use the " Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 02/10] panel/arm-versatile: " Anusha Srivatsa
2025-04-15 8:01 ` Linus Walleij
2025-04-01 16:03 ` [PATCH 03/10] panel/z00t-tm5p5-n35596: Use " Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 04/10] panel/auo-a030jtn01: " Anusha Srivatsa
2025-04-07 15:49 ` Imre Deak
2025-04-07 23:22 ` Dixit, Ashutosh
2025-04-08 0:18 ` Dixit, Ashutosh
2025-04-08 1:40 ` Dixit, Ashutosh
2025-04-08 4:01 ` Dixit, Ashutosh
2025-04-08 6:47 ` Borah, Chaitanya Kumar
2025-04-08 12:50 ` Maxime Ripard
2025-04-08 13:03 ` Borah, Chaitanya Kumar
2025-04-08 13:51 ` Jani Nikula
2025-04-08 14:26 ` Dmitry Baryshkov
2025-04-08 14:38 ` Lucas De Marchi
2025-04-08 12:48 ` Maxime Ripard
2025-04-01 16:03 ` [PATCH 05/10] panel/bf060y8m-aj0: " Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 06/10] panel/th101mb31ig002-28a: " Anusha Srivatsa
2025-04-08 8:24 ` Thomas Zimmermann
2025-04-01 16:03 ` [PATCH 07/10] panel/boe-tv101wum-ll2: " Anusha Srivatsa
2025-04-08 8:27 ` Thomas Zimmermann
2025-04-01 16:03 ` [PATCH 08/10] panel/dsi-cm: " Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 09/10] panel/ebbg-ft8719: " Anusha Srivatsa
2025-04-01 16:03 ` [PATCH 10/10] panel/panel-edp: " Anusha Srivatsa
2025-04-02 14:24 ` [PATCH 00/10] drm/panel: " Neil Armstrong
2025-04-07 8:34 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox