From patchwork Wed Jul 10 00:54:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniele Ceraolo Spurio X-Patchwork-Id: 11037641 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 B7A4714E5 for ; Wed, 10 Jul 2019 00:55:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC21E286F1 for ; Wed, 10 Jul 2019 00:55:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FFB92870D; Wed, 10 Jul 2019 00:55:14 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BAB30286F1 for ; Wed, 10 Jul 2019 00:55:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 562818991E; Wed, 10 Jul 2019 00:55:13 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 594FD89949 for ; Wed, 10 Jul 2019 00:55:11 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2019 17:55:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,472,1557212400"; d="scan'208";a="340915113" Received: from dceraolo-linux.fm.intel.com ([10.1.27.145]) by orsmga005.jf.intel.com with ESMTP; 09 Jul 2019 17:55:10 -0700 From: Daniele Ceraolo Spurio To: intel-gfx@lists.freedesktop.org Date: Tue, 9 Jul 2019 17:54:32 -0700 Message-Id: <20190710005437.3496-8-daniele.ceraolospurio@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190710005437.3496-1-daniele.ceraolospurio@intel.com> References: <20190710005437.3496-1-daniele.ceraolospurio@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 07/12] drm/i915/uc: move GuC and HuC files under gt/uc/ X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Both microcontrollers are part of the GT HW and are closely related to GT operations. To keep all the files cleanly together, they've been placed in their own subdir inside the gt/ folder Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Chris Wilson Acked-by: Michal Wajdeczko --- drivers/gpu/drm/i915/Makefile | 21 ++++++++++--------- drivers/gpu/drm/i915/Makefile.header-test | 4 ---- drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- drivers/gpu/drm/i915/gt/uc/Makefile | 5 +++++ .../gpu/drm/i915/gt/uc/Makefile.header-test | 16 ++++++++++++++ drivers/gpu/drm/i915/{ => gt/uc}/intel_guc.c | 0 drivers/gpu/drm/i915/{ => gt/uc}/intel_guc.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_ads.c | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_ads.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_ct.c | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_ct.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_fw.c | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_fw.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_fwif.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_log.c | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_log.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_guc_reg.h | 0 .../i915/{ => gt/uc}/intel_guc_submission.c | 9 ++++---- .../i915/{ => gt/uc}/intel_guc_submission.h | 0 drivers/gpu/drm/i915/{ => gt/uc}/intel_huc.c | 0 drivers/gpu/drm/i915/{ => gt/uc}/intel_huc.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_huc_fw.c | 0 .../gpu/drm/i915/{ => gt/uc}/intel_huc_fw.h | 0 drivers/gpu/drm/i915/{ => gt/uc}/intel_uc.c | 0 drivers/gpu/drm/i915/{ => gt/uc}/intel_uc.h | 0 .../gpu/drm/i915/{ => gt/uc}/intel_uc_fw.c | 0 .../gpu/drm/i915/{ => gt/uc}/intel_uc_fw.h | 0 .../intel_guc.c => gt/uc/selftest_guc.c} | 0 drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gpu_error.h | 2 +- 32 files changed, 42 insertions(+), 23 deletions(-) create mode 100644 drivers/gpu/drm/i915/gt/uc/Makefile create mode 100644 drivers/gpu/drm/i915/gt/uc/Makefile.header-test rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc.c (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_ads.c (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_ads.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_ct.c (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_ct.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_fw.c (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_fw.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_fwif.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_log.c (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_log.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_reg.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_submission.c (99%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_guc_submission.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_huc.c (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_huc.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_huc_fw.c (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_huc_fw.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_uc.c (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_uc.h (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_uc_fw.c (100%) rename drivers/gpu/drm/i915/{ => gt/uc}/intel_uc_fw.h (100%) rename drivers/gpu/drm/i915/{selftests/intel_guc.c => gt/uc/selftest_guc.c} (100%) diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 5266dbeab01f..524516251a40 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -139,16 +139,17 @@ i915-y += \ intel_wopcm.o # general-purpose microcontroller (GuC) support -i915-y += intel_uc.o \ - intel_uc_fw.o \ - intel_guc.o \ - intel_guc_ads.o \ - intel_guc_ct.o \ - intel_guc_fw.o \ - intel_guc_log.o \ - intel_guc_submission.o \ - intel_huc.o \ - intel_huc_fw.o +obj-y += gt/uc/ +i915-y += gt/uc/intel_uc.o \ + gt/uc/intel_uc_fw.o \ + gt/uc/intel_guc.o \ + gt/uc/intel_guc_ads.o \ + gt/uc/intel_guc_ct.o \ + gt/uc/intel_guc_fw.o \ + gt/uc/intel_guc_log.o \ + gt/uc/intel_guc_submission.o \ + gt/uc/intel_huc.o \ + gt/uc/intel_huc_fw.o # modesetting core code obj-y += display/ diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 2fd61869bdaa..88ad1ad31c9b 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -19,14 +19,10 @@ header_test := \ i915_vgpu.h \ intel_csr.h \ intel_drv.h \ - intel_guc_ct.h \ - intel_guc_fwif.h \ - intel_guc_reg.h \ intel_gvt.h \ intel_pm.h \ intel_runtime_pm.h \ intel_sideband.h \ - intel_uc_fw.h \ intel_uncore.h \ intel_wakeref.h diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c index adfdb908587f..9abfa28c3020 100644 --- a/drivers/gpu/drm/i915/gt/intel_reset.c +++ b/drivers/gpu/drm/i915/gt/intel_reset.c @@ -19,7 +19,7 @@ #include "intel_gt_pm.h" #include "intel_reset.h" -#include "intel_guc.h" +#include "uc/intel_guc.h" #define RESET_MAX_RETRIES 3 diff --git a/drivers/gpu/drm/i915/gt/uc/Makefile b/drivers/gpu/drm/i915/gt/uc/Makefile new file mode 100644 index 000000000000..db9718aa3ee9 --- /dev/null +++ b/drivers/gpu/drm/i915/gt/uc/Makefile @@ -0,0 +1,5 @@ +# For building individual subdir files on the command line +subdir-ccflags-y += -I$(srctree)/$(src)/../.. + +# Extra header tests +include $(src)/Makefile.header-test diff --git a/drivers/gpu/drm/i915/gt/uc/Makefile.header-test b/drivers/gpu/drm/i915/gt/uc/Makefile.header-test new file mode 100644 index 000000000000..61e06cbb4b32 --- /dev/null +++ b/drivers/gpu/drm/i915/gt/uc/Makefile.header-test @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: MIT +# Copyright © 2019 Intel Corporation + +# Test the headers are compilable as standalone units +header_test := $(notdir $(wildcard $(src)/*.h)) + +quiet_cmd_header_test = HDRTEST $@ + cmd_header_test = echo "\#include \"$( $@ + +header_test_%.c: %.h + $(call cmd,header_test) + +extra-$(CONFIG_DRM_I915_WERROR) += \ + $(foreach h,$(header_test),$(patsubst %.h,header_test_%.o,$(h))) + +clean-files += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.c,$(h))) diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c similarity index 100% rename from drivers/gpu/drm/i915/intel_guc.c rename to drivers/gpu/drm/i915/gt/uc/intel_guc.c diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc.h similarity index 100% rename from drivers/gpu/drm/i915/intel_guc.h rename to drivers/gpu/drm/i915/gt/uc/intel_guc.h diff --git a/drivers/gpu/drm/i915/intel_guc_ads.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c similarity index 100% rename from drivers/gpu/drm/i915/intel_guc_ads.c rename to drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c diff --git a/drivers/gpu/drm/i915/intel_guc_ads.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.h similarity index 100% rename from drivers/gpu/drm/i915/intel_guc_ads.h rename to drivers/gpu/drm/i915/gt/uc/intel_guc_ads.h diff --git a/drivers/gpu/drm/i915/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c similarity index 100% rename from drivers/gpu/drm/i915/intel_guc_ct.c rename to drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c diff --git a/drivers/gpu/drm/i915/intel_guc_ct.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h similarity index 100% rename from drivers/gpu/drm/i915/intel_guc_ct.h rename to drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h diff --git a/drivers/gpu/drm/i915/intel_guc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c similarity index 100% rename from drivers/gpu/drm/i915/intel_guc_fw.c rename to drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c diff --git a/drivers/gpu/drm/i915/intel_guc_fw.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.h similarity index 100% rename from drivers/gpu/drm/i915/intel_guc_fw.h rename to drivers/gpu/drm/i915/gt/uc/intel_guc_fw.h diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h similarity index 100% rename from drivers/gpu/drm/i915/intel_guc_fwif.h rename to drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c similarity index 100% rename from drivers/gpu/drm/i915/intel_guc_log.c rename to drivers/gpu/drm/i915/gt/uc/intel_guc_log.c diff --git a/drivers/gpu/drm/i915/intel_guc_log.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.h similarity index 100% rename from drivers/gpu/drm/i915/intel_guc_log.h rename to drivers/gpu/drm/i915/gt/uc/intel_guc_log.h diff --git a/drivers/gpu/drm/i915/intel_guc_reg.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h similarity index 100% rename from drivers/gpu/drm/i915/intel_guc_reg.h rename to drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c similarity index 99% rename from drivers/gpu/drm/i915/intel_guc_submission.c rename to drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index 30692f8289bd..f015f7dee453 100644 --- a/drivers/gpu/drm/i915/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -24,12 +24,13 @@ #include -#include "gt/intel_engine_pm.h" -#include "gt/intel_lrc_reg.h" -#include "gt/intel_context.h" #include "gem/i915_gem_context.h" +#include "gt/intel_context.h" +#include "gt/intel_engine_pm.h" +#include "gt/intel_lrc_reg.h" #include "intel_guc_submission.h" + #include "i915_drv.h" enum { @@ -1162,5 +1163,5 @@ void intel_guc_submission_disable(struct intel_guc *guc) } #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST) -#include "selftests/intel_guc.c" +#include "selftest_guc.c" #endif diff --git a/drivers/gpu/drm/i915/intel_guc_submission.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h similarity index 100% rename from drivers/gpu/drm/i915/intel_guc_submission.h rename to drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h diff --git a/drivers/gpu/drm/i915/intel_huc.c b/drivers/gpu/drm/i915/gt/uc/intel_huc.c similarity index 100% rename from drivers/gpu/drm/i915/intel_huc.c rename to drivers/gpu/drm/i915/gt/uc/intel_huc.c diff --git a/drivers/gpu/drm/i915/intel_huc.h b/drivers/gpu/drm/i915/gt/uc/intel_huc.h similarity index 100% rename from drivers/gpu/drm/i915/intel_huc.h rename to drivers/gpu/drm/i915/gt/uc/intel_huc.h diff --git a/drivers/gpu/drm/i915/intel_huc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c similarity index 100% rename from drivers/gpu/drm/i915/intel_huc_fw.c rename to drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c diff --git a/drivers/gpu/drm/i915/intel_huc_fw.h b/drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h similarity index 100% rename from drivers/gpu/drm/i915/intel_huc_fw.h rename to drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c similarity index 100% rename from drivers/gpu/drm/i915/intel_uc.c rename to drivers/gpu/drm/i915/gt/uc/intel_uc.c diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/gt/uc/intel_uc.h similarity index 100% rename from drivers/gpu/drm/i915/intel_uc.h rename to drivers/gpu/drm/i915/gt/uc/intel_uc.h diff --git a/drivers/gpu/drm/i915/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c similarity index 100% rename from drivers/gpu/drm/i915/intel_uc_fw.c rename to drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c diff --git a/drivers/gpu/drm/i915/intel_uc_fw.h b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h similarity index 100% rename from drivers/gpu/drm/i915/intel_uc_fw.h rename to drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h diff --git a/drivers/gpu/drm/i915/selftests/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c similarity index 100% rename from drivers/gpu/drm/i915/selftests/intel_guc.c rename to drivers/gpu/drm/i915/gt/uc/selftest_guc.c diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index dc65a6131a5b..c00ccd736dea 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -40,12 +40,12 @@ #include "gem/i915_gem_context.h" #include "gt/intel_reset.h" +#include "gt/uc/intel_guc_submission.h" #include "i915_debugfs.h" #include "i915_irq.h" #include "intel_csr.h" #include "intel_drv.h" -#include "intel_guc_submission.h" #include "intel_pm.h" #include "intel_sideband.h" diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 794c6814a6d0..4a8d90304e21 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -65,6 +65,7 @@ #include "gt/intel_gt_pm.h" #include "gt/intel_reset.h" #include "gt/intel_workarounds.h" +#include "gt/uc/intel_uc.h" #include "i915_debugfs.h" #include "i915_drv.h" @@ -76,7 +77,6 @@ #include "intel_csr.h" #include "intel_drv.h" #include "intel_pm.h" -#include "intel_uc.h" static struct drm_driver driver; diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 76116e44b7e1..b172d9ee3041 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -74,10 +74,10 @@ #include "gt/intel_engine.h" #include "gt/intel_gt_types.h" #include "gt/intel_workarounds.h" +#include "gt/uc/intel_uc.h" #include "intel_device_info.h" #include "intel_runtime_pm.h" -#include "intel_uc.h" #include "intel_uncore.h" #include "intel_wakeref.h" #include "intel_wopcm.h" diff --git a/drivers/gpu/drm/i915/i915_gpu_error.h b/drivers/gpu/drm/i915/i915_gpu_error.h index 2ecd0c6a1c94..6936527670a4 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.h +++ b/drivers/gpu/drm/i915/i915_gpu_error.h @@ -14,9 +14,9 @@ #include #include "gt/intel_engine.h" +#include "gt/uc/intel_uc_fw.h" #include "intel_device_info.h" -#include "intel_uc_fw.h" #include "i915_gem.h" #include "i915_gem_gtt.h"