linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drm: prefix header search paths with $(srctree)/
@ 2019-03-29 11:32 Masahiro Yamada
  2019-03-29 12:01 ` james qian wang (Arm Technology China)
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Masahiro Yamada @ 2019-03-29 11:32 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, dri-devel
  Cc: Sam Ravnborg, Masahiro Yamada, Sean Paul, Zhenyu Wang, nouveau,
	Jani Nikula, James (Qian) Wang, Alex Deucher,
	David (ChunMing) Zhou, amd-gfx, Rob Clark, Christian König,
	Zhi Wang, Rodrigo Vivi, linux-arm-msm, intel-gfx, Ben Skeggs,
	Brian Starkey, intel-gvt-dev, Liviu Dudau, linux-kernel,
	Joonas Lahtinen, freedreno

Currently, the Kbuild core manipulates header search paths in a crazy
way [1].

To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
the search paths in the srctree. Some Makefiles are already written in
that way, but not all. The goal of this work is to make the notation
consistent, and finally get rid of the gross hacks.

Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
("kbuild: do not drop -I without parameter").

[1]: https://patchwork.kernel.org/patch/9632347/

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
---

I put all gpu/drm changes into a single patch because
they are trivial conversion.

If you are interested in the big picture of this work,
the full patch set is available at the following URL.

git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git build-test


Changes in v2:
  - fix up the new driver komeda
  - Add Sam's Reviewed-by

 drivers/gpu/drm/amd/amdgpu/Makefile         | 2 +-
 drivers/gpu/drm/amd/lib/Makefile            | 2 +-
 drivers/gpu/drm/arm/display/komeda/Makefile | 4 ++--
 drivers/gpu/drm/i915/gvt/Makefile           | 2 +-
 drivers/gpu/drm/msm/Makefile                | 6 +++---
 drivers/gpu/drm/nouveau/Kbuild              | 8 ++++----
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile
index 466da59..62bf9da 100644
--- a/drivers/gpu/drm/amd/amdgpu/Makefile
+++ b/drivers/gpu/drm/amd/amdgpu/Makefile
@@ -23,7 +23,7 @@
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
 
-FULL_AMD_PATH=$(src)/..
+FULL_AMD_PATH=$(srctree)/$(src)/..
 DISPLAY_FOLDER_NAME=display
 FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME)
 
diff --git a/drivers/gpu/drm/amd/lib/Makefile b/drivers/gpu/drm/amd/lib/Makefile
index 6902430..d534992 100644
--- a/drivers/gpu/drm/amd/lib/Makefile
+++ b/drivers/gpu/drm/amd/lib/Makefile
@@ -27,6 +27,6 @@
 # driver components or later moved to kernel/lib for sharing with
 # other drivers.
 
-ccflags-y := -I$(src)/../include
+ccflags-y := -I $(srctree)/$(src)/../include
 
 obj-$(CONFIG_CHASH) += chash.o
diff --git a/drivers/gpu/drm/arm/display/komeda/Makefile b/drivers/gpu/drm/arm/display/komeda/Makefile
index 1b875e5..a72e30c 100644
--- a/drivers/gpu/drm/arm/display/komeda/Makefile
+++ b/drivers/gpu/drm/arm/display/komeda/Makefile
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0
 
 ccflags-y := \
-	-I$(src)/../include \
-	-I$(src)
+	-I $(srctree)/$(src)/../include \
+	-I $(srctree)/$(src)
 
 komeda-y := \
 	komeda_drv.o \
diff --git a/drivers/gpu/drm/i915/gvt/Makefile b/drivers/gpu/drm/i915/gvt/Makefile
index 271fb46..ea8324a 100644
--- a/drivers/gpu/drm/i915/gvt/Makefile
+++ b/drivers/gpu/drm/i915/gvt/Makefile
@@ -5,5 +5,5 @@ GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \
 	execlist.o scheduler.o sched_policy.o mmio_context.o cmd_parser.o debugfs.o \
 	fb_decoder.o dmabuf.o page_track.o
 
-ccflags-y				+= -I$(src) -I$(src)/$(GVT_DIR)
+ccflags-y				+= -I $(srctree)/$(src) -I $(srctree)/$(src)/$(GVT_DIR)/
 i915-y					+= $(addprefix $(GVT_DIR)/, $(GVT_SOURCE))
diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
index 56a70c7..b7b1ebd 100644
--- a/drivers/gpu/drm/msm/Makefile
+++ b/drivers/gpu/drm/msm/Makefile
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
-ccflags-y := -Idrivers/gpu/drm/msm
-ccflags-y += -Idrivers/gpu/drm/msm/disp/dpu1
-ccflags-$(CONFIG_DRM_MSM_DSI) += -Idrivers/gpu/drm/msm/dsi
+ccflags-y := -I $(srctree)/$(src)
+ccflags-y += -I $(srctree)/$(src)/disp/dpu1
+ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(srctree)/$(src)/dsi
 
 msm-y := \
 	adreno/adreno_device.o \
diff --git a/drivers/gpu/drm/nouveau/Kbuild b/drivers/gpu/drm/nouveau/Kbuild
index ea3035e..4fae728 100644
--- a/drivers/gpu/drm/nouveau/Kbuild
+++ b/drivers/gpu/drm/nouveau/Kbuild
@@ -1,7 +1,7 @@
-ccflags-y += -I$(src)/include
-ccflags-y += -I$(src)/include/nvkm
-ccflags-y += -I$(src)/nvkm
-ccflags-y += -I$(src)
+ccflags-y += -I $(srctree)/$(src)/include
+ccflags-y += -I $(srctree)/$(src)/include/nvkm
+ccflags-y += -I $(srctree)/$(src)/nvkm
+ccflags-y += -I $(srctree)/$(src)
 
 # NVKM - HW resource manager
 #- code also used by various userspace tools/tests
-- 
2.7.4


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

* Re: [PATCH v2] drm: prefix header search paths with $(srctree)/
  2019-03-29 11:32 [PATCH v2] drm: prefix header search paths with $(srctree)/ Masahiro Yamada
@ 2019-03-29 12:01 ` james qian wang (Arm Technology China)
  2019-03-29 14:24 ` Liviu Dudau
  2019-04-26  1:36 ` Masahiro Yamada
  2 siblings, 0 replies; 8+ messages in thread
