diff mbox series

[13/15] drm/i915: stop including gt/intel_engine.h and gt/intel_gt_types.h from i915_drv.h

Message ID 21523402971f9ec8d5b22c947cf1b321a80055cd.1695924021.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: i915_drv.h and i915_gpu_error.h include diet | expand

Commit Message

Jani Nikula Sept. 28, 2023, 6:08 p.m. UTC
i915_drv.h no longer needs the headers, and they are not included
indirectly either. Removing them reveals a ton of places that implicitly
depend on the includes. Make them explicit.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_reset.c       | 1 +
 drivers/gpu/drm/i915/display/intel_display_rps.c         | 1 +
 drivers/gpu/drm/i915/display/intel_fbdev.c               | 1 +
 drivers/gpu/drm/i915/display/intel_plane_initial.c       | 1 +
 drivers/gpu/drm/i915/gem/i915_gem_tiling.c               | 1 +
 drivers/gpu/drm/i915/gem/i915_gem_userptr.c              | 1 +
 drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c             | 3 ++-
 drivers/gpu/drm/i915/gt/intel_gt_requests.c              | 1 +
 drivers/gpu/drm/i915/gt/intel_rps.c                      | 1 +
 drivers/gpu/drm/i915/gt/intel_sseu.c                     | 1 +
 drivers/gpu/drm/i915/gt/intel_sseu_debugfs.c             | 2 +-
 drivers/gpu/drm/i915/gt/intel_wopcm.c                    | 3 ++-
 drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c                | 5 +++--
 drivers/gpu/drm/i915/gvt/execlist.c                      | 3 ++-
 drivers/gpu/drm/i915/gvt/gvt.h                           | 1 +
 drivers/gpu/drm/i915/i915_drv.h                          | 2 --
 drivers/gpu/drm/i915/i915_getparam.c                     | 1 +
 drivers/gpu/drm/i915/i915_mm.c                           | 4 ++--
 drivers/gpu/drm/i915/i915_pci.c                          | 3 ++-
 drivers/gpu/drm/i915/i915_query.c                        | 6 ++++--
 drivers/gpu/drm/i915/intel_gvt_mmio_table.c              | 1 +
 drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c             | 1 +
 drivers/gpu/drm/i915/pxp/intel_pxp_pm.c                  | 1 +
 drivers/gpu/drm/i915/pxp/intel_pxp_session.c             | 3 ++-
 drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c | 2 +-
 25 files changed, 35 insertions(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_reset.c b/drivers/gpu/drm/i915/display/intel_display_reset.c
index 17178d5d7788..107f0d398df6 100644
--- a/drivers/gpu/drm/i915/display/intel_display_reset.c
+++ b/drivers/gpu/drm/i915/display/intel_display_reset.c
@@ -5,6 +5,7 @@ 
 
 #include <drm/drm_atomic_helper.h>
 
+#include "gt/intel_gt_types.h"
 #include "i915_drv.h"
 #include "intel_clock_gating.h"
 #include "intel_display_driver.h"
diff --git a/drivers/gpu/drm/i915/display/intel_display_rps.c b/drivers/gpu/drm/i915/display/intel_display_rps.c
index 918d0327169a..92b19adf0939 100644
--- a/drivers/gpu/drm/i915/display/intel_display_rps.c
+++ b/drivers/gpu/drm/i915/display/intel_display_rps.c
@@ -6,6 +6,7 @@ 
 #include <drm/drm_crtc.h>
 #include <drm/drm_vblank.h>
 
+#include "gt/intel_gt_types.h"
 #include "gt/intel_rps.h"
 #include "i915_drv.h"
 #include "intel_display_rps.h"
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index 31d0d695d567..b246ff2afc7a 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -45,6 +45,7 @@ 
 
 #include "gem/i915_gem_lmem.h"
 #include "gem/i915_gem_mman.h"
+#include "gt/intel_gt_types.h"
 
 #include "i915_drv.h"
 #include "intel_display_types.h"
diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c b/drivers/gpu/drm/i915/display/intel_plane_initial.c
index 451a642e106e..83a355cb4218 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
@@ -4,6 +4,7 @@ 
  */
 
 #include "gem/i915_gem_region.h"
+#include "gt/intel_gt_types.h"
 #include "i915_drv.h"
 #include "intel_atomic_plane.h"
 #include "intel_display.h"
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_tiling.c b/drivers/gpu/drm/i915/gem/i915_gem_tiling.c
index a049ca0b7980..5ca651623d83 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_tiling.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_tiling.c
@@ -7,6 +7,7 @@ 
 #include <linux/string.h>
 #include <linux/bitops.h>
 
+#include "gt/intel_gt_types.h"
 #include "i915_drv.h"
 #include "i915_gem.h"
 #include "i915_gem_ioctls.h"
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
index 1d3ebdf4069b..69bff60e44ee 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
@@ -39,6 +39,7 @@ 
 #include <linux/swap.h>
 #include <linux/sched/mm.h>
 
+#include "gt/intel_gt_types.h"
 #include "i915_drv.h"
 #include "i915_gem_ioctls.h"
 #include "i915_gem_object.h"
diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c b/drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c
index 40371b8a9bbb..8c036baaea3c 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c
@@ -7,11 +7,12 @@ 
 
 #include "display/intel_display.h"
 #include "i915_drv.h"
+#include "i915_pvinfo.h"
 #include "i915_reg.h"
 #include "i915_scatterlist.h"
-#include "i915_pvinfo.h"
 #include "i915_vgpu.h"
 #include "intel_gt_regs.h"
+#include "intel_gt_types.h"
 #include "intel_mchbar_regs.h"
 
 /**
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.c b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
index d1a382dfaa1d..c681a7a04315 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_requests.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.c
@@ -7,6 +7,7 @@ 
 
 #include "i915_drv.h" /* for_each_engine() */
 #include "i915_request.h"
+#include "intel_engine.h"
 #include "intel_engine_heartbeat.h"
 #include "intel_execlists_submission.h"
 #include "intel_gt.h"
diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c
index 4feef874e6d6..b53118495cb6 100644
--- a/drivers/gpu/drm/i915/gt/intel_rps.c
+++ b/drivers/gpu/drm/i915/gt/intel_rps.c
@@ -13,6 +13,7 @@ 
 #include "i915_irq.h"
 #include "i915_reg.h"
 #include "intel_breadcrumbs.h"
+#include "intel_engine.h"
 #include "intel_gt.h"
 #include "intel_gt_clock_utils.h"
 #include "intel_gt_irq.h"
diff --git a/drivers/gpu/drm/i915/gt/intel_sseu.c b/drivers/gpu/drm/i915/gt/intel_sseu.c
index f602895f6d0d..13a2749cfb45 100644
--- a/drivers/gpu/drm/i915/gt/intel_sseu.c
+++ b/drivers/gpu/drm/i915/gt/intel_sseu.c
@@ -9,6 +9,7 @@ 
 #include "i915_perf_types.h"
 #include "intel_engine_regs.h"
 #include "intel_gt_regs.h"
+#include "intel_gt_types.h"
 #include "intel_sseu.h"
 
 void intel_sseu_set_info(struct sseu_dev_info *sseu, u8 max_slices,
diff --git a/drivers/gpu/drm/i915/gt/intel_sseu_debugfs.c b/drivers/gpu/drm/i915/gt/intel_sseu_debugfs.c
index c2ee5e1826b5..8b54bad0f5ae 100644
--- a/drivers/gpu/drm/i915/gt/intel_sseu_debugfs.c
+++ b/drivers/gpu/drm/i915/gt/intel_sseu_debugfs.c
@@ -1,5 +1,4 @@ 
 // SPDX-License-Identifier: MIT
-
 /*
  * Copyright © 2020 Intel Corporation
  */
@@ -10,6 +9,7 @@ 
 #include "i915_drv.h"
 #include "intel_gt_debugfs.h"
 #include "intel_gt_regs.h"
+#include "intel_gt_types.h"
 #include "intel_sseu_debugfs.h"
 
 static void cherryview_sseu_device_status(struct intel_gt *gt,
diff --git a/drivers/gpu/drm/i915/gt/intel_wopcm.c b/drivers/gpu/drm/i915/gt/intel_wopcm.c
index 7ebbcc191c2d..fcad35df0671 100644
--- a/drivers/gpu/drm/i915/gt/intel_wopcm.c
+++ b/drivers/gpu/drm/i915/gt/intel_wopcm.c
@@ -3,8 +3,9 @@ 
  * Copyright © 2017-2019 Intel Corporation
  */
 
-#include "intel_wopcm.h"
 #include "i915_drv.h"
+#include "intel_gt_types.h"
+#include "intel_wopcm.h"
 
 /**
  * DOC: WOPCM Layout
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c
index 0d3b22a74365..cf0ef467542d 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c
@@ -5,13 +5,14 @@ 
 
 #include <linux/types.h>
 
+#include "gt/intel_engine.h"
 #include "gt/intel_gt.h"
 #include "gt/intel_gt_print.h"
+#include "i915_drv.h"
+#include "i915_reg.h"
 #include "intel_gsc_fw.h"
 #include "intel_gsc_proxy.h"
 #include "intel_gsc_uc.h"
-#include "i915_drv.h"
-#include "i915_reg.h"
 
 static void gsc_work(struct work_struct *work)
 {
diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i915/gvt/execlist.c
index 274c6ef42400..ad392c4f4e2a 100644
--- a/drivers/gpu/drm/i915/gvt/execlist.c
+++ b/drivers/gpu/drm/i915/gvt/execlist.c
@@ -32,8 +32,9 @@ 
  *
  */
 
-#include "i915_drv.h"
+#include "gt/intel_engine.h"
 #include "gvt.h"
+#include "i915_drv.h"
 
 #define _EL_OFFSET_STATUS       0x234
 #define _EL_OFFSET_STATUS_BUF   0x370
diff --git a/drivers/gpu/drm/i915/gvt/gvt.h b/drivers/gpu/drm/i915/gvt/gvt.h
index 53a0a42a50db..489f868736e0 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.h
+++ b/drivers/gpu/drm/i915/gvt/gvt.h
@@ -39,6 +39,7 @@ 
 
 #include <asm/kvm_page_track.h>
 
+#include "gt/intel_gt_types.h"
 #include "i915_drv.h"
 #include "intel_gvt.h"
 
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index d04a9c32c44f..cd4d55f5f8de 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -43,8 +43,6 @@ 
 #include "gem/i915_gem_shrinker.h"
 #include "gem/i915_gem_stolen.h"
 
-#include "gt/intel_engine.h"
-#include "gt/intel_gt_types.h"
 #include "gt/intel_region_lmem.h"
 #include "gt/intel_workarounds.h"
 #include "gt/uc/intel_uc.h"
diff --git a/drivers/gpu/drm/i915/i915_getparam.c b/drivers/gpu/drm/i915/i915_getparam.c
index 5c3fec63cb4c..a1944382377a 100644
--- a/drivers/gpu/drm/i915/i915_getparam.c
+++ b/drivers/gpu/drm/i915/i915_getparam.c
@@ -4,6 +4,7 @@ 
 
 #include "gem/i915_gem_mman.h"
 #include "gt/intel_engine_user.h"
+#include "gt/intel_gt_types.h"
 
 #include "pxp/intel_pxp.h"
 
diff --git a/drivers/gpu/drm/i915/i915_mm.c b/drivers/gpu/drm/i915/i915_mm.c
index 7998bc74ab49..e2f4ec1c29c7 100644
--- a/drivers/gpu/drm/i915/i915_mm.c
+++ b/drivers/gpu/drm/i915/i915_mm.c
@@ -22,9 +22,9 @@ 
  *
  */
 
-#include <linux/mm.h>
+#include <asm/cacheflush.h>
 #include <linux/io-mapping.h>
-
+#include <linux/mm.h>
 
 #include "i915_drv.h"
 #include "i915_mm.h"
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index df7c261410f7..4dc638e8b887 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -28,9 +28,10 @@ 
 
 #include "display/intel_display.h"
 #include "display/intel_display_driver.h"
+#include "gem/i915_gem_object_types.h"
 #include "gt/intel_gt_regs.h"
+#include "gt/intel_gt_types.h"
 #include "gt/intel_sa_media.h"
-#include "gem/i915_gem_object_types.h"
 
 #include "i915_driver.h"
 #include "i915_drv.h"
diff --git a/drivers/gpu/drm/i915/i915_query.c b/drivers/gpu/drm/i915/i915_query.c
index 00871ef99792..84ebfe94456a 100644
--- a/drivers/gpu/drm/i915/i915_query.c
+++ b/drivers/gpu/drm/i915/i915_query.c
@@ -6,11 +6,13 @@ 
 
 #include <linux/nospec.h>
 
+#include <uapi/drm/i915_drm.h>
+
+#include "gt/intel_engine_user.h"
+#include "gt/intel_gt_types.h"
 #include "i915_drv.h"
 #include "i915_perf.h"
 #include "i915_query.h"
-#include "gt/intel_engine_user.h"
-#include <uapi/drm/i915_drm.h>
 
 static int copy_query_item(void *query_hdr, size_t query_sz,
 			   u32 total_length,
diff --git a/drivers/gpu/drm/i915/intel_gvt_mmio_table.c b/drivers/gpu/drm/i915/intel_gvt_mmio_table.c
index b3c036a54529..0e3d9a9ec4d4 100644
--- a/drivers/gpu/drm/i915/intel_gvt_mmio_table.c
+++ b/drivers/gpu/drm/i915/intel_gvt_mmio_table.c
@@ -16,6 +16,7 @@ 
 #include "display/skl_watermark_regs.h"
 #include "display/vlv_dsi_pll_regs.h"
 #include "gt/intel_gt_regs.h"
+#include "gt/intel_gt_types.h"
 #include "gvt/gvt.h"
 
 #include "i915_drv.h"
diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c b/drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c
index e07c5b380789..c8e5b22eccff 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c
@@ -9,6 +9,7 @@ 
 #include <drm/drm_print.h>
 
 #include "gt/intel_gt_debugfs.h"
+#include "gt/intel_gt_types.h"
 
 #include "i915_drv.h"
 
diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
index 6dfd24918953..7acdecc758c0 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
@@ -3,6 +3,7 @@ 
  * Copyright(c) 2020 Intel Corporation.
  */
 
+#include "gt/intel_gt_types.h"
 #include "i915_drv.h"
 
 #include "intel_pxp.h"
diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_session.c b/drivers/gpu/drm/i915/pxp/intel_pxp_session.c
index 0a3e66b0265e..eccb5fbe2557 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp_session.c
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp_session.c
@@ -3,15 +3,16 @@ 
  * Copyright(c) 2020, Intel Corporation. All rights reserved.
  */
 
+#include "gt/intel_gt_types.h"
 #include "i915_drv.h"
 
 #include "intel_pxp.h"
 #include "intel_pxp_cmd.h"
 #include "intel_pxp_gsccs.h"
+#include "intel_pxp_regs.h"
 #include "intel_pxp_session.h"
 #include "intel_pxp_tee.h"
 #include "intel_pxp_types.h"
-#include "intel_pxp_regs.h"
 
 #define ARB_SESSION I915_PROTECTED_CONTENT_DEFAULT_SESSION /* shorter define */
 
diff --git a/drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c b/drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c
index 2990dd4d4a0d..be9086da29fc 100644
--- a/drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c
+++ b/drivers/gpu/drm/i915/selftests/intel_scheduler_helpers.c
@@ -3,7 +3,7 @@ 
  * Copyright © 2021 Intel Corporation
  */
 
-//#include "gt/intel_engine_user.h"
+#include "gt/intel_engine.h"
 #include "gt/intel_gt.h"
 #include "i915_drv.h"
 #include "i915_selftest.h"