amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: Add build directory to include path
@ 2022-04-13 16:14 Michel Dänzer
  2022-04-14  6:24 ` Christian König
  0 siblings, 1 reply; 13+ messages in thread
From: Michel Dänzer @ 2022-04-13 16:14 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Xinhui Pan; +Cc: dri-devel, amd-gfx

From: Michel Dänzer <mdaenzer@redhat.com>

Fixes compile errors with out-of-tree builds, e.g.

../drivers/gpu/drm/radeon/r420.c:38:10: fatal error: r420_reg_safe.h: No such file or directory
   38 | #include "r420_reg_safe.h"
      |          ^~~~~~~~~~~~~~~~~

Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
---
 drivers/gpu/drm/radeon/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/radeon/Makefile b/drivers/gpu/drm/radeon/Makefile
index 11c97edde54d..37caf5236048 100644
--- a/drivers/gpu/drm/radeon/Makefile
+++ b/drivers/gpu/drm/radeon/Makefile
@@ -3,6 +3,8 @@
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
 
+ccflags-y += -I$(src)
+
 hostprogs := mkregtable
 targets := rn50_reg_safe.h r100_reg_safe.h r200_reg_safe.h rv515_reg_safe.h r300_reg_safe.h r420_reg_safe.h rs600_reg_safe.h r600_reg_safe.h evergreen_reg_safe.h cayman_reg_safe.h
 
-- 
2.35.1


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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-04-13 16:14 [PATCH] drm/radeon: Add build directory to include path Michel Dänzer
@ 2022-04-14  6:24 ` Christian König
  2022-04-14  7:37   ` Michel Dänzer
  0 siblings, 1 reply; 13+ messages in thread
From: Christian König @ 2022-04-14  6:24 UTC (permalink / raw)
  To: Michel Dänzer, Alex Deucher, Christian König, Xinhui Pan
  Cc: amd-gfx, dri-devel

Am 13.04.22 um 18:14 schrieb Michel Dänzer:
> From: Michel Dänzer <mdaenzer@redhat.com>
>
> Fixes compile errors with out-of-tree builds, e.g.
>
> ../drivers/gpu/drm/radeon/r420.c:38:10: fatal error: r420_reg_safe.h: No such file or directory
>     38 | #include "r420_reg_safe.h"
>        |          ^~~~~~~~~~~~~~~~~


Well stuff like that usually points to a broken build environment.

Christian.

>
> Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
> ---
>   drivers/gpu/drm/radeon/Makefile | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/Makefile b/drivers/gpu/drm/radeon/Makefile
> index 11c97edde54d..37caf5236048 100644
> --- a/drivers/gpu/drm/radeon/Makefile
> +++ b/drivers/gpu/drm/radeon/Makefile
> @@ -3,6 +3,8 @@
>   # Makefile for the drm device driver.  This driver provides support for the
>   # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
>   
> +ccflags-y += -I$(src)
> +
>   hostprogs := mkregtable
>   targets := rn50_reg_safe.h r100_reg_safe.h r200_reg_safe.h rv515_reg_safe.h r300_reg_safe.h r420_reg_safe.h rs600_reg_safe.h r600_reg_safe.h evergreen_reg_safe.h cayman_reg_safe.h
>   


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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-04-14  6:24 ` Christian König
@ 2022-04-14  7:37   ` Michel Dänzer
  2022-04-14  8:44     ` Christian König
  0 siblings, 1 reply; 13+ messages in thread
From: Michel Dänzer @ 2022-04-14  7:37 UTC (permalink / raw)
  To: Christian König, Alex Deucher, Christian König, Xinhui Pan
  Cc: dri-devel, amd-gfx

On 2022-04-14 08:24, Christian König wrote:
> Am 13.04.22 um 18:14 schrieb Michel Dänzer:
>> From: Michel Dänzer <mdaenzer@redhat.com>
>>
>> Fixes compile errors with out-of-tree builds, e.g.
>>
>> ../drivers/gpu/drm/radeon/r420.c:38:10: fatal error: r420_reg_safe.h: No such file or directory
>>     38 | #include "r420_reg_safe.h"
>>        |          ^~~~~~~~~~~~~~~~~
> 
> 
> Well stuff like that usually points to a broken build environment.

Just a separate build directory. Specifically, I'm hitting the errors with

 make -C build-amd64 M=drivers/gpu/drm