From: james qian wang (Arm Technology China) @ 2019-03-29 12:01 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: David Airlie, Daniel Vetter, dri-devel, Sam Ravnborg, Sean Paul,
	Zhenyu Wang, nouveau, Jani Nikula, Alex Deucher,
	David (ChunMing) Zhou, amd-gfx, Rob Clark, Christian König,
	Zhi Wang, Rodrigo Vivi, linux-arm-msm, intel-gfx, Ben Skeggs,
	Brian Starkey, intel-gvt-dev, Liviu Dudau, linux-kernel,
	Joonas Lahtinen, freedreno, nd

On Fri, Mar 29, 2019 at 08:32:41PM +0900, Masahiro Yamada wrote:
> Currently, the Kbuild core manipulates header search paths in a crazy
> way [1].
> 
> To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
> the search paths in the srctree. Some Makefiles are already written in
> that way, but not all. The goal of this work is to make the notation
> consistent, and finally get rid of the gross hacks.
> 
> Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
> ("kbuild: do not drop -I without parameter").
> 
> [1]: https://patchwork.kernel.org/patch/9632347/
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> 
> I put all gpu/drm changes into a single patch because
> they are trivial conversion.
> 
> If you are interested in the big picture of this work,
> the full patch set is available at the following URL.
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git build-test
> 
> 
> Changes in v2:
>   - fix up the new driver komeda
>   - Add Sam's Reviewed-by
> 
>  drivers/gpu/drm/amd/amdgpu/Makefile         | 2 +-
>  drivers/gpu/drm/amd/lib/Makefile            | 2 +-
>  drivers/gpu/drm/arm/display/komeda/Makefile | 4 ++--
>  drivers/gpu/drm/i915/gvt/Makefile           | 2 +-
>  drivers/gpu/drm/msm/Makefile                | 6 +++---
>  drivers/gpu/drm/nouveau/Kbuild              | 8 ++++----
>  6 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile
> index 466da59..62bf9da 100644
> --- a/drivers/gpu/drm/amd/amdgpu/Makefile
> +++ b/drivers/gpu/drm/amd/amdgpu/Makefile
> @@ -23,7 +23,7 @@
>  # Makefile for the drm device driver.  This driver provides support for the
>  # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
>  
> -FULL_AMD_PATH=$(src)/..
> +FULL_AMD_PATH=$(srctree)/$(src)/..
>  DISPLAY_FOLDER_NAME=display
>  FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME)
>  
> diff --git a/drivers/gpu/drm/amd/lib/Makefile b/drivers/gpu/drm/amd/lib/Makefile
> index 6902430..d534992 100644
> --- a/drivers/gpu/drm/amd/lib/Makefile
> +++ b/drivers/gpu/drm/amd/lib/Makefile
> @@ -27,6 +27,6 @@
>  # driver components or later moved to kernel/lib for sharing with
>  # other drivers.
>  
> -ccflags-y := -I$(src)/../include
> +ccflags-y := -I $(srctree)/$(src)/../include
>  
>  obj-$(CONFIG_CHASH) += chash.o
> diff --git a/drivers/gpu/drm/arm/display/komeda/Makefile b/drivers/gpu/drm/arm/display/komeda/Makefile
> index 1b875e5..a72e30c 100644
> --- a/drivers/gpu/drm/arm/display/komeda/Makefile
> +++ b/drivers/gpu/drm/arm/display/komeda/Makefile
> @@ -1,8 +1,8 @@
>  # SPDX-License-Identifier: GPL-2.0
>  
>  ccflags-y := \
> -	-I$(src)/../include \
> -	-I$(src)
> +	-I $(srctree)/$(src)/../include \
> +	-I $(srctree)/$(src)
>  
>  komeda-y := \
>  	komeda_drv.o \
> diff --git a/drivers/gpu/drm/i915/gvt/Makefile b/drivers/gpu/drm/i915/gvt/Makefile
> index 271fb46..ea8324a 100644
> --- a/drivers/gpu/drm/i915/gvt/Makefile
> +++ b/drivers/gpu/drm/i915/gvt/Makefile
> @@ -5,5 +5,5 @@ GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \
>  	execlist.o scheduler.o sched_policy.o mmio_context.o cmd_parser.o debugfs.o \
>  	fb_decoder.o dmabuf.o page_track.o
>  
> -ccflags-y				+= -I$(src) -I$(src)/$(GVT_DIR)
> +ccflags-y				+= -I $(srctree)/$(src) -I $(srctree)/$(src)/$(GVT_DIR)/
>  i915-y					+= $(addprefix $(GVT_DIR)/, $(GVT_SOURCE))
> diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
> index 56a70c7..b7b1ebd 100644
> --- a/drivers/gpu/drm/msm/Makefile
> +++ b/drivers/gpu/drm/msm/Makefile
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
> -ccflags-y := -Idrivers/gpu/drm/msm
> -ccflags-y += -Idrivers/gpu/drm/msm/disp/dpu1
> -ccflags-$(CONFIG_DRM_MSM_DSI) += -Idrivers/gpu/drm/msm/dsi
> +ccflags-y := -I $(srctree)/$(src)
> +ccflags-y += -I $(srctree)/$(src)/disp/dpu1
> +ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(srctree)/$(src)/dsi
>  
>  msm-y := \
>  	adreno/adreno_device.o \
> diff --git a/drivers/gpu/drm/nouveau/Kbuild b/drivers/gpu/drm/nouveau/Kbuild
> index ea3035e..4fae728 100644
> --- a/drivers/gpu/drm/nouveau/Kbuild
> +++ b/drivers/gpu/drm/nouveau/Kbuild
> @@ -1,7 +1,7 @@
> -ccflags-y += -I$(src)/include
> -ccflags-y += -I$(src)/include/nvkm
> -ccflags-y += -I$(src)/nvkm
> -ccflags-y += -I$(src)
> +ccflags-y += -I $(srctree)/$(src)/include
> +ccflags-y += -I $(srctree)/$(src)/include/nvkm
> +ccflags-y += -I $(srctree)/$(src)/nvkm
> +ccflags-y += -I $(srctree)/$(src)
>  
>  # NVKM - HW resource manager
>  #- code also used by various userspace tools/tests
> -- 
> 2.7.4

