Skip to content

Commit 59b7ed0

Browse files
committed
drm/xe/configfs: Improve doc for ctx_restore* attributes
Spell out the syntax instead of only using examples. Particularly important the <engine-class> part since that's different than engines_allowed and may confuse users. The same batch buffer is used for all engines of a certain class. Cc: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Fixes: e2a9854 ("drm/xe/configfs: Allow to select by class only") Link: https://lore.kernel.org/r/20250924152709.659483-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> (cherry picked from commit 47ca7acff4011fa322853a3612f464b959e88210) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent 7646423 commit 59b7ed0

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

drivers/gpu/drm/xe/xe_configfs.c

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,20 @@
126126
* not intended for normal execution and will taint the kernel with TAINT_TEST
127127
* when used.
128128
*
129-
* Currently this is implemented only for post and mid context restore.
130-
* Examples:
129+
* The syntax allows to pass straight instructions to be executed by the engine
130+
* in a batch buffer or set specific registers.
131+
*
132+
* #. Generic instruction::
133+
*
134+
* <engine-class> cmd <instr> [[dword0] [dword1] [...]]
135+
*
136+
* #. Simple register setting::
137+
*
138+
* <engine-class> reg <address> <value>
139+
*
140+
* Commands are saved per engine class: all instances of that class will execute
141+
* those commands during context switch. The instruction, dword arguments,
142+
* addresses and values are in hex format like in the examples below.
131143
*
132144
* #. Execute a LRI command to write 0xDEADBEEF to register 0x4f10 after the
133145
* normal context restore::
@@ -154,7 +166,8 @@
154166
* When using multiple lines, make sure to use a command that is
155167
* implemented with a single write syscall, like HEREDOC.
156168
*
157-
* These attributes can only be set before binding to the device.
169+
* Currently this is implemented only for post and mid context restore and
170+
* these attributes can only be set before binding to the device.
158171
*
159172
* Remove devices
160173
* ==============

0 commit comments

Comments
 (0)