Generated headers such as r420_reg_safe.h reside in the build directory, so source files in the source directory can't find them without an explicit search path. Are you saying that should get added automagically somehow?

FWIW, this is pretty common in the kernel according to git grep.


-- 
Earthling Michel Dänzer            |                  https://redhat.com
Libre software enthusiast          |         Mesa and Xwayland developer

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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-04-14  7:37   ` Michel Dänzer
@ 2022-04-14  8:44     ` Christian König
  2022-04-14  8:56       ` Michel Dänzer
  2022-04-14 13:34       ` Alex Deucher
  0 siblings, 2 replies; 13+ messages in thread
From: Christian König @ 2022-04-14  8:44 UTC (permalink / raw)
  To: Michel Dänzer, Alex Deucher, Christian König, Xinhui Pan
  Cc: dri-devel, amd-gfx

Am 14.04.22 um 09:37 schrieb Michel Dänzer:
> On 2022-04-14 08:24, Christian König wrote:
>> Am 13.04.22 um 18:14 schrieb Michel Dänzer:
>>> From: Michel Dänzer <mdaenzer@redhat.com>
>>>
>>> Fixes compile errors with out-of-tree builds, e.g.
>>>
>>> ../drivers/gpu/drm/radeon/r420.c:38:10: fatal error: r420_reg_safe.h: No such file or directory
>>>      38 | #include "r420_reg_safe.h"
>>>         |          ^~~~~~~~~~~~~~~~~
>>
>> Well stuff like that usually points to a broken build environment.
> Just a separate build directory. Specifically, I'm hitting the errors with
>
>   make -C build-amd64 M=drivers/gpu/drm
>
> Generated headers such as r420_reg_safe.h reside in the build directory, so source files in the source directory can't find them without an explicit search path.

I'm trying to swap back into my brain how all of this used to work, but 
that's a really long time ago that I tried this as well.

> Are you saying that should get added automagically somehow?

Yes, exactly that. I'm like 95% sure that used to work, but I don't know 
why exactly either.

> FWIW, this is pretty common in the kernel according to git grep.

Maybe Alex or somebody else with some more background in the kernel 
Makefiles could jump in and help here.