-- 
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>

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

* Re: [PATCH v2] drm: prefix header search paths with $(srctree)/
  2019-03-29 11:32 [PATCH v2] drm: prefix header search paths with $(srctree)/ Masahiro Yamada
  2019-03-29 12:01 ` james qian wang (Arm Technology China)
@ 2019-03-29 14:24 ` Liviu Dudau
  2019-04-26  1:36 ` Masahiro Yamada
  2 siblings, 0 replies; 8+ messages in thread
From: Liviu Dudau @ 2019-03-29 14:24 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: David Airlie, Daniel Vetter, dri-devel, Sam Ravnborg, Sean Paul,
	Zhenyu Wang, nouveau, Jani Nikula, James (Qian) Wang,
	Alex Deucher, David (ChunMing) Zhou, amd-gfx, Rob Clark,
	Christian König, Zhi Wang, Rodrigo Vivi, linux-arm-msm,
	intel-gfx, Ben Skeggs, Brian Starkey, intel-gvt-dev,
	linux-kernel, Joonas Lahtinen, freedreno

On Fri, Mar 29, 2019 at 08:32:41PM +0900, Masahiro Yamada wrote:
> Currently, the Kbuild core manipulates header search paths in a crazy
> way [1].
> 
> To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
> the search paths in the srctree. Some Makefiles are already written in
> that way, but not all. The goal of this work is to make the notation
> consistent, and finally get rid of the gross hacks.
> 
> Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
> ("kbuild: do not drop -I without parameter").
> 
> [1]: https://patchwork.kernel.org/patch/9632347/
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> 
> I put all gpu/drm changes into a single patch because
> they are trivial conversion.
> 
> If you are interested in the big picture of this work,
> the full patch set is available at the following URL.
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git build-test
> 
> 
> Changes in v2:
>   - fix up the new driver komeda
>   - Add Sam's Reviewed-by
> 
>  drivers/gpu/drm/amd/amdgpu/Makefile         | 2 +-
>  drivers/gpu/drm/amd/lib/Makefile            | 2 +-
>  drivers/gpu/drm/arm/display/komeda/Makefile | 4 ++--
>  drivers/gpu/drm/i915/gvt/Makefile           | 2 +-
>  drivers/gpu/drm/msm/Makefile                | 6 +++---
>  drivers/gpu/drm/nouveau/Kbuild              | 8 ++++----
>  6 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile
> index 466da59..62bf9da 100644
> --- a/drivers/gpu/drm/amd/amdgpu/Makefile
> +++ b/drivers/gpu/drm/amd/amdgpu/Makefile
> @@ -23,7 +23,7 @@
>  # Makefile for the drm device driver.  This driver provides support for the
>  # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
>  
> -FULL_AMD_PATH=$(src)/..
> +FULL_AMD_PATH=$(srctree)/$(src)/..
>  DISPLAY_FOLDER_NAME=display
>  FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME)
>  
> diff --git a/drivers/gpu/drm/amd/lib/Makefile b/drivers/gpu/drm/amd/lib/Makefile
> index 6902430..d534992 100644
> --- a/drivers/gpu/drm/amd/lib/Makefile
> +++ b/drivers/gpu/drm/amd/lib/Makefile
> @@ -27,6 +27,6 @@
>  # driver components or later moved to kernel/lib for sharing with
>  # other drivers.
>  
> -ccflags-y := -I$(src)/../include
> +ccflags-y := -I $(srctree)/$(src)/../include
>  
>  obj-$(CONFIG_CHASH) += chash.o
> diff --git a/drivers/gpu/drm/arm/display/komeda/Makefile b/drivers/gpu/drm/arm/display/komeda/Makefile
> index 1b875e5..a72e30c 100644
> --- a/drivers/gpu/drm/arm/display/komeda/Makefile
> +++ b/drivers/gpu/drm/arm/display/komeda/Makefile
> @@ -1,8 +1,8 @@
>  # SPDX-License-Identifier: GPL-2.0
>  
>  ccflags-y := \
> -	-I$(src)/../include \
> -	-I$(src)
> +	-I $(srctree)/$(src)/../include \
> +	-I $(srctree)/$(src)
>  
>  komeda-y := \
>  	komeda_drv.o \

For komeda:

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

I'm assuming the series in going to be merged into one go, so I don't
have to take the individual patch in my tree, but if I'm wrong please
let me know.

Best regards,
Liviu

> diff --git a/drivers/gpu/drm/i915/gvt/Makefile b/drivers/gpu/drm/i915/gvt/Makefile
> index 271fb46..ea8324a 100644
> --- a/drivers/gpu/drm/i915/gvt/Makefile
> +++ b/drivers/gpu/drm/i915/gvt/Makefile
> @@ -5,5 +5,5 @@ GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \
>  	execlist.o scheduler.o sched_policy.o mmio_context.o cmd_parser.o debugfs.o \
>  	fb_decoder.o dmabuf.o page_track.o
>  
> -ccflags-y				+= -I$(src) -I$(src)/$(GVT_DIR)
> +ccflags-y				+= -I $(srctree)/$(src) -I $(srctree)/$(src)/$(GVT_DIR)/
>  i915-y					+= $(addprefix $(GVT_DIR)/, $(GVT_SOURCE))
> diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
> index 56a70c7..b7b1ebd 100644
> --- a/drivers/gpu/drm/msm/Makefile
> +++ b/drivers/gpu/drm/msm/Makefile
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
> -ccflags-y := -Idrivers/gpu/drm/msm
> -ccflags-y += -Idrivers/gpu/drm/msm/disp/dpu1
> -ccflags-$(CONFIG_DRM_MSM_DSI) += -Idrivers/gpu/drm/msm/dsi
> +ccflags-y := -I $(srctree)/$(src)
> +ccflags-y += -I $(srctree)/$(src)/disp/dpu1
> +ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(srctree)/$(src)/dsi
>  
>  msm-y := \
>  	adreno/adreno_device.o \
> diff --git a/drivers/gpu/drm/nouveau/Kbuild b/drivers/gpu/drm/nouveau/Kbuild
> index ea3035e..4fae728 100644
> --- a/drivers/gpu/drm/nouveau/Kbuild
> +++ b/drivers/gpu/drm/nouveau/Kbuild
> @@ -1,7 +1,7 @@
> -ccflags-y += -I$(src)/include
> -ccflags-y += -I$(src)/include/nvkm
> -ccflags-y += -I$(src)/nvkm
> -ccflags-y += -I$(src)
> +ccflags-y += -I $(srctree)/$(src)/include
> +ccflags-y += -I $(srctree)/$(src)/include/nvkm
> +ccflags-y += -I $(srctree)/$(src)/nvkm
> +ccflags-y += -I $(srctree)/$(src)
>  
>  # NVKM - HW resource manager
>  #- code also used by various userspace tools/tests
> -- 
> 2.7.4
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

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

* Re: [PATCH v2] drm: prefix header search paths with $(srctree)/
  2019-03-29 11:32 [PATCH v2] drm: prefix header search paths with $(srctree)/ Masahiro Yamada
  2019-03-29 12:01 ` james qian wang (Arm Technology China)
  2019-03-29 14:24 ` Liviu Dudau
@ 2019-04-26  1:36 ` Masahiro Yamada
  2019-04-26  2:18   ` [Intel-gfx] " Dave Airlie
  2 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2019-04-26  1:36 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, dri-devel
  Cc: Sam Ravnborg, Sean Paul, Zhenyu Wang, nouveau, Jani Nikula,
	James (Qian) Wang, Alex Deucher, David (ChunMing) Zhou, amd-gfx,
	Rob Clark, Christian König, Zhi Wang, Rodrigo Vivi,
	linux-arm-msm, intel-gfx, Ben Skeggs, Brian Starkey,
	intel-gvt-dev, Liviu Dudau, Linux Kernel Mailing List,
	Joonas Lahtinen, freedreno

Hi.


On Fri, Mar 29, 2019 at 8:37 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Currently, the Kbuild core manipulates header search paths in a crazy
> way [1].
>
> To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
> the search paths in the srctree. Some Makefiles are already written in
> that way, but not all. The goal of this work is to make the notation
> consistent, and finally get rid of the gross hacks.
>
> Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
> ("kbuild: do not drop -I without parameter").
>
> [1]: https://patchwork.kernel.org/patch/9632347/
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>
> I put all gpu/drm changes into a single patch because
> they are trivial conversion.
>
> If you are interested in the big picture of this work,
> the full patch set is available at the following URL.
>
> git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git build-test


Is somebody taking care of this?



>
> Changes in v2:
>   - fix up the new driver komeda
>   - Add Sam's Reviewed-by
>
>  drivers/gpu/drm/amd/amdgpu/Makefile         | 2 +-
>  drivers/gpu/drm/amd/lib/Makefile            | 2 +-
>  drivers/gpu/drm/arm/display/komeda/Makefile | 4 ++--
>  drivers/gpu/drm/i915/gvt/Makefile           | 2 +-
>  drivers/gpu/drm/msm/Makefile                | 6 +++---
>  drivers/gpu/drm/nouveau/Kbuild              | 8 ++++----
>  6 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile
> index 466da59..62bf9da 100644
> --- a/drivers/gpu/drm/amd/amdgpu/Makefile
> +++ b/drivers/gpu/drm/amd/amdgpu/Makefile
> @@ -23,7 +23,7 @@
>  # Makefile for the drm device driver.  This driver provides support for the
>  # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
>
> -FULL_AMD_PATH=$(src)/..
> +FULL_AMD_PATH=$(srctree)/$(src)/..
>  DISPLAY_FOLDER_NAME=display
>  FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME)
>
> diff --git a/drivers/gpu/drm/amd/lib/Makefile b/drivers/gpu/drm/amd/lib/Makefile
> index 6902430..d534992 100644
> --- a/drivers/gpu/drm/amd/lib/Makefile
> +++ b/drivers/gpu/drm/amd/lib/Makefile
> @@ -27,6 +27,6 @@
>  # driver components or later moved to kernel/lib for sharing with
>  # other drivers.
>
> -ccflags-y := -I$(src)/../include
> +ccflags-y := -I $(srctree)/$(src)/../include
>
>  obj-$(CONFIG_CHASH) += chash.o
> diff --git a/drivers/gpu/drm/arm/display/komeda/Makefile b/drivers/gpu/drm/arm/display/komeda/Makefile
> index 1b875e5..a72e30c 100644
> --- a/drivers/gpu/drm/arm/display/komeda/Makefile
> +++ b/drivers/gpu/drm/arm/display/komeda/Makefile
> @@ -1,8 +1,8 @@
>  # SPDX-License-Identifier: GPL-2.0
>
>  ccflags-y := \
> -       -I$(src)/../include \
> -       -I$(src)
> +       -I $(srctree)/$(src)/../include \
> +       -I $(srctree)/$(src)
>
>  komeda-y := \
>         komeda_drv.o \
> diff --git a/drivers/gpu/drm/i915/gvt/Makefile b/drivers/gpu/drm/i915/gvt/Makefile
> index 271fb46..ea8324a 100644
> --- a/drivers/gpu/drm/i915/gvt/Makefile
> +++ b/drivers/gpu/drm/i915/gvt/Makefile
> @@ -5,5 +5,5 @@ GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \
>         execlist.o scheduler.o sched_policy.o mmio_context.o cmd_parser.o debugfs.o \
>         fb_decoder.o dmabuf.o page_track.o
>
> -ccflags-y                              += -I$(src) -I$(src)/$(GVT_DIR)
> +ccflags-y                              += -I $(srctree)/$(src) -I $(srctree)/$(src)/$(GVT_DIR)/
>  i915-y                                 += $(addprefix $(GVT_DIR)/, $(GVT_SOURCE))
> diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
> index 56a70c7..b7b1ebd 100644
> --- a/drivers/gpu/drm/msm/Makefile
> +++ b/drivers/gpu/drm/msm/Makefile
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
> -ccflags-y := -Idrivers/gpu/drm/msm
> -ccflags-y += -Idrivers/gpu/drm/msm/disp/dpu1
> -ccflags-$(CONFIG_DRM_MSM_DSI) += -Idrivers/gpu/drm/msm/dsi
> +ccflags-y := -I $(srctree)/$(src)
> +ccflags-y += -I $(srctree)/$(src)/disp/dpu1
> +ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(srctree)/$(src)/dsi
>
>  msm-y := \
>         adreno/adreno_device.o \
> diff --git a/drivers/gpu/drm/nouveau/Kbuild b/drivers/gpu/drm/nouveau/Kbuild
> index ea3035e..4fae728 100644
> --- a/drivers/gpu/drm/nouveau/Kbuild
> +++ b/drivers/gpu/drm/nouveau/Kbuild
> @@ -1,7 +1,7 @@
> -ccflags-y += -I$(src)/include
> -ccflags-y += -I$(src)/include/nvkm
> -ccflags-y += -I$(src)/nvkm
> -ccflags-y += -I$(src)
> +ccflags-y += -I $(srctree)/$(src)/include
> +ccflags-y += -I $(srctree)/$(src)/include/nvkm
> +ccflags-y += -I $(srctree)/$(src)/nvkm
> +ccflags-y += -I $(srctree)/$(src)
>
>  # NVKM - HW resource manager
>  #- code also used by various userspace tools/tests
> --
> 2.7.4
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [Intel-gfx] [PATCH v2] drm: prefix header search paths with $(srctree)/
  2019-04-26  1:36 ` Masahiro Yamada
