linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] drm: import DMA_BUF module namespace
@ 2021-10-27 15:25 Marcel Ziswiler
  2021-10-27 18:30 ` Thomas Zimmermann
  0 siblings, 1 reply; 5+ messages in thread
From: Marcel Ziswiler @ 2021-10-27 15:25 UTC (permalink / raw)
  To: Linux-Next Mailing List, dri-devel, open list, Linux ARM,
	Thomas Zimmermann
  Cc: Arnd Bergmann, Alexandre Belloni, David Airlie, Maxime Ripard,
	Andrey Konovalov, Stephen Rothwell, Maarten Lankhorst,
	Linus Walleij, Daniel Vetter, Marcel Ziswiler,
	Linux Kernel Functional Testing

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Today's -next fails building arm64 defconfig as follows:

ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vunmap from
 namespace DMA_BUF, but does not import it.
ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vmap from
 namespace DMA_BUF, but does not import it.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Fixes: commit 4b2b5e142ff4 ("drm: Move GEM memory managers into modules")
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

 drivers/gpu/drm/drm_gem_cma_helper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
index 6f7b3f8ec04d3..69f8564ad11cd 100644
--- a/drivers/gpu/drm/drm_gem_cma_helper.c
+++ b/drivers/gpu/drm/drm_gem_cma_helper.c
@@ -23,6 +23,8 @@
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_vma_manager.h>
 
+MODULE_IMPORT_NS(DMA_BUF);
+
 /**
  * DOC: cma helpers
  *
-- 
2.26.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] drm: import DMA_BUF module namespace
  2021-10-27 15:25 [PATCH v1] drm: import DMA_BUF module namespace Marcel Ziswiler
@ 2021-10-27 18:30 ` Thomas Zimmermann
  2021-10-27 20:54   ` Marcel Ziswiler
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Zimmermann @ 2021-10-27 18:30 UTC (permalink / raw)
  To: Marcel Ziswiler, Linux-Next Mailing List, dri-devel, open list,
	Linux ARM
  Cc: Arnd Bergmann, Alexandre Belloni, David Airlie, Maxime Ripard,
	Andrey Konovalov, Stephen Rothwell, Maarten Lankhorst,
	Linus Walleij, Daniel Vetter, Marcel Ziswiler,
	Linux Kernel Functional Testing


[-- Attachment #1.1.1: Type: text/plain, Size: 1725 bytes --]

Hi,

thanks for the patch.

Am 27.10.21 um 17:25 schrieb Marcel Ziswiler:
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> Today's -next fails building arm64 defconfig as follows:
> 
> ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vunmap from
>   namespace DMA_BUF, but does not import it.
> ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vmap from
>   namespace DMA_BUF, but does not import it.
> 
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> Fixes: commit 4b2b5e142ff4 ("drm: Move GEM memory managers into modules")
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> ---
> 
>   drivers/gpu/drm/drm_gem_cma_helper.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
> index 6f7b3f8ec04d3..69f8564ad11cd 100644
> --- a/drivers/gpu/drm/drm_gem_cma_helper.c
> +++ b/drivers/gpu/drm/drm_gem_cma_helper.c
> @@ -23,6 +23,8 @@
>   #include <drm/drm_gem_cma_helper.h>
>   #include <drm/drm_vma_manager.h>
>   
> +MODULE_IMPORT_NS(DMA_BUF);

Could this line be moved to the bottom of the file, where the other 
MODULE statements are?

In the fixed commit 4b2b5e142ff4, there's a similar change for 
drm_gem_shmem_helper.c. It uses dma-buf_vmap as well. Does that module 
require the same fix?

Do you have any idea why I don't see these errors in my builds?

Best regards
Thomas

> +
>   /**
>    * DOC: cma helpers
>    *
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] drm: import DMA_BUF module namespace
  2021-10-27 18:30 ` Thomas Zimmermann
@ 2021-10-27 20:54   ` Marcel Ziswiler
  2021-10-28 18:45     ` Thomas Zimmermann
  0 siblings, 1 reply; 5+ messages in thread