Christian.

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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-04-14  8:44     ` Christian König
@ 2022-04-14  8:56       ` Michel Dänzer
  2022-04-14 13:34       ` Alex Deucher
  1 sibling, 0 replies; 13+ messages in thread
From: Michel Dänzer @ 2022-04-14  8:56 UTC (permalink / raw)
  To: Christian König, Alex Deucher, Christian König, Xinhui Pan
  Cc: amd-gfx, dri-devel

On 2022-04-14 10:44, Christian König wrote:
> Am 14.04.22 um 09:37 schrieb Michel Dänzer:
>> On 2022-04-14 08:24, Christian König wrote:
>>> Am 13.04.22 um 18:14 schrieb Michel Dänzer:
>>>> From: Michel Dänzer <mdaenzer@redhat.com>
>>>>
>>>> Fixes compile errors with out-of-tree builds, e.g.
>>>>
>>>> ../drivers/gpu/drm/radeon/r420.c:38:10: fatal error: r420_reg_safe.h: No such file or directory
>>>>      38 | #include "r420_reg_safe.h"
>>>>         |          ^~~~~~~~~~~~~~~~~
>>>
>>> Well stuff like that usually points to a broken build environment.
>> Just a separate build directory. Specifically, I'm hitting the errors with
>>
>>   make -C build-amd64 M=drivers/gpu/drm
>>
>> Generated headers such as r420_reg_safe.h reside in the build directory, so source files in the source directory can't find them without an explicit search path.
> 
> I'm trying to swap back into my brain how all of this used to work, but that's a really long time ago that I tried this as well.
> 
>> Are you saying that should get added automagically somehow?
> 
> Yes, exactly that. I'm like 95% sure that used to work, but I don't know why exactly either.

Maybe it worked at some point, but regressed in the meantime? I only just switched to a separate build directory (so that I can easily build-test for other architectures).


-- 
Earthling Michel Dänzer            |                  https://redhat.com
Libre software enthusiast          |         Mesa and Xwayland developer

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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-04-14  8:44     ` Christian König
  2022-04-14  8:56       ` Michel Dänzer
@ 2022-04-14 13:34       ` Alex Deucher
  2022-04-14 13:49         ` Michel Dänzer
  1 sibling, 1 reply; 13+ messages in thread
From: Alex Deucher @ 2022-04-14 13:34 UTC (permalink / raw)
  To: Christian König
  Cc: Michel Dänzer, Xinhui Pan, amd-gfx list,
	Maling list - DRI developers, Alex Deucher, Christian König

On Thu, Apr 14, 2022 at 4:44 AM Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
>
> Am 14.04.22 um 09:37 schrieb Michel Dänzer:
> > On 2022-04-14 08:24, Christian König wrote:
> >> Am 13.04.22 um 18:14 schrieb Michel Dänzer:
> >>> From: Michel Dänzer <mdaenzer@redhat.com>
> >>>
> >>> Fixes compile errors with out-of-tree builds, e.g.
> >>>
> >>> ../drivers/gpu/drm/radeon/r420.c:38:10: fatal error: r420_reg_safe.h: No such file or directory
> >>>      38 | #include "r420_reg_safe.h"
> >>>         |          ^~~~~~~~~~~~~~~~~
> >>
> >> Well stuff like that usually points to a broken build environment.
> > Just a separate build directory. Specifically, I'm hitting the errors with
> >
> >   make -C build-amd64 M=drivers/gpu/drm
> >
> > Generated headers such as r420_reg_safe.h reside in the build directory, so source files in the source directory can't find them without an explicit search path.
>
> I'm trying to swap back into my brain how all of this used to work, but
> that's a really long time ago that I tried this as well.
>
> > Are you saying that should get added automagically somehow?
>
> Yes, exactly that. I'm like 95% sure that used to work, but I don't know
> why exactly either.
>
> > FWIW, this is pretty common in the kernel according to git grep.
>
> Maybe Alex or somebody else with some more background in the kernel
> Makefiles could jump in and help here.

I don't remember either.  I vaguely recall the build support for the
mkregtable stuff being reworked a while ago.  A quick zip through the
git logs shows a series from Masahiro Yamada from 2020.

Alex

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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-04-14 13:34       ` Alex Deucher
@ 2022-04-14 13:49         ` Michel Dänzer
  2022-04-14 15:04           ` Masahiro Yamada
  0 siblings, 1 reply; 13+ messages in thread
From: Michel Dänzer @ 2022-04-14 13:49 UTC (permalink / raw)
  To: Alex Deucher, Christian König, Masahiro Yamada
  Cc: Alex Deucher, Xinhui Pan, Maling list - DRI developers,
	amd-gfx list, Christian König

On 2022-04-14 15:34, Alex Deucher wrote:
> On Thu, Apr 14, 2022 at 4:44 AM Christian König
> <ckoenig.leichtzumerken@gmail.com> wrote:
>> Am 14.04.22 um 09:37 schrieb Michel Dänzer:
>>> On 2022-04-14 08:24, Christian König wrote:
>>>> Am 13.04.22 um 18:14 schrieb Michel Dänzer:
>>>>> From: Michel Dänzer <mdaenzer@redhat.com>
>>>>>
>>>>> Fixes compile errors with out-of-tree builds, e.g.
>>>>>
>>>>> ../drivers/gpu/drm/radeon/r420.c:38:10: fatal error: r420_reg_safe.h: No such file or directory
>>>>>      38 | #include "r420_reg_safe.h"
>>>>>         |          ^~~~~~~~~~~~~~~~~
>>>>
>>>> Well stuff like that usually points to a broken build environment.
>>> Just a separate build directory. Specifically, I'm hitting the errors with
>>>
>>>   make -C build-amd64 M=drivers/gpu/drm
>>>
>>> Generated headers such as r420_reg_safe.h reside in the build directory, so source files in the source directory can't find them without an explicit search path.
>>
>> I'm trying to swap back into my brain how all of this used to work, but
>> that's a really long time ago that I tried this as well.
>>
>>> Are you saying that should get added automagically somehow?
>>
>> Yes, exactly that. I'm like 95% sure that used to work, but I don't know
>> why exactly either.
>>
>>> FWIW, this is pretty common in the kernel according to git grep.
>>
>> Maybe Alex or somebody else with some more background in the kernel
>> Makefiles could jump in and help here.
> 
> I don't remember either.  I vaguely recall the build support for the
> mkregtable stuff being reworked a while ago.  A quick zip through the
> git logs shows a series from Masahiro Yamada from 2020.