@ 2019-04-26  2:18   ` Dave Airlie
  2019-04-26  2:25     ` yamada.masahiro
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Airlie @ 2019-04-26  2:18 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: David Airlie, Daniel Vetter, dri-devel, nouveau, Sam Ravnborg,
	David (ChunMing) Zhou, amd-gfx mailing list, James (Qian) Wang,
	Ben Skeggs, linux-arm-msm, Intel Graphics Development,
	intel-gvt-dev, Linux Kernel Mailing List, Christian König,
	Alex Deucher, freedreno

On Fri, 26 Apr 2019 at 11:46, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Hi.
>
>
> On Fri, Mar 29, 2019 at 8:37 PM Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> >
> > Currently, the Kbuild core manipulates header search paths in a crazy
> > way [1].
> >
> > To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
> > the search paths in the srctree. Some Makefiles are already written in
> > that way, but not all. The goal of this work is to make the notation
> > consistent, and finally get rid of the gross hacks.
> >
> > Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
> > ("kbuild: do not drop -I without parameter").
> >
> > [1]: https://patchwork.kernel.org/patch/9632347/
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> > ---
> >
> > I put all gpu/drm changes into a single patch because
> > they are trivial conversion.
> >
> > If you are interested in the big picture of this work,
> > the full patch set is available at the following URL.
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git build-test
>
>
> Is somebody taking care of this?
>

