From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B28B4C433EF for ; Thu, 20 Jan 2022 10:10:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34EBA10E392; Thu, 20 Jan 2022 10:10:45 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id A845210E392 for ; Thu, 20 Jan 2022 10:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642673443; x=1674209443; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=DkZIwlfwnQYr5mHrENDwI1EKgu44/4lwlScJr7QbDyc=; b=DjIV0XRvkXcFcMhRAQDwAsD+ziwIlXoUFD9IWL2RBHsrhl+4ROaI3j+H yqZg/5Up1y9ruzn0Y4x4tzWzDKa19f9OR3n6Z/NwWKiTXQkOMCBBnqENb VhPvu2DGr5hh2VeYGqPkOCKScJ6Ekjl4I8Ch9ti80wrFZ0IGQKv7zeAEB /VIa384LpPjPrZpVLe1ttqyskxvNN+7oaFP76gFrkyqjArYLXHpNGHKGl 6WnEEjSKlWHFCNk7pjmoo0aP45du+VAqhXN8IP8tqAblI0Va0iSsBL+If Yw+KOzlg2GQxe6Ywow0/GKEwEbMTe4quCfjF9hMiIW+ZWp/wOOdCWL4Qo A==; X-IronPort-AV: E=McAfee;i="6200,9189,10232"; a="331670115" X-IronPort-AV: E=Sophos;i="5.88,302,1635231600"; d="scan'208";a="331670115" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2022 02:10:42 -0800 X-IronPort-AV: E=Sophos;i="5.88,302,1635231600"; d="scan'208";a="532708504" Received: from davidfsc-mobl3.ger.corp.intel.com (HELO localhost) ([10.252.52.140]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2022 02:10:40 -0800 From: Jani Nikula To: Matt Roper , intel-gfx@lists.freedesktop.org In-Reply-To: <20220120063809.1020633-7-matthew.d.roper@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20220120063809.1020633-1-matthew.d.roper@intel.com> <20220120063809.1020633-7-matthew.d.roper@intel.com> Date: Thu, 20 Jan 2022 12:10:36 +0200 Message-ID: <87pmomafab.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Intel-gfx] [PATCH 6/6] drm/i915: Only include i915_reg.h from .c files X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 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" On Wed, 19 Jan 2022, Matt Roper wrote: > Several of our i915 header files, have been including i915_reg.h. This > means that any change to i915_reg.h will trigger a full rebuild of > pretty much every file of the driver, even those that don't have any > kind of register access. Let's delete the i915_reg.h include from all > headers and include an explicit include from the .c files that truly > need the register definitions; those that need a definition of > i915_reg_t for a function definition can get it from i915_reg_defs.h > instead. > > We also remove two non-register #define's (VLV_DISPLAY_BASE and > GEN12_SFC_DONE_MAX) into i915_reg_defs.h to allow us to drop the > i915_reg.h include from a couple of headers. I don't think they really belong in i915_reg_defs.h, but it should be trivial to clean that up afterwards, so meh. Overall on the series, Acked-by: Jani Nikula I like where this is heading. > > There's probably a lot more header dependency optimization possible, but > the changes here roughly cut the number of files compiled after 'touch > i915_reg.h' in half --- a good first step. > > Cc: Jani Nikula > Signed-off-by: Matt Roper > --- > drivers/gpu/drm/i915/display/g4x_hdmi.h | 2 +- > drivers/gpu/drm/i915/display/intel_atomic.c | 1 + > drivers/gpu/drm/i915/display/intel_bios.c | 1 + > drivers/gpu/drm/i915/display/intel_bw.c | 1 + > drivers/gpu/drm/i915/display/intel_crt.h | 2 +- > drivers/gpu/drm/i915/display/intel_ddi.h | 2 +- > drivers/gpu/drm/i915/display/intel_de.h | 1 - > drivers/gpu/drm/i915/display/intel_display_power.h | 1 - > drivers/gpu/drm/i915/display/intel_dmc.h | 2 +- > drivers/gpu/drm/i915/display/intel_dp.h | 2 -- > drivers/gpu/drm/i915/display/intel_dsb.h | 2 +- > drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 1 + > drivers/gpu/drm/i915/display/intel_dvo_dev.h | 2 +- > drivers/gpu/drm/i915/display/intel_hdmi.h | 2 -- > drivers/gpu/drm/i915/display/intel_lvds.h | 2 +- > drivers/gpu/drm/i915/display/intel_sdvo.h | 2 +- > drivers/gpu/drm/i915/display/intel_tc.c | 1 + > drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 1 + > drivers/gpu/drm/i915/gem/i915_gem_tiling.c | 1 + > drivers/gpu/drm/i915/gt/gen2_engine_cs.c | 1 + > drivers/gpu/drm/i915/gt/intel_engine.h | 1 - > drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c | 1 + > drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c | 1 + > drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 1 + > drivers/gpu/drm/i915/gt/intel_llc.c | 1 + > drivers/gpu/drm/i915/gt/intel_rc6.c | 1 + > drivers/gpu/drm/i915/gt/intel_rc6.h | 2 +- > drivers/gpu/drm/i915/gt/intel_region_lmem.c | 1 + > drivers/gpu/drm/i915/gt/intel_workarounds_types.h | 2 +- > drivers/gpu/drm/i915/gt/uc/abi/guc_actions_slpc_abi.h | 1 - > drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h | 2 +- > drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 1 + > drivers/gpu/drm/i915/gt/uc/intel_huc.h | 2 +- > drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 + > drivers/gpu/drm/i915/gvt/aperture_gm.c | 1 + > drivers/gpu/drm/i915/gvt/display.c | 1 + > drivers/gpu/drm/i915/gvt/dmabuf.c | 1 + > drivers/gpu/drm/i915/gvt/edid.c | 1 + > drivers/gpu/drm/i915/gvt/fb_decoder.c | 1 + > drivers/gpu/drm/i915/gvt/handlers.c | 1 + > drivers/gpu/drm/i915/gvt/interrupt.c | 1 + > drivers/gpu/drm/i915/gvt/interrupt.h | 2 +- > drivers/gpu/drm/i915/gvt/mmio.c | 1 + > drivers/gpu/drm/i915/gvt/mmio_context.h | 1 - > drivers/gpu/drm/i915/i915_cmd_parser.c | 1 + > drivers/gpu/drm/i915/i915_drv.h | 1 - > drivers/gpu/drm/i915/i915_pci.c | 1 + > drivers/gpu/drm/i915/i915_perf_types.h | 2 +- > drivers/gpu/drm/i915/i915_reg.h | 3 --- > drivers/gpu/drm/i915/i915_reg_defs.h | 4 ++++ > drivers/gpu/drm/i915/intel_dram.c | 1 + > drivers/gpu/drm/i915/intel_pcode.c | 1 + > drivers/gpu/drm/i915/intel_pm.h | 1 - > drivers/gpu/drm/i915/intel_sbi.c | 1 + > drivers/gpu/drm/i915/intel_uncore.h | 2 +- > drivers/gpu/drm/i915/vlv_sideband.c | 1 + > 56 files changed, 49 insertions(+), 29 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/g4x_hdmi.h b/drivers/gpu/drm/i915/display/g4x_hdmi.h > index 7aca14b602c6..db9a93bc9321 100644 > --- a/drivers/gpu/drm/i915/display/g4x_hdmi.h > +++ b/drivers/gpu/drm/i915/display/g4x_hdmi.h > @@ -8,7 +8,7 @@ > > #include > > -#include "i915_reg.h" > +#include "i915_reg_defs.h" > > enum port; > struct drm_i915_private; > diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c > index 1080741d1561..093904065112 100644 > --- a/drivers/gpu/drm/i915/display/intel_atomic.c > +++ b/drivers/gpu/drm/i915/display/intel_atomic.c > @@ -35,6 +35,7 @@ > #include > > #include "i915_drv.h" > +#include "i915_reg.h" > #include "intel_atomic.h" > #include "intel_cdclk.h" > #include "intel_display_types.h" > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c > index 7d04572dd18b..a0b818b127df 100644 > --- a/drivers/gpu/drm/i915/display/intel_bios.c > +++ b/drivers/gpu/drm/i915/display/intel_bios.c > @@ -32,6 +32,7 @@ > #include "display/intel_gmbus.h" > > #include "i915_drv.h" > +#include "i915_reg.h" > > #define _INTEL_BIOS_PRIVATE > #include "intel_vbt_defs.h" > diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c > index c35bad21b657..5dce3cf0ed12 100644 > --- a/drivers/gpu/drm/i915/display/intel_bw.c > +++ b/drivers/gpu/drm/i915/display/intel_bw.c > @@ -5,6 +5,7 @@ > > #include > > +#include "i915_reg.h" > #include "intel_atomic.h" > #include "intel_bw.h" > #include "intel_cdclk.h" > diff --git a/drivers/gpu/drm/i915/display/intel_crt.h b/drivers/gpu/drm/i915/display/intel_crt.h > index 6c5c44600cbd..c6071efd93ce 100644 > --- a/drivers/gpu/drm/i915/display/intel_crt.h > +++ b/drivers/gpu/drm/i915/display/intel_crt.h > @@ -6,7 +6,7 @@ > #ifndef __INTEL_CRT_H__ > #define __INTEL_CRT_H__ > > -#include "i915_reg.h" > +#include "i915_reg_defs.h" > > enum pipe; > struct drm_encoder; > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.h b/drivers/gpu/drm/i915/display/intel_ddi.h > index c2fea6562917..d39076facdce 100644 > --- a/drivers/gpu/drm/i915/display/intel_ddi.h > +++ b/drivers/gpu/drm/i915/display/intel_ddi.h > @@ -6,7 +6,7 @@ > #ifndef __INTEL_DDI_H__ > #define __INTEL_DDI_H__ > > -#include "i915_reg.h" > +#include "i915_reg_defs.h" > > struct drm_connector_state; > struct drm_i915_private; > diff --git a/drivers/gpu/drm/i915/display/intel_de.h b/drivers/gpu/drm/i915/display/intel_de.h > index 9d8c177aa228..9c104f65e4c8 100644 > --- a/drivers/gpu/drm/i915/display/intel_de.h > +++ b/drivers/gpu/drm/i915/display/intel_de.h > @@ -7,7 +7,6 @@ > #define __INTEL_DE_H__ > > #include "i915_drv.h" > -#include "i915_reg.h" > #include "i915_trace.h" > #include "intel_uncore.h" > > diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h b/drivers/gpu/drm/i915/display/intel_display_power.h > index 686d18eaa24c..930be3a0f8ef 100644 > --- a/drivers/gpu/drm/i915/display/intel_display_power.h > +++ b/drivers/gpu/drm/i915/display/intel_display_power.h > @@ -7,7 +7,6 @@ > #define __INTEL_DISPLAY_POWER_H__ > > #include "intel_runtime_pm.h" > -#include "i915_reg.h" > > enum dpio_channel; > enum dpio_phy; > diff --git a/drivers/gpu/drm/i915/display/intel_dmc.h b/drivers/gpu/drm/i915/display/intel_dmc.h > index b20f3441ca60..7c590309a3a9 100644 > --- a/drivers/gpu/drm/i915/display/intel_dmc.h > +++ b/drivers/gpu/drm/i915/display/intel_dmc.h > @@ -6,7 +6,7 @@ > #ifndef __INTEL_DMC_H__ > #define __INTEL_DMC_H__ > > -#include "i915_reg.h" > +#include "i915_reg_defs.h" > #include "intel_wakeref.h" > #include > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h > index b64145a3869a..d457e17bdc57 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.h > +++ b/drivers/gpu/drm/i915/display/intel_dp.h > @@ -8,8 +8,6 @@ > > #include > > -#include "i915_reg.h" > - > enum intel_output_format; > enum pipe; > enum port; > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.h b/drivers/gpu/drm/i915/display/intel_dsb.h > index 654a11f24b80..6cb9c580cdca 100644 > --- a/drivers/gpu/drm/i915/display/intel_dsb.h > +++ b/drivers/gpu/drm/i915/display/intel_dsb.h > @@ -8,7 +8,7 @@ > > #include > > -#include "i915_reg.h" > +#include "i915_reg_defs.h" > > struct intel_crtc_state; > struct i915_vma; > diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c > index da0bd056f3d3..a85574c413e8 100644 > --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c > +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c > @@ -39,6 +39,7 @@ > #include