Yamada-san, can you help us? :)

See https://patchwork.freedesktop.org/patch/482011/ for my patch.


-- 
Earthling Michel Dänzer            |                  https://redhat.com
Libre software enthusiast          |         Mesa and Xwayland developer

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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-04-14 13:49         ` Michel Dänzer
@ 2022-04-14 15:04           ` Masahiro Yamada
  2022-04-14 16:57             ` Michel Dänzer
  0 siblings, 1 reply; 13+ messages in thread
From: Masahiro Yamada @ 2022-04-14 15:04 UTC (permalink / raw)
  To: Michel Dänzer
  Cc: Christian König, Xinhui Pan, Maling list - DRI developers,
	Alex Deucher, amd-gfx list, Alex Deucher, Christian König

Hi.

On Thu, Apr 14, 2022 at 10:50 PM Michel Dänzer
<michel.daenzer@mailbox.org> wrote:
>
> On 2022-04-14 15:34, Alex Deucher wrote:
> > On Thu, Apr 14, 2022 at 4:44 AM Christian König
> > <ckoenig.leichtzumerken@gmail.com> wrote:
> >> Am 14.04.22 um 09:37 schrieb Michel Dänzer:
> >>> On 2022-04-14 08:24, Christian König wrote:
> >>>> Am 13.04.22 um 18:14 schrieb Michel Dänzer:
> >>>>> From: Michel Dänzer <mdaenzer@redhat.com>
> >>>>>
> >>>>> Fixes compile errors with out-of-tree builds, e.g.
> >>>>>
> >>>>> ../drivers/gpu/drm/radeon/r420.c:38:10: fatal error: r420_reg_safe.h: No such file or directory
> >>>>>      38 | #include "r420_reg_safe.h"
> >>>>>         |          ^~~~~~~~~~~~~~~~~
> >>>>
> >>>> Well stuff like that usually points to a broken build environment.
> >>> Just a separate build directory. Specifically, I'm hitting the errors with
> >>>
> >>>   make -C build-amd64 M=drivers/gpu/drm


Maybe

        make  O=build-arm64   drivers/gpu/drm/

is the way you were searching for.

It builds only drivers/gpu/drm/
in the separate directory.




> >>>
> >>> Generated headers such as r420_reg_safe.h reside in the build directory, so source files in the source directory can't find them without an explicit search path.
> >>
> >> I'm trying to swap back into my brain how all of this used to work, but
> >> that's a really long time ago that I tried this as well.
> >>
> >>> Are you saying that should get added automagically somehow?


For the kernel tree, yes, it is done automatically.

See the code in scripts/Makefile.lib:

# $(srctree)/$(src) for including checkin headers from generated source files
# $(objtree)/$(obj) for including generated headers from checkin source files
ifeq ($(KBUILD_EXTMOD),)
ifdef building_out_of_srctree
_c_flags   += -I $(srctree)/$(src) -I $(objtree)/$(obj)
_a_flags   += -I $(srctree)/$(src) -I $(objtree)/$(obj)
_cpp_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
endif
endif




But, you used M=drivers/gpu/drm.
So, it did not work.



M= is intended for building external modules.

I do not recommend it for in-tree drivers.






> >>
> >> Yes, exactly that. I'm like 95% sure that used to work, but I don't know
> >> why exactly either.
> >>
> >>> FWIW, this is pretty common in the kernel according to git grep.
> >>
> >> Maybe Alex or somebody else with some more background in the kernel
> >> Makefiles could jump in and help here.
> >
> > I don't remember either.  I vaguely recall the build support for the
> > mkregtable stuff being reworked a while ago.  A quick zip through the
> > git logs shows a series from Masahiro Yamada from 2020.
>
> Yamada-san, can you help us? :)
>
> See https://patchwork.freedesktop.org/patch/482011/ for my patch.
>
>
> --
> Earthling Michel Dänzer            |                  https://redhat.com
> Libre software enthusiast          |         Mesa and Xwayland developer



--
Best Regards
Masahiro Yamada

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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-04-14 15:04           ` Masahiro Yamada
@ 2022-04-14 16:57             ` Michel Dänzer
  2022-06-15  8:35               ` Michel Dänzer
  0 siblings, 1 reply; 13+ messages in thread