Are you expecting this to be merged in the drm tree? if so please
indicate that when posting.

I'd assumed this would go via kbuild tree.

If the later,
Acked-by: Dave Airlie <airlied@redhat.com>
Dave.

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

* RE: [Intel-gfx] [PATCH v2] drm: prefix header search paths with $(srctree)/
  2019-04-26  2:18   ` [Intel-gfx] " Dave Airlie
@ 2019-04-26  2:25     ` yamada.masahiro
  2019-04-26  2:56       ` Dave Airlie
  0 siblings, 1 reply; 8+ messages in thread
From: yamada.masahiro @ 2019-04-26  2:25 UTC (permalink / raw)
  To: airlied
  Cc: airlied, daniel, dri-devel, nouveau, sam, David1.Zhou, amd-gfx,
	james.qian.wang, bskeggs, linux-arm-msm, intel-gfx,
	intel-gvt-dev, linux-kernel, christian.koenig, alexander.deucher,
	freedreno

Hi Dave,

> -----Original Message-----
> From: Dave Airlie [mailto:airlied@gmail.com]
> Sent: Friday, April 26, 2019 11:19 AM
> To: Yamada, Masahiro/山田 真弘 <yamada.masahiro@socionext.com>
> Cc: David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>;
> dri-devel <dri-devel@lists.freedesktop.org>; nouveau
> <nouveau@lists.freedesktop.org>; Sam Ravnborg <sam@ravnborg.org>; David
> (ChunMing) Zhou <David1.Zhou@amd.com>; amd-gfx mailing list
> <amd-gfx@lists.freedesktop.org>; James (Qian) Wang
> <james.qian.wang@arm.com>; Ben Skeggs <bskeggs@redhat.com>;
> linux-arm-msm <linux-arm-msm@vger.kernel.org>; Intel Graphics
> Development <intel-gfx@lists.freedesktop.org>;
> intel-gvt-dev@lists.freedesktop.org; Linux Kernel Mailing List
> <linux-kernel@vger.kernel.org>; Christian König
> <christian.koenig@amd.com>; Alex Deucher <alexander.deucher@amd.com>;
> freedreno@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH v2] drm: prefix header search paths with
> $(srctree)/
> 
> On Fri, 26 Apr 2019 at 11:46, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> >
> > Hi.
> >
> >
> > On Fri, Mar 29, 2019 at 8:37 PM Masahiro Yamada
> > <yamada.masahiro@socionext.com> wrote:
> > >
> > > Currently, the Kbuild core manipulates header search paths in a crazy
> > > way [1].
> > >
> > > To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
> > > the search paths in the srctree. Some Makefiles are already written
> in
> > > that way, but not all. The goal of this work is to make the notation
> > > consistent, and finally get rid of the gross hacks.
> > >
> > > Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
> > > ("kbuild: do not drop -I without parameter").
> > >
> > > [1]: https://patchwork.kernel.org/patch/9632347/
> > >
> > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> > > ---
> > >
> > > I put all gpu/drm changes into a single patch because
> > > they are trivial conversion.
> > >
> > > If you are interested in the big picture of this work,
> > > the full patch set is available at the following URL.
> > >
> > >
> git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.g
> it build-test
> >
> >
> > Is somebody taking care of this?
> >
> 
> Are you expecting this to be merged in the drm tree? if so please
> indicate that when posting.


Sorry for unclearness.

Could you apply this to your drm tree?

Thanks.




> I'd assumed this would go via kbuild tree.
> 
> If the later,
> Acked-by: Dave Airlie <airlied@redhat.com>
> Dave.

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

* Re: [Intel-gfx] [PATCH v2] drm: prefix header search paths with $(srctree)/
  2019-04-26  2:25     ` yamada.masahiro
