mbox series

[00/15] drm/i915: i915_drv.h and i915_gpu_error.h include diet

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

Message

Jani Nikula Sept. 28, 2023, 6:08 p.m. UTC
I've got a script that roughly answers the question, "If this header was
modified, how many object files would have to be rebuilt?"

We have a lot of headers that cause the rebuild of almost the entire
driver when modified.

Reduce includes in i915_drv.h and i915_gpu_error.h.

Here are the before (-) and after (+) stats. If you build the driver a
lot, save yourself a bunch of waiting time, and help get this merged.

BR,
Jani.


+drivers/gpu/drm/i915/gem/i915_gem_object.h: 316
-drivers/gpu/drm/i915/gem/i915_gem_object.h: 340
+drivers/gpu/drm/i915/gt/intel_engine.h: 180
-drivers/gpu/drm/i915/gt/intel_engine.h: 325
+drivers/gpu/drm/i915/gt/intel_ggtt_fencing.h: 309
-drivers/gpu/drm/i915/gt/intel_ggtt_fencing.h: 339
+drivers/gpu/drm/i915/gt/intel_gsc.h: 268
-drivers/gpu/drm/i915/gt/intel_gsc.h: 329
+drivers/gpu/drm/i915/gt/intel_gt_buffer_pool_types.h: 268
-drivers/gpu/drm/i915/gt/intel_gt_buffer_pool_types.h: 329
+drivers/gpu/drm/i915/gt/intel_gtt.h: 318
-drivers/gpu/drm/i915/gt/intel_gtt.h: 340
+drivers/gpu/drm/i915/gt/intel_gt_types.h: 268
-drivers/gpu/drm/i915/gt/intel_gt_types.h: 329
+drivers/gpu/drm/i915/gt/intel_hwconfig.h: 268
-drivers/gpu/drm/i915/gt/intel_hwconfig.h: 329
+drivers/gpu/drm/i915/gt/intel_llc_types.h: 268
-drivers/gpu/drm/i915/gt/intel_llc_types.h: 329
+drivers/gpu/drm/i915/gt/intel_migrate_types.h: 268
-drivers/gpu/drm/i915/gt/intel_migrate_types.h: 329
+drivers/gpu/drm/i915/gt/intel_rc6_types.h: 268
-drivers/gpu/drm/i915/gt/intel_rc6_types.h: 329
+drivers/gpu/drm/i915/gt/intel_reset.h: 318
-drivers/gpu/drm/i915/gt/intel_reset.h: 340
+drivers/gpu/drm/i915/gt/intel_reset_types.h: 318
-drivers/gpu/drm/i915/gt/intel_reset_types.h: 340
+drivers/gpu/drm/i915/gt/intel_rps_types.h: 270
-drivers/gpu/drm/i915/gt/intel_rps_types.h: 330
+drivers/gpu/drm/i915/gt/intel_timeline.h: 181
-drivers/gpu/drm/i915/gt/intel_timeline.h: 326
+drivers/gpu/drm/i915/gt/intel_wopcm.h: 268
-drivers/gpu/drm/i915/gt/intel_wopcm.h: 329
+drivers/gpu/drm/i915/gt/intel_workarounds.h: 180
-drivers/gpu/drm/i915/gt/intel_workarounds.h: 325
+drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.h: 270
-drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.h: 331
+drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h: 271
-drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h: 332
+drivers/gpu/drm/i915/gt/uc/intel_guc_fw.h: 271
-drivers/gpu/drm/i915/gt/uc/intel_guc_fw.h: 332
+drivers/gpu/drm/i915/gt/uc/intel_guc.h: 271
-drivers/gpu/drm/i915/gt/uc/intel_guc.h: 332
+drivers/gpu/drm/i915/gt/uc/intel_guc_log.h: 271
-drivers/gpu/drm/i915/gt/uc/intel_guc_log.h: 332
+drivers/gpu/drm/i915/gt/uc/intel_guc_rc.h: 270
-drivers/gpu/drm/i915/gt/uc/intel_guc_rc.h: 331
+drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h: 271
-drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h: 332
+drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h: 271
-drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h: 332
+drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h: 271
-drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h: 332
+drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h: 271
-drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h: 332
+drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h: 271
-drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h: 332
+drivers/gpu/drm/i915/gt/uc/intel_huc.h: 271
-drivers/gpu/drm/i915/gt/uc/intel_huc.h: 332
+drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h: 272
-drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h: 333
+drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h: 272
-drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h: 333
+drivers/gpu/drm/i915/gt/uc/intel_uc.h: 270
-drivers/gpu/drm/i915/gt/uc/intel_uc.h: 331
+drivers/gpu/drm/i915/i915_gem_gtt.h: 317
-drivers/gpu/drm/i915/i915_gem_gtt.h: 340
+drivers/gpu/drm/i915/i915_gem_ww.h: 320
-drivers/gpu/drm/i915/i915_gem_ww.h: 344
+drivers/gpu/drm/i915/i915_syncmap.h: 182
-drivers/gpu/drm/i915/i915_syncmap.h: 327
+drivers/gpu/drm/i915/i915_sysfs.h: 5
-drivers/gpu/drm/i915/i915_sysfs.h: 4
+drivers/gpu/drm/i915/i915_vma.h: 309
-drivers/gpu/drm/i915/i915_vma.h: 339
+drivers/gpu/drm/i915/i915_vma_types.h: 318
-drivers/gpu/drm/i915/i915_vma_types.h: 340