From: Michel Dänzer @ 2022-04-14 16:57 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Christian König, Xinhui Pan, amd-gfx list, Alex Deucher,
	Maling list - DRI developers, Alex Deucher, Christian König

On 2022-04-14 17:04, Masahiro Yamada wrote:
> On Thu, Apr 14, 2022 at 10:50 PM Michel Dänzer
> <michel.daenzer@mailbox.org> wrote:
>> On 2022-04-14 15:34, Alex Deucher wrote:
>>> On Thu, Apr 14, 2022 at 4:44 AM Christian König
>>> <ckoenig.leichtzumerken@gmail.com> wrote:
>>>> Am 14.04.22 um 09:37 schrieb Michel Dänzer:
>>>>> On 2022-04-14 08:24, Christian König wrote:
>>>>>> Am 13.04.22 um 18:14 schrieb Michel Dänzer:
>>>>>>> From: Michel Dänzer <mdaenzer@redhat.com>
>>>>>>>
>>>>>>> Fixes compile errors with out-of-tree builds, e.g.
>>>>>>>
>>>>>>> ../drivers/gpu/drm/radeon/r420.c:38:10: fatal error: r420_reg_safe.h: No such file or directory
>>>>>>>      38 | #include "r420_reg_safe.h"
>>>>>>>         |          ^~~~~~~~~~~~~~~~~
>>>>>>
>>>>>> Well stuff like that usually points to a broken build environment.
>>>>> Just a separate build directory. Specifically, I'm hitting the errors with
>>>>>
>>>>>   make -C build-amd64 M=drivers/gpu/drm
> 
> 
> Maybe
> 
>         make  O=build-arm64   drivers/gpu/drm/
> 
> is the way you were searching for.
> 
> It builds only drivers/gpu/drm/
> in the separate directory.

Indeed, that works.


>>>>> Generated headers such as r420_reg_safe.h reside in the build directory, so source files in the source directory can't find them without an explicit search path.
>>>>
>>>> I'm trying to swap back into my brain how all of this used to work, but
>>>> that's a really long time ago that I tried this as well.
>>>>
>>>>> Are you saying that should get added automagically somehow?
> 
> 
> For the kernel tree, yes, it is done automatically.
> 
> See the code in scripts/Makefile.lib:
> 
> # $(srctree)/$(src) for including checkin headers from generated source files
> # $(objtree)/$(obj) for including generated headers from checkin source files
> ifeq ($(KBUILD_EXTMOD),)
> ifdef building_out_of_srctree
> _c_flags   += -I $(srctree)/$(src) -I $(objtree)/$(obj)
> _a_flags   += -I $(srctree)/$(src) -I $(objtree)/$(obj)
> _cpp_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
> endif
> endif
> 
> 
> 
> 
> But, you used M=drivers/gpu/drm.
> So, it did not work.
> 
> 
> 
> M= is intended for building external modules.
> 
> I do not recommend it for in-tree drivers.

So I've been doing it wrong for all these years... Happened to always work for in-tree builds.

Thank you so much for your help, Yamada-san!

I am retracting this patch.


-- 
Earthling Michel Dänzer            |                  https://redhat.com
Libre software enthusiast          |         Mesa and Xwayland developer

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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-04-14 16:57             ` Michel Dänzer
@ 2022-06-15  8:35               ` Michel Dänzer
  2022-06-18 22:08                 ` Masahiro Yamada
  0 siblings, 1 reply; 13+ messages in thread
From: Michel Dänzer @ 2022-06-15  8:35 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Christian König, Xinhui Pan, Maling list - DRI developers,
	Alex Deucher, amd-gfx list, Alex Deucher, Christian König

On 2022-04-14 18:57, Michel Dänzer wrote:
> On 2022-04-14 17:04, Masahiro Yamada wrote:
>> On Thu, Apr 14, 2022 at 10:50 PM Michel Dänzer
>> <michel.daenzer@mailbox.org> wrote:
>>> On 2022-04-14 15:34, Alex Deucher wrote:
>>>> On Thu, Apr 14, 2022 at 4:44 AM Christian König
>>>> <ckoenig.leichtzumerken@gmail.com> wrote:
>>>>> Am 14.04.22 um 09:37 schrieb Michel Dänzer:
>>>>>>
>>>>>>   make -C build-amd64 M=drivers/gpu/drm
>>
>>
>> Maybe
>>
>>         make  O=build-arm64   drivers/gpu/drm/
>>
>> is the way you were searching for.
>>
>> It builds only drivers/gpu/drm/
>> in the separate directory.
> 
> Indeed, that works.

I've come to realize that this doesn't produce the actual *.ko modules though. Is there a trick for building the modules, but only under drivers/gpu/drm/ ?


-- 
Earthling Michel Dänzer            |                  https://redhat.com
Libre software enthusiast          |         Mesa and Xwayland developer

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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-06-15  8:35               ` Michel Dänzer
@ 2022-06-18 22:08                 ` Masahiro Yamada
  2022-06-19 16:22                   ` Ernst Sjöstrand
  0 siblings, 1 reply; 13+ messages in thread