@ 2019-04-26  2:56       ` Dave Airlie
  2019-04-26 15:05         ` Daniel Vetter
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Airlie @ 2019-04-26  2:56 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Dave Airlie, Daniel Vetter, dri-devel, nouveau, Sam Ravnborg,
	zhoucm1, amd-gfx mailing list, James (Qian) Wang, Ben Skeggs,
	linux-arm-msm, Intel Graphics Development, intel-gvt-dev, LKML,
	Koenig, Christian, Deucher, Alexander, freedreno

Daniel, drm-misc-next-fixes?

Dave.

On Fri, 26 Apr 2019 at 12:25, <yamada.masahiro@socionext.com> wrote:
>
> Hi Dave,
>
> > -----Original Message-----
> > From: Dave Airlie [mailto:airlied@gmail.com]
> > Sent: Friday, April 26, 2019 11:19 AM
> > To: Yamada, Masahiro/山田 真弘 <yamada.masahiro@socionext.com>
> > Cc: David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>;
> > dri-devel <dri-devel@lists.freedesktop.org>; nouveau
> > <nouveau@lists.freedesktop.org>; Sam Ravnborg <sam@ravnborg.org>; David
> > (ChunMing) Zhou <David1.Zhou@amd.com>; amd-gfx mailing list
> > <amd-gfx@lists.freedesktop.org>; James (Qian) Wang
> > <james.qian.wang@arm.com>; Ben Skeggs <bskeggs@redhat.com>;
> > linux-arm-msm <linux-arm-msm@vger.kernel.org>; Intel Graphics
> > Development <intel-gfx@lists.freedesktop.org>;
> > intel-gvt-dev@lists.freedesktop.org; Linux Kernel Mailing List
> > <linux-kernel@vger.kernel.org>; Christian König
> > <christian.koenig@amd.com>; Alex Deucher <alexander.deucher@amd.com>;
> > freedreno@lists.freedesktop.org
> > Subject: Re: [Intel-gfx] [PATCH v2] drm: prefix header search paths with
> > $(srctree)/
> >
> > On Fri, 26 Apr 2019 at 11:46, Masahiro Yamada
> > <yamada.masahiro@socionext.com> wrote:
> > >
> > > Hi.
> > >
> > >
> > > On Fri, Mar 29, 2019 at 8:37 PM Masahiro Yamada
> > > <yamada.masahiro@socionext.com> wrote:
> > > >
> > > > Currently, the Kbuild core manipulates header search paths in a crazy
> > > > way [1].
> > > >
> > > > To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
> > > > the search paths in the srctree. Some Makefiles are already written
> > in
> > > > that way, but not all. The goal of this work is to make the notation
> > > > consistent, and finally get rid of the gross hacks.
> > > >
> > > > Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
> > > > ("kbuild: do not drop -I without parameter").
> > > >
> > > > [1]: https://patchwork.kernel.org/patch/9632347/
> > > >
> > > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > > Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> > > > ---
> > > >
> > > > I put all gpu/drm changes into a single patch because
> > > > they are trivial conversion.
> > > >
> > > > If you are interested in the big picture of this work,
> > > > the full patch set is available at the following URL.
> > > >
> > > >
> > git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.g
> > it build-test
> > >
> > >
> > > Is somebody taking care of this?
> > >
> >
> > Are you expecting this to be merged in the drm tree? if so please
> > indicate that when posting.
>
>
> Sorry for unclearness.
>
> Could you apply this to your drm tree?
>
> Thanks.
>
>
>
>
> > I'd assumed this would go via kbuild tree.
> >
> > If the later,
> > Acked-by: Dave Airlie <airlied@redhat.com>
> > Dave.

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

