Skip to content

Commit 8367585

Browse files
committed
drm/xe: Cleanup unused header includes
clangd reports many "unused header" warnings throughout the Xe driver. Start working to clean this up by removing unnecessary includes in our .c files and/or replacing them with explicit includes of other headers that were previously being included indirectly. By far the most common offender here was unnecessary inclusion of xe_gt.h. That likely originates from the early days of xe.ko when xe_mmio did not exist and all register accesses, including those unrelated to GTs, were done with GT functions. There's still a lot of additional #include cleanup that can be done in the headers themselves; that will come as a followup series. v2: - Squash the 79-patch series down to a single patch. (MattB) Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260115032803.4067824-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
1 parent def675c commit 8367585

80 files changed

Lines changed: 45 additions & 129 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/gpu/drm/xe/tests/xe_bo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "tests/xe_test.h"
1919

2020
#include "xe_bo_evict.h"
21+
#include "xe_gt.h"
2122
#include "xe_pci.h"
2223
#include "xe_pm.h"
2324

drivers/gpu/drm/xe/xe_bb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77

88
#include "instructions/xe_mi_commands.h"
99
#include "xe_assert.h"
10-
#include "xe_device.h"
10+
#include "xe_device_types.h"
1111
#include "xe_exec_queue_types.h"
1212
#include "xe_gt.h"
13-
#include "xe_hw_fence.h"
1413
#include "xe_sa.h"
1514
#include "xe_sched_job.h"
1615
#include "xe_vm_types.h"

drivers/gpu/drm/xe/xe_bo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "xe_dma_buf.h"
2727
#include "xe_drm_client.h"
2828
#include "xe_ggtt.h"
29-
#include "xe_gt.h"
3029
#include "xe_map.h"
3130
#include "xe_migrate.h"
3231
#include "xe_pat.h"

drivers/gpu/drm/xe/xe_devcoredump.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@
1515
#include "xe_device.h"
1616
#include "xe_exec_queue.h"
1717
#include "xe_force_wake.h"
18-
#include "xe_gt.h"
1918
#include "xe_gt_printk.h"
19+
#include "xe_gt_types.h"
2020
#include "xe_guc_capture.h"
2121
#include "xe_guc_ct.h"
2222
#include "xe_guc_log.h"
2323
#include "xe_guc_submit.h"
2424
#include "xe_hw_engine.h"
25-
#include "xe_module.h"
2625
#include "xe_pm.h"
2726
#include "xe_sched_job.h"
2827
#include "xe_vm.h"

drivers/gpu/drm/xe/xe_device.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "xe_exec_queue.h"
3636
#include "xe_force_wake.h"
3737
#include "xe_ggtt.h"
38-
#include "xe_gsc_proxy.h"
3938
#include "xe_gt.h"
4039
#include "xe_gt_mcr.h"
4140
#include "xe_gt_printk.h"

drivers/gpu/drm/xe/xe_exec.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <uapi/drm/xe_drm.h>
1212
#include <linux/delay.h>
1313

14-
#include "xe_bo.h"
1514
#include "xe_device.h"
1615
#include "xe_exec_queue.h"
1716
#include "xe_hw_engine_group.h"

drivers/gpu/drm/xe/xe_exec_queue.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@
2121
#include "xe_gt_sriov_vf.h"
2222
#include "xe_hw_engine_class_sysfs.h"
2323
#include "xe_hw_engine_group.h"
24-
#include "xe_hw_fence.h"
2524
#include "xe_irq.h"
2625
#include "xe_lrc.h"
2726
#include "xe_macros.h"
2827
#include "xe_migrate.h"
2928
#include "xe_pm.h"
30-
#include "xe_ring_ops_types.h"
3129
#include "xe_trace.h"
3230
#include "xe_vm.h"
3331
#include "xe_pxp.h"

drivers/gpu/drm/xe/xe_execlist.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
#include "xe_bo.h"
1616
#include "xe_device.h"
1717
#include "xe_exec_queue.h"
18-
#include "xe_gt.h"
19-
#include "xe_hw_fence.h"
18+
#include "xe_gt_types.h"
2019
#include "xe_irq.h"
2120
#include "xe_lrc.h"
2221
#include "xe_macros.h"

drivers/gpu/drm/xe/xe_ggtt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
#include "regs/xe_regs.h"
2121
#include "xe_assert.h"
2222
#include "xe_bo.h"
23-
#include "xe_device.h"
24-
#include "xe_gt.h"
2523
#include "xe_gt_printk.h"
24+
#include "xe_gt_types.h"
2625
#include "xe_map.h"
2726
#include "xe_mmio.h"
2827
#include "xe_pm.h"

drivers/gpu/drm/xe/xe_gsc_debugfs.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77

88
#include <drm/drm_debugfs.h>
99
#include <drm/drm_managed.h>
10+
#include <drm/drm_print.h>
1011

11-
#include "xe_device.h"
12-
#include "xe_gt.h"
12+
#include "xe_gt_types.h"
1313
#include "xe_gsc.h"
14-
#include "xe_macros.h"
1514
#include "xe_pm.h"
1615

1716
static struct xe_gt *

0 commit comments

Comments
 (0)