Jani Nikula (15):
  drm/i915: stop including i915_utils.h from intel_runtime_pm.h
  drm/i915/mocs: use to_gt() instead of direct &i915->gt
  drm/i915: allocate i915->gt0 dynamically
  drm/i915/gt: remove i915->gt0 in favour of i915->gt[0]
  drm/i915: make some error capture functions static
  drm/i915: move gpu error debugfs to i915_gpu_error.c
  drm/i915: move gpu error sysfs to i915_gpu_error.c
  drm/i915: convert i915_coredump_get/put() to proper functions
  drm/i915: do more in i915_gpu_coredump_alloc()
  drm/i915: move execlist capture to i915_gpu_error.c
  drm/i915/guc: don't look at gpu error guts in guc capture
  drm/i915: hide gpu error structures inside i915_gpu_error.c
  drm/i915: stop including gt/intel_engine.h and gt/intel_gt_types.h
    from i915_drv.h
  drm/i915: stop including gt/uc/intel_uc.h from i915_drv.h
  drm/i915: stop including gt/intel_workarounds.h from i915_drv.h

 .../drm/i915/display/intel_display_reset.c    |   1 +
 .../gpu/drm/i915/display/intel_display_rps.c  |   1 +
 drivers/gpu/drm/i915/display/intel_fbdev.c    |   1 +
 .../drm/i915/display/intel_plane_initial.c    |   1 +
 drivers/gpu/drm/i915/gem/i915_gem_lmem.c      |   5 +-
 drivers/gpu/drm/i915/gem/i915_gem_tiling.c    |   1 +
 drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c    |   1 +
 drivers/gpu/drm/i915/gem/i915_gem_userptr.c   |   1 +
 drivers/gpu/drm/i915/gt/gen7_renderclear.c    |   1 +
 .../drm/i915/gt/intel_execlists_submission.c  |  38 +-
 drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c  |   3 +-
 drivers/gpu/drm/i915/gt/intel_gt.c            |  10 +-
 drivers/gpu/drm/i915/gt/intel_gt_requests.c   |   1 +
 drivers/gpu/drm/i915/gt/intel_mocs.c          |   4 +-
 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 +-
 .../gpu/drm/i915/gt/uc/intel_guc_capture.c    |  63 +--
 .../gpu/drm/i915/gt/uc/intel_guc_capture.h    |  20 +-
 drivers/gpu/drm/i915/gvt/execlist.c           |   3 +-
 drivers/gpu/drm/i915/gvt/gvt.h                |   1 +
 drivers/gpu/drm/i915/i915_debugfs.c           | 108 +---
 drivers/gpu/drm/i915/i915_drv.h               |  14 +-
 drivers/gpu/drm/i915/i915_getparam.c          |   1 +
 drivers/gpu/drm/i915/i915_gpu_error.c         | 507 +++++++++++++++++-
 drivers/gpu/drm/i915/i915_gpu_error.h         | 329 +-----------
 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/i915_sysfs.c             |  81 +--
 drivers/gpu/drm/i915/i915_utils.h             |   1 +
 drivers/gpu/drm/i915/i915_vgpu.c              |   2 +
 drivers/gpu/drm/i915/intel_gvt_mmio_table.c   |   1 +
 drivers/gpu/drm/i915/intel_region_ttm.c       |   2 +
 drivers/gpu/drm/i915/intel_runtime_pm.h       |   2 -
 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 +-
 .../i915/selftests/intel_scheduler_helpers.c  |   2 +-
 .../gpu/drm/i915/selftests/mock_gem_device.c  |   1 -
 42 files changed, 612 insertions(+), 625 deletions(-)