From: Masahiro Yamada @ 2022-06-18 22:08 UTC (permalink / raw)
  To: Michel Dänzer
  Cc: Christian König, Xinhui Pan, Maling list - DRI developers,
	Alex Deucher, amd-gfx list, Alex Deucher, Christian König

On Wed, Jun 15, 2022 at 5:35 PM Michel Dänzer
<michel.daenzer@mailbox.org> wrote:
>
> On 2022-04-14 18:57, Michel Dänzer wrote:
> > On 2022-04-14 17:04, Masahiro Yamada wrote:
> >> On Thu, Apr 14, 2022 at 10:50 PM Michel Dänzer
> >> <michel.daenzer@mailbox.org> wrote:
> >>> On 2022-04-14 15:34, Alex Deucher wrote:
> >>>> On Thu, Apr 14, 2022 at 4:44 AM Christian König
> >>>> <ckoenig.leichtzumerken@gmail.com> wrote:
> >>>>> Am 14.04.22 um 09:37 schrieb Michel Dänzer:
> >>>>>>
> >>>>>>   make -C build-amd64 M=drivers/gpu/drm
> >>
> >>
> >> Maybe
> >>
> >>         make  O=build-arm64   drivers/gpu/drm/
> >>
> >> is the way you were searching for.
> >>
> >> It builds only drivers/gpu/drm/
> >> in the separate directory.
> >
> > Indeed, that works.
>
> I've come to realize that this doesn't produce the actual *.ko modules though. Is there a trick for building the modules, but only under drivers/gpu/drm/ ?
>
>
> --
> Earthling Michel Dänzer            |                  https://redhat.com
> Libre software enthusiast          |         Mesa and Xwayland developer


No.
There is no way to build *.ko
only under a specific directory.





-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-06-18 22:08                 ` Masahiro Yamada
@ 2022-06-19 16:22                   ` Ernst Sjöstrand
  2022-06-20  7:42                     ` Michel Dänzer
  0 siblings, 1 reply; 13+ messages in thread
From: Ernst Sjöstrand @ 2022-06-19 16:22 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Michel Dänzer, Christian König, Xinhui Pan,
	amd-gfx list, Alex Deucher, Maling list - DRI developers,
	Alex Deucher, Christian König

[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]

Den sön 19 juni 2022 kl 00:20 skrev Masahiro Yamada <masahiroy@kernel.org>:

> On Wed, Jun 15, 2022 at 5:35 PM Michel Dänzer
> <michel.daenzer@mailbox.org> wrote:
> >
> > On 2022-04-14 18:57, Michel Dänzer wrote:
> > > On 2022-04-14 17:04, Masahiro Yamada wrote:
> > >> On Thu, Apr 14, 2022 at 10:50 PM Michel Dänzer
> > >> <michel.daenzer@mailbox.org> wrote:
> > >>> On 2022-04-14 15:34, Alex Deucher wrote:
> > >>>> On Thu, Apr 14, 2022 at 4:44 AM Christian König
> > >>>> <ckoenig.leichtzumerken@gmail.com> wrote:
> > >>>>> Am 14.04.22 um 09:37 schrieb Michel Dänzer:
> > >>>>>>
> > >>>>>>   make -C build-amd64 M=drivers/gpu/drm
> > >>
> > >>
> > >> Maybe
> > >>
> > >>         make  O=build-arm64   drivers/gpu/drm/
> > >>
> > >> is the way you were searching for.
> > >>
> > >> It builds only drivers/gpu/drm/
> > >> in the separate directory.
> > >
> > > Indeed, that works.
> >
> > I've come to realize that this doesn't produce the actual *.ko modules
> though. Is there a trick for building the modules, but only under
> drivers/gpu/drm/ ?
> >
> >
> > --
> > Earthling Michel Dänzer            |                  https://redhat.com
> > Libre software enthusiast          |         Mesa and Xwayland developer
>
>
> No.
> There is no way to build *.ko
> only under a specific directory.
>

Doesn't "make modules M=drivers/gpu/drm/" do that?

[-- Attachment #2: Type: text/html, Size: 2387 bytes --]

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

* Re: [PATCH] drm/radeon: Add build directory to include path
  2022-06-19 16:22                   ` Ernst Sjöstrand
