Skip to content

Commit 65805c2

Browse files
committed
drm/i915: split out i915_wait_util.h
Move waiting related utilities from i915_utils.h to separate new file i915_wait_util.h. Clean up related includes. Note: Many of the various wait macro usages could likely be refactored to use poll_timeout_us(). Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://lore.kernel.org/r/431396ac8cdb3e2f4ff053a8933290289a66ce42.1757582214.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <[email protected]>
1 parent 2f04432 commit 65805c2

24 files changed

+183
-150
lines changed

drivers/gpu/drm/i915/gt/intel_execlists_submission.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
#include "i915_timer_util.h"
118118
#include "i915_trace.h"
119119
#include "i915_vgpu.h"
120+
#include "i915_wait_util.h"
120121
#include "intel_breadcrumbs.h"
121122
#include "intel_context.h"
122123
#include "intel_engine_heartbeat.h"

drivers/gpu/drm/i915/gt/intel_gt_mcr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55

66
#include "i915_drv.h"
7+
#include "i915_wait_util.h"
78
#include "intel_gt.h"
89
#include "intel_gt_mcr.h"
910
#include "intel_gt_print.h"

drivers/gpu/drm/i915/gt/intel_reset.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@
99

1010
#include "display/intel_display_reset.h"
1111
#include "display/intel_overlay.h"
12-
1312
#include "gem/i915_gem_context.h"
14-
1513
#include "gt/intel_gt_regs.h"
16-
1714
#include "gt/uc/intel_gsc_fw.h"
15+
#include "uc/intel_guc.h"
1816

1917
#include "i915_drv.h"
2018
#include "i915_file_private.h"
2119
#include "i915_gpu_error.h"
2220
#include "i915_irq.h"
2321
#include "i915_reg.h"
22+
#include "i915_wait_util.h"
2423
#include "intel_breadcrumbs.h"
2524
#include "intel_engine_pm.h"
2625
#include "intel_engine_regs.h"
@@ -32,8 +31,6 @@
3231
#include "intel_pci_config.h"
3332
#include "intel_reset.h"
3433

35-
#include "uc/intel_guc.h"
36-
3734
#define RESET_MAX_RETRIES 3
3835

3936
static void client_mark_guilty(struct i915_gem_context *ctx, bool banned)

drivers/gpu/drm/i915/gt/intel_ring_submission.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@
1515
#include "i915_irq.h"
1616
#include "i915_mitigations.h"
1717
#include "i915_reg.h"
18+
#include "i915_wait_util.h"
1819
#include "intel_breadcrumbs.h"
1920
#include "intel_context.h"
21+
#include "intel_engine_heartbeat.h"
22+
#include "intel_engine_pm.h"
2023
#include "intel_engine_regs.h"
2124
#include "intel_gt.h"
2225
#include "intel_gt_irq.h"
26+
#include "intel_gt_print.h"
2327
#include "intel_gt_regs.h"
2428
#include "intel_reset.h"
2529
#include "intel_ring.h"
2630
#include "shmem_utils.h"
27-
#include "intel_engine_heartbeat.h"
28-
#include "intel_engine_pm.h"
29-
#include "intel_gt_print.h"
3031

3132
/* Rough estimate of the typical request size, performing a flush,
3233
* set-context and then emitting the batch.

drivers/gpu/drm/i915/gt/intel_rps.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
#include "display/intel_display.h"
1111
#include "display/intel_display_rps.h"
1212
#include "soc/intel_dram.h"
13+
1314
#include "i915_drv.h"
1415
#include "i915_irq.h"
1516
#include "i915_reg.h"
17+
#include "i915_wait_util.h"
1618
#include "intel_breadcrumbs.h"
1719
#include "intel_gt.h"
1820
#include "intel_gt_clock_utils.h"

drivers/gpu/drm/i915/gt/selftest_tlb.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
* Copyright © 2022 Intel Corporation
44
*/
55

6-
#include "i915_selftest.h"
7-
86
#include "gem/i915_gem_internal.h"
97
#include "gem/i915_gem_lmem.h"
108
#include "gem/i915_gem_region.h"
119

1210
#include "gen8_engine_cs.h"
1311
#include "i915_gem_ww.h"
12+
#include "i915_selftest.h"
13+
#include "i915_wait_util.h"
14+
#include "intel_context.h"
1415
#include "intel_engine_regs.h"
1516
#include "intel_gpu_commands.h"
16-
#include "intel_context.h"
1717
#include "intel_gt.h"
1818
#include "intel_ring.h"
1919

drivers/gpu/drm/i915/gt/uc/intel_gsc_proxy.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010

1111
#include "gt/intel_gt.h"
1212
#include "gt/intel_gt_print.h"
13+
14+
#include "i915_drv.h"
15+
#include "i915_reg.h"
16+
#include "i915_wait_util.h"
1317
#include "intel_gsc_proxy.h"
1418
#include "intel_gsc_uc.h"
1519
#include "intel_gsc_uc_heci_cmd_submit.h"
16-
#include "i915_drv.h"
17-
#include "i915_reg.h"
1820

1921
/*
2022
* GSC proxy:

drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include "gt/intel_gpu_commands.h"
99
#include "gt/intel_gt.h"
1010
#include "gt/intel_ring.h"
11+
12+
#include "i915_wait_util.h"
1113
#include "intel_gsc_uc_heci_cmd_submit.h"
1214

1315
struct gsc_heci_pkt {

drivers/gpu/drm/i915/gt/uc/intel_guc.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@
88
#include "gt/intel_gt_irq.h"
99
#include "gt/intel_gt_pm_irq.h"
1010
#include "gt/intel_gt_regs.h"
11+
12+
#include "i915_drv.h"
13+
#include "i915_irq.h"
14+
#include "i915_reg.h"
15+
#include "i915_wait_util.h"
1116
#include "intel_guc.h"
1217
#include "intel_guc_ads.h"
1318
#include "intel_guc_capture.h"
1419
#include "intel_guc_print.h"
1520
#include "intel_guc_slpc.h"
1621
#include "intel_guc_submission.h"
17-
#include "i915_drv.h"
18-
#include "i915_irq.h"
19-
#include "i915_reg.h"
2022

2123
/**
2224
* DOC: GuC

drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55

66
#include <linux/circ_buf.h>
77
#include <linux/ktime.h>
8-
#include <linux/time64.h>
98
#include <linux/string_helpers.h>
9+
#include <linux/time64.h>
1010
#include <linux/timekeeping.h>
1111

1212
#include "i915_drv.h"
13+
#include "i915_wait_util.h"
1314
#include "intel_guc_ct.h"
1415
#include "intel_guc_print.h"
1516

0 commit comments

Comments
 (0)