* Re: [Intel-gfx] [PATCH v2] drm: prefix header search paths with $(srctree)/
  2019-04-26  2:56       ` Dave Airlie
@ 2019-04-26 15:05         ` Daniel Vetter
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Vetter @ 2019-04-26 15:05 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Masahiro Yamada, Dave Airlie, Daniel Vetter, dri-devel, nouveau,
	Sam Ravnborg, zhoucm1, amd-gfx mailing list, James (Qian) Wang,
	Ben Skeggs, linux-arm-msm, Intel Graphics Development,
	intel-gvt-dev, LKML, Koenig, Christian, Deucher, Alexander,
	freedreno

On Fri, Apr 26, 2019 at 12:56:48PM +1000, Dave Airlie wrote:
> Daniel, drm-misc-next-fixes?

Makes sense. Pushed.

Cheers, Daniel

> 
> Dave.
> 
> On Fri, 26 Apr 2019 at 12:25, <yamada.masahiro@socionext.com> wrote:
> >
> > Hi Dave,
> >
> > > -----Original Message-----
> > > From: Dave Airlie [mailto:airlied@gmail.com]
> > > Sent: Friday, April 26, 2019 11:19 AM
> > > To: Yamada, Masahiro/山田 真弘 <yamada.masahiro@socionext.com>
> > > Cc: David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>;
> > > dri-devel <dri-devel@lists.freedesktop.org>; nouveau
> > > <nouveau@lists.freedesktop.org>; Sam Ravnborg <sam@ravnborg.org>; David
> > > (ChunMing) Zhou <David1.Zhou@amd.com>; amd-gfx mailing list
> > > <amd-gfx@lists.freedesktop.org>; James (Qian) Wang
> > > <james.qian.wang@arm.com>; Ben Skeggs <bskeggs@redhat.com>;
> > > linux-arm-msm <linux-arm-msm@vger.kernel.org>; Intel Graphics
> > > Development <intel-gfx@lists.freedesktop.org>;
> > > intel-gvt-dev@lists.freedesktop.org; Linux Kernel Mailing List
> > > <linux-kernel@vger.kernel.org>; Christian König
> > > <christian.koenig@amd.com>; Alex Deucher <alexander.deucher@amd.com>;
> > > freedreno@lists.freedesktop.org
> > > Subject: Re: [Intel-gfx] [PATCH v2] drm: prefix header search paths with
> > > $(srctree)/
> > >
> > > On Fri, 26 Apr 2019 at 11:46, Masahiro Yamada
> > > <yamada.masahiro@socionext.com> wrote:
> > > >
> > > > Hi.
> > > >
> > > >
> > > > On Fri, Mar 29, 2019 at 8:37 PM Masahiro Yamada
> > > > <yamada.masahiro@socionext.com> wrote:
> > > > >
> > > > > Currently, the Kbuild core manipulates header search paths in a crazy
> > > > > way [1].
> > > > >
> > > > > To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
> > > > > the search paths in the srctree. Some Makefiles are already written
> > > in
> > > > > that way, but not all. The goal of this work is to make the notation
> > > > > consistent, and finally get rid of the gross hacks.
> > > > >
> > > > > Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
> > > > > ("kbuild: do not drop -I without parameter").
> > > > >
> > > > > [1]: https://patchwork.kernel.org/patch/9632347/
> > > > >
> > > > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > > > Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> > > > > ---
> > > > >
> > > > > I put all gpu/drm changes into a single patch because
> > > > > they are trivial conversion.
> > > > >
> > > > > If you are interested in the big picture of this work,
> > > > > the full patch set is available at the following URL.
> > > > >
> > > > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.g
> > > it build-test
> > > >
> > > >
> > > > Is somebody taking care of this?
> > > >
> > >
> > > Are you expecting this to be merged in the drm tree? if so please
> > > indicate that when posting.
> >
> >
> > Sorry for unclearness.
> >
> > Could you apply this to your drm tree?
> >
> > Thanks.
> >
> >
> >
> >
> > > I'd assumed this would go via kbuild tree.
> > >
> > > If the later,
> > > Acked-by: Dave Airlie <airlied@redhat.com>
> > > Dave.

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

end of thread, other threads:[~2019-04-26 15:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29 11:32 [PATCH v2] drm: prefix header search paths with $(srctree)/ Masahiro Yamada
2019-03-29 12:01 ` james qian wang (Arm Technology China)
2019-03-29 14:24 ` Liviu Dudau
2019-04-26  1:36 ` Masahiro Yamada
2019-04-26  2:18   ` [Intel-gfx] " Dave Airlie
2019-04-26  2:25     ` yamada.masahiro
2019-04-26  2:56       ` Dave Airlie
2019-04-26 15:05         ` Daniel Vetter

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