@ 2022-06-20  7:42                     ` Michel Dänzer
  0 siblings, 0 replies; 13+ messages in thread
From: Michel Dänzer @ 2022-06-20  7:42 UTC (permalink / raw)
  To: Ernst Sjöstrand, Masahiro Yamada
  Cc: Christian König, Xinhui Pan, Maling list - DRI developers,
	Alex Deucher, amd-gfx list, Alex Deucher, Christian König

On 2022-06-19 18:22, Ernst Sjöstrand wrote:
> Den sön 19 juni 2022 kl 00:20 skrev Masahiro Yamada <masahiroy@kernel.org <mailto:masahiroy@kernel.org>>:
> 
>     On Wed, Jun 15, 2022 at 5:35 PM Michel Dänzer
>     <michel.daenzer@mailbox.org <mailto:michel.daenzer@mailbox.org>> wrote:
>     >
>     > On 2022-04-14 18:57, Michel Dänzer wrote:
>     > > On 2022-04-14 17:04, Masahiro Yamada wrote:
>     > >> On Thu, Apr 14, 2022 at 10:50 PM Michel Dänzer
>     > >> <michel.daenzer@mailbox.org <mailto:michel.daenzer@mailbox.org>> wrote:
>     > >>> On 2022-04-14 15:34, Alex Deucher wrote:
>     > >>>> On Thu, Apr 14, 2022 at 4:44 AM Christian König
>     > >>>> <ckoenig.leichtzumerken@gmail.com <mailto:ckoenig.leichtzumerken@gmail.com>> wrote:
>     > >>>>> Am 14.04.22 um 09:37 schrieb Michel Dänzer:
>     > >>>>>>
>     > >>>>>>   make -C build-amd64 M=drivers/gpu/drm
>     > >>
>     > >>
>     > >> Maybe
>     > >>
>     > >>         make  O=build-arm64   drivers/gpu/drm/
>     > >>
>     > >> is the way you were searching for.
>     > >>
>     > >> It builds only drivers/gpu/drm/
>     > >> in the separate directory.
>     > >
>     > > Indeed, that works.
>     >
>     > I've come to realize that this doesn't produce the actual *.ko modules though. Is there a trick for building the modules, but only under drivers/gpu/drm/ ?
>     >
>     >
>     > --
>     > Earthling Michel Dänzer            |                  https://redhat.com <https://redhat.com>
>     > Libre software enthusiast          |         Mesa and Xwayland developer
> 
> 
>     No.
>     There is no way to build *.ko
>     only under a specific directory.
> 
> 
> Doesn't "make modules M=drivers/gpu/drm/" do that?

That again hits the compile error the patch was supposed to address. Apparently M= isn't for this but for building out-of-tree modules.


-- 
Earthling Michel Dänzer            |                  https://redhat.com
Libre software enthusiast          |         Mesa and Xwayland developer

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

end of thread, other threads:[~2022-06-20  7:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13 16:14 [PATCH] drm/radeon: Add build directory to include path Michel Dänzer
2022-04-14  6:24 ` Christian König
2022-04-14  7:37   ` Michel Dänzer
2022-04-14  8:44     ` Christian König
2022-04-14  8:56       ` Michel Dänzer
2022-04-14 13:34       ` Alex Deucher
2022-04-14 13:49         ` Michel Dänzer
2022-04-14 15:04           ` Masahiro Yamada
2022-04-14 16:57             ` Michel Dänzer
2022-06-15  8:35               ` Michel Dänzer
2022-06-18 22:08                 ` Masahiro Yamada
2022-06-19 16:22                   ` Ernst Sjöstrand
2022-06-20  7:42                     ` Michel Dänzer

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).