xref: /linux/drivers/gpu/drm/xe/Kconfig.profile (revision 570f7e331f5febb30f1384817463c7e42b65ca7d)
1# SPDX-License-Identifier: GPL-2.0-only
2config DRM_XE_JOB_TIMEOUT_MAX
3	int "Hard upper limit for job timeout (ms)"
4	default 10000 # milliseconds
5	help
6	  Absolute upper bound (in milliseconds) for the per-engine-class job
7	  timeout. This is the maximum value that can be written to the sysfs
8	  job_timeout_ms knob, regardless of privileges. To raise this ceiling,
9	  increase this value and rebuild the kernel.
10config DRM_XE_JOB_TIMEOUT_MIN
11	int "Hard lower limit for job timeout (ms)"
12	default 1 # milliseconds
13	help
14	  Absolute lower bound (in milliseconds) for the per-engine-class job
15	  timeout. This is the minimum value that can be written to the sysfs
16	  job_timeout_ms knob, regardless of privileges.
17
18	  Note: the job timeout default (5000 ms) is hardcoded in the driver
19	  and is not configurable here. Use the sysfs job_timeout_ms knob at
20	  runtime to change the engine-class default.
21config DRM_XE_TIMESLICE_MAX
22	int "Hard upper limit for timeslice duration (us)"
23	default 10000000 # microseconds
24	help
25	  Absolute upper bound (in microseconds) for the timeslice duration.
26	  This caps both the sysfs timeslice_duration_us knob and the value
27	  accepted via the DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE UAPI for
28	  processes with CAP_SYS_NICE when DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
29	  is enabled.
30config DRM_XE_TIMESLICE_MIN
31	int "Hard lower limit for timeslice duration (us)"
32	default 1 # microseconds
33	help
34	  Absolute lower bound (in microseconds) for the timeslice duration.
35	  This caps both the sysfs timeslice_duration_us knob and the value
36	  accepted via the DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE UAPI for
37	  processes with CAP_SYS_NICE when DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
38	  is enabled.
39config DRM_XE_PREEMPT_TIMEOUT
40	int "Default preempt timeout (us, jiffy granularity)"
41	default 640000 # microseconds
42	help
43	  Initial per-engine-class preemption timeout (in microseconds). This
44	  is the value the driver programs at boot; it can be changed at
45	  runtime via the sysfs preempt_timeout_us knob.
46
47	  This is how long the driver waits for the current context to reach
48	  an arbitration point and yield the GPU voluntarily when a
49	  higher-priority context becomes runnable. If the context does not
50	  yield before the timer expires, the HW is reset to allow the
51	  higher-priority context to execute.
52
53	  The range userspace may write via sysfs is bounded by
54	  DRM_XE_PREEMPT_TIMEOUT_MIN and DRM_XE_PREEMPT_TIMEOUT_MAX.
55config DRM_XE_PREEMPT_TIMEOUT_MAX
56	int "Hard upper limit for preempt timeout (us)"
57	default 10000000 # microseconds
58	help
59	  Absolute upper bound (in microseconds) for the per-engine-class
60	  preemption timeout. This is the maximum value that can be written to
61	  the sysfs preempt_timeout_us knob, regardless of privileges.
62config DRM_XE_PREEMPT_TIMEOUT_MIN
63	int "Hard lower limit for preempt timeout (us)"
64	default 1 # microseconds
65	help
66	  Absolute lower bound (in microseconds) for the per-engine-class
67	  preemption timeout. This is the minimum value that can be written to
68	  the sysfs preempt_timeout_us knob, regardless of privileges.
69config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
70	bool "Default configuration of limitation on scheduler timeout"
71	default y
72	help
73	  Configures the enablement of limitation on scheduler timeout
74	  to apply to applicable user. For elevated user, all above MIN
75	  and MAX values will apply when this configuration is enable to
76	  apply limitation. By default limitation is applied.
77