From patchwork Fri Mar 29 11:32:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10876907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C809714DE for ; Fri, 29 Mar 2019 11:39:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACA0328E57 for ; Fri, 29 Mar 2019 11:39:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B6F928E69; Fri, 29 Mar 2019 11:39:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 993A828E57 for ; Fri, 29 Mar 2019 11:39:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729386AbfC2Ljo (ORCPT ); Fri, 29 Mar 2019 07:39:44 -0400 Received: from condef-03.nifty.com ([202.248.20.68]:42777 "EHLO condef-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729384AbfC2Ljn (ORCPT ); Fri, 29 Mar 2019 07:39:43 -0400 Received: from conuserg-11.nifty.com ([10.126.8.74])by condef-03.nifty.com with ESMTP id x2TBZKFE001763 for ; Fri, 29 Mar 2019 20:35:20 +0900 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-11.nifty.com with ESMTP id x2TBWphT012559; Fri, 29 Mar 2019 20:32:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com x2TBWphT012559 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1553859173; bh=tEJutIG3Lh/EZkRCNYRIQ9ceoZoPdFp7/y8BL0YMjyY=; h=From:To:Cc:Subject:Date:From; b=AX+5tIq8j4ohThNs6xJDKIPJdON3aYv91vuxqpuqEiHXTPA3BK75CKGm+CP1msmDw yC1URWCQwcJoXdoSwfXeK4TqIRypGy4uAP5KixRISBC9qlicfRLXmAzlV6TGLKWNxH TYRemkI9COgy8w0X5+z30SWyOy6SZDfnvkESm1UrBSntV8ML5EzFfQrVc7ZRNdIwct HuyrHaW96dtuVANjcsF+Hn/JfsMnSm9XHwUiRZc4fLehrYOror9sGuJkD/S3snRYmH Zbz8XwQc+/+IuCr9zY7zSgxtzJUtXrOukqKR72Wd1cUh9ApYEVyAOEXTZci4R/F8GZ Aoo2kb2QMwYqA== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Cc: Sam Ravnborg , Masahiro Yamada , Sean Paul , Zhenyu Wang , nouveau@lists.freedesktop.org, Jani Nikula , "James (Qian) Wang" , Alex Deucher , "David (ChunMing) Zhou" , amd-gfx@lists.freedesktop.org, Rob Clark , =?utf-8?q?Christian_K=C3=B6nig?= , Zhi Wang , Rodrigo Vivi , linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org, Ben Skeggs , Brian Starkey , intel-gvt-dev@lists.freedesktop.org, Liviu Dudau , linux-kernel@vger.kernel.org, Joonas Lahtinen , freedreno@lists.freedesktop.org Subject: [PATCH v2] drm: prefix header search paths with $(srctree)/ Date: Fri, 29 Mar 2019 20:32:41 +0900 Message-Id: <1553859161-2628-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Sam Ravnborg Acked-by: Liviu Dudau Acked-by: Dave Airlie --- 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