From: Marcel Ziswiler @ 2021-10-27 20:54 UTC (permalink / raw)
  To: dri-devel, linux-arm-kernel, linux-next, linux-kernel, tzimmermann
  Cc: sfr, airlied, andreyknvl, linus.walleij, arnd, lkft,
	maarten.lankhorst, alexandre.belloni, mripard, daniel

Sali Thomas

On Wed, 2021-10-27 at 20:30 +0200, Thomas Zimmermann wrote:
> Hi,
> 
> thanks for the patch.

You are very welcome.

> Am 27.10.21 um 17:25 schrieb Marcel Ziswiler:
> > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > Today's -next fails building arm64 defconfig as follows:
> > 
> > ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vunmap from
> >   namespace DMA_BUF, but does not import it.
> > ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vmap from
> >   namespace DMA_BUF, but does not import it.
> > 
> > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > Fixes: commit 4b2b5e142ff4 ("drm: Move GEM memory managers into modules")
> > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > ---
> > 
> >   drivers/gpu/drm/drm_gem_cma_helper.c | 2 ++
> >   1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
> > index 6f7b3f8ec04d3..69f8564ad11cd 100644
> > --- a/drivers/gpu/drm/drm_gem_cma_helper.c
> > +++ b/drivers/gpu/drm/drm_gem_cma_helper.c
> > @@ -23,6 +23,8 @@
> >   #include <drm/drm_gem_cma_helper.h>
> >   #include <drm/drm_vma_manager.h>
> >   
> > +MODULE_IMPORT_NS(DMA_BUF);
> 
> Could this line be moved to the bottom of the file, where the other 
> MODULE statements are?

Hehe, good question. I was actually asking myself the same but quickly looking at a few files and they all had
it after their includes towards the top. Turns out that was rather short sighted...

Let me look more closely. Current -next has exactly 200 files with a MODULE_IMPORT_NS statement. Okay, some of
which are documentation. Anyway, 132 of which do have it with their other MODULE macros towards the end as you
suggest. 20 of which and mainly DRM stuff has it towards the top after them includes. Funny.

What does the documentation suggest?

Documentation/core-api/symbol-namespaces.rst

"It is advisable to add the MODULE_IMPORT_NS() statement close to other module
metadata definitions like MODULE_AUTHOR() or MODULE_LICENSE(). Refer to section
5. for a way to create missing import statements automatically."

There you go. Plus there is even some fancy automation (;-p).

So let me move it down there then.

> In the fixed commit 4b2b5e142ff4, there's a similar change for 
> drm_gem_shmem_helper.c. It uses dma-buf_vmap as well. Does that module 
> require the same fix?

Likely. Let me just run ze automation and see what we get...

> Do you have any idea why I don't see these errors in my builds?

Well, I guess, there are various KCONFIG symbols influencing that whole story. How about e.g.

init/Kconfig:config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS

> Best regards
> Thomas

Cheers

Marcel

