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
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 >
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
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 > >
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 > > >
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 > > > >
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 > > > > >
> -----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 > > > > > >
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
> -----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
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
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
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
© 2016 - 2025 Red Hat, Inc.