> > +
> >   /**
> >    * DOC: cma helpers
> >    *
> > 
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer

-- 
Best regards - Mit freundlichen Grüssen - Meilleures salutations

Marcel Ziswiler
Software Team Lead - Embedded Linux BSP

Toradex AG
Ebenaustrasse 10 | 6048 Horw/Luzern | Switzerland | T: +41 41 500 4800
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] drm: import DMA_BUF module namespace
  2021-10-27 20:54   ` Marcel Ziswiler
@ 2021-10-28 18:45     ` Thomas Zimmermann
  2021-10-29  7:19       ` Marcel Ziswiler
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Zimmermann @ 2021-10-28 18:45 UTC (permalink / raw)
  To: Marcel Ziswiler, dri-devel, linux-arm-kernel, linux-next, linux-kernel
  Cc: sfr, airlied, andreyknvl, linus.walleij, arnd, lkft,
	maarten.lankhorst, alexandre.belloni, mripard, daniel


[-- Attachment #1.1.1: Type: text/plain, Size: 3580 bytes --]

Hi

Am 27.10.21 um 22:54 schrieb Marcel Ziswiler:
> Sali Thomas
> 
> On Wed, 2021-10-27 at 20:30 +0200, Thomas Zimmermann wrote:
>> Hi,
>>
>> thanks for the patch.
> 
> You are very welcome.
> 
>> Am 27.10.21 um 17:25 schrieb Marcel Ziswiler:
>>> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>>
>>> Today's -next fails building arm64 defconfig as follows:
>>>
>>> ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vunmap from
>>>    namespace DMA_BUF, but does not import it.
>>> ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vmap from
>>>    namespace DMA_BUF, but does not import it.
>>>
>>> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>>> Fixes: commit 4b2b5e142ff4 ("drm: Move GEM memory managers into modules")
>>> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>>
>>> ---
>>>
>>>    drivers/gpu/drm/drm_gem_cma_helper.c | 2 ++
>>>    1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
>>> index 6f7b3f8ec04d3..69f8564ad11cd 100644
>>> --- a/drivers/gpu/drm/drm_gem_cma_helper.c
>>> +++ b/drivers/gpu/drm/drm_gem_cma_helper.c
>>> @@ -23,6 +23,8 @@
>>>    #include <drm/drm_gem_cma_helper.h>
>>>    #include <drm/drm_vma_manager.h>
>>>    
>>> +MODULE_IMPORT_NS(DMA_BUF);
>>
>> Could this line be moved to the bottom of the file, where the other
>> MODULE statements are?
> 
> Hehe, good question. I was actually asking myself the same but quickly looking at a few files and they all had
> it after their includes towards the top. Turns out that was rather short sighted...
> 
> Let me look more closely. Current -next has exactly 200 files with a MODULE_IMPORT_NS statement. Okay, some of
> which are documentation. Anyway, 132 of which do have it with their other MODULE macros towards the end as you
> suggest. 20 of which and mainly DRM stuff has it towards the top after them includes. Funny.
> 
> What does the documentation suggest?
> 
> Documentation/core-api/symbol-namespaces.rst
> 
> "It is advisable to add the MODULE_IMPORT_NS() statement close to other module
> metadata definitions like MODULE_AUTHOR() or MODULE_LICENSE(). Refer to section
> 5. for a way to create missing import statements automatically."
> 
> There you go. Plus there is even some fancy automation (;-p).
> 
> So let me move it down there then.

Will you send out another revision of the patch?

> 
>> In the fixed commit 4b2b5e142ff4, there's a similar change for
>> drm_gem_shmem_helper.c. It uses dma-buf_vmap as well. Does that module
>> require the same fix?
> 
> Likely. Let me just run ze automation and see what we get...
> 
>> Do you have any idea why I don't see these errors in my builds?
> 
> Well, I guess, there are various KCONFIG symbols influencing that whole story. How about e.g.
> 
> init/Kconfig:config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS

Thanks for the hint.

Best regards
Thomas

> 
>> Best regards
>> Thomas
> 
> Cheers
> 
> Marcel
> 
>>> +
>>>    /**
>>>     * DOC: cma helpers
>>>     *
>>>
>>
>> -- 
>> Thomas Zimmermann
>> Graphics Driver Developer
>> SUSE Software Solutions Germany GmbH
>> Maxfeldstr. 5, 90409 Nürnberg, Germany
>> (HRB 36809, AG Nürnberg)
>> Geschäftsführer: Felix Imendörffer
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] drm: import DMA_BUF module namespace
  2021-10-28 18:45     ` Thomas Zimmermann
@ 2021-10-29  7:19       ` Marcel Ziswiler
  0 siblings, 0 replies; 5+ messages in thread
From: Marcel Ziswiler @ 2021-10-29  7:19 UTC (permalink / raw)
  To: dri-devel, linux-arm-kernel, linux-next, linux-kernel, tzimmermann
  Cc: sfr, airlied, andreyknvl, linus.walleij, arnd, lkft,
	maarten.lankhorst, alexandre.belloni, mripard, daniel

On Thu, 2021-10-28 at 20:45 +0200, Thomas Zimmermann wrote:
> Hi
> 
> Am 27.10.21 um 22:54 schrieb Marcel Ziswiler:
> > Sali Thomas
> > 
> > On Wed, 2021-10-27 at 20:30 +0200, Thomas Zimmermann wrote:
> > > Hi,
> > > 
> > > thanks for the patch.
> > 
> > You are very welcome.
> > 
> > > Am 27.10.21 um 17:25 schrieb Marcel Ziswiler:
> > > > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > > > 
> > > > Today's -next fails building arm64 defconfig as follows:
> > > > 
> > > > ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vunmap from
> > > >    namespace DMA_BUF, but does not import it.
> > > > ERROR: modpost: module drm_cma_helper uses symbol dma_buf_vmap from
> > > >    namespace DMA_BUF, but does not import it.
> > > > 
> > > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > > > Fixes: commit 4b2b5e142ff4 ("drm: Move GEM memory managers into modules")
> > > > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > > > 
> > > > ---
> > > > 
> > > >    drivers/gpu/drm/drm_gem_cma_helper.c | 2 ++
> > > >    1 file changed, 2 insertions(+)
> > > > 
> > > > diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
> > > > index 6f7b3f8ec04d3..69f8564ad11cd 100644
> > > > --- a/drivers/gpu/drm/drm_gem_cma_helper.c
> > > > +++ b/drivers/gpu/drm/drm_gem_cma_helper.c
> > > > @@ -23,6 +23,8 @@
> > > >    #include <drm/drm_gem_cma_helper.h>
> > > >    #include <drm/drm_vma_manager.h>
> > > >    
> > > > +MODULE_IMPORT_NS(DMA_BUF);
> > > 
> > > Could this line be moved to the bottom of the file, where the other
> > > MODULE statements are?
> > 
> > Hehe, good question. I was actually asking myself the same but quickly looking at a few files and they all
> > had
> > it after their includes towards the top. Turns out that was rather short sighted...
> > 
> > Let me look more closely. Current -next has exactly 200 files with a MODULE_IMPORT_NS statement. Okay, some
> > of
> > which are documentation. Anyway, 132 of which do have it with their other MODULE macros towards the end as
> > you
> > suggest. 20 of which and mainly DRM stuff has it towards the top after them includes. Funny.
> > 
> > What does the documentation suggest?
> > 
> > Documentation/core-api/symbol-namespaces.rst
> > 
> > "It is advisable to add the MODULE_IMPORT_NS() statement close to other module
> > metadata definitions like MODULE_AUTHOR() or MODULE_LICENSE(). Refer to section
> > 5. for a way to create missing import statements automatically."
> > 
> > There you go. Plus there is even some fancy automation (;-p).
> > 
> > So let me move it down there then.
> 
> Will you send out another revision of the patch?

I already did.

https://marc.info/?l=linux-arm-kernel&m=163537686316807

> > > In the fixed commit 4b2b5e142ff4, there's a similar change for
> > > drm_gem_shmem_helper.c. It uses dma-buf_vmap as well. Does that module
> > > require the same fix?
> > 
> > Likely. Let me just run ze automation and see what we get...
> > 
> > > Do you have any idea why I don't see these errors in my builds?
> > 
> > Well, I guess, there are various KCONFIG symbols influencing that whole story. How about e.g.
> > 
> > init/Kconfig:config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
> 
> Thanks for the hint.

Welcome.

> Best regards
> Thomas
> 
> > 
> > > Best regards
> > > Thomas
> > 
> > Cheers
> > 
> > Marcel
> > 
> > > > +
> > > >    /**
> > > >     * DOC: cma helpers
> > > >     *
> > > > 
> > > 
> > > -- 
> > > Thomas Zimmermann
> > > Graphics Driver Developer
> > > SUSE Software Solutions Germany GmbH
> > > Maxfeldstr. 5, 90409 Nürnberg, Germany
> > > (HRB 36809, AG Nürnberg)
> > > Geschäftsführer: Felix Imendörffer
> > 
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-29  7:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 15:25 [PATCH v1] drm: import DMA_BUF module namespace Marcel Ziswiler
2021-10-27 18:30 ` Thomas Zimmermann
2021-10-27 20:54   ` Marcel Ziswiler
2021-10-28 18:45     ` Thomas Zimmermann
2021-10-29  7:19       ` Marcel Ziswiler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).