xref: /OK3568_Linux_fs/kernel/Documentation/ABI/testing/sysfs-device-mali (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun/*
2*4882a593Smuzhiyun *
3*4882a593Smuzhiyun * (C) COPYRIGHT 2020 ARM Limited. All rights reserved.
4*4882a593Smuzhiyun *
5*4882a593Smuzhiyun * This program is free software and is provided to you under the terms of the
6*4882a593Smuzhiyun * GNU General Public License version 2 as published by the Free Software
7*4882a593Smuzhiyun * Foundation) and any use by you of this program is subject to the terms
8*4882a593Smuzhiyun * of such GNU licence.
9*4882a593Smuzhiyun *
10*4882a593Smuzhiyun * A copy of the licence is included with the program) and can also be obtained
11*4882a593Smuzhiyun * from Free Software Foundation) Inc.) 51 Franklin Street) Fifth Floor)
12*4882a593Smuzhiyun * Boston) MA  02110-1301) USA.
13*4882a593Smuzhiyun *
14*4882a593Smuzhiyun */
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/core_mask
17*4882a593SmuzhiyunDescription:
18*4882a593Smuzhiyun		This attribute is used to restrict the number of shader cores
19*4882a593Smuzhiyun		available in this instance, is useful for debugging purposes.
20*4882a593Smuzhiyun		Reading this attribute provides us mask of all cores available.
21*4882a593Smuzhiyun		Writing to it will set the current core mask. Doesn't
22*4882a593Smuzhiyun		allow disabling all the cores present in this instance.
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/debug_command
25*4882a593SmuzhiyunDescription:
26*4882a593Smuzhiyun		This attribute is used to issue debug commands that supported
27*4882a593Smuzhiyun		by the driver. On reading it provides the list of debug commands
28*4882a593Smuzhiyun		that are supported, and writing back one of those commands will
29*4882a593Smuzhiyun		enable that debug option.
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/dvfs_period
32*4882a593SmuzhiyunDescription:
33*4882a593Smuzhiyun		This is used to set the DVFS sampling period to be used by the
34*4882a593Smuzhiyun		driver, On reading it provides the current DVFS sampling period,
35*4882a593Smuzhiyun		on writing a value we set the DVFS sampling period.
36*4882a593Smuzhiyun
37*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/dummy_job_wa_info
38*4882a593SmuzhiyunDescription:
39*4882a593Smuzhiyun		This attribute is available only with platform device that
40*4882a593Smuzhiyun                supports a Job Manager based GPU that requires a GPU workaround
41*4882a593Smuzhiyun		to execute the dummy fragment job on all shader cores to
42*4882a593Smuzhiyun		workaround a hang issue.
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun		Its a readonly attribute and on reading gives details on the
45*4882a593Smuzhiyun		options used with the dummy workaround.
46*4882a593Smuzhiyun
47*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/fw_timeout
48*4882a593SmuzhiyunDescription:
49*4882a593Smuzhiyun		This attribute is available only with mali platform
50*4882a593Smuzhiyun		device-driver that supports a CSF GPU. This attribute is
51*4882a593Smuzhiyun		used to set the duration value in milliseconds for the
52*4882a593Smuzhiyun		waiting timeout used for a GPU status change request being
53*4882a593Smuzhiyun		acknowledged by the FW.
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/gpuinfo
56*4882a593SmuzhiyunDescription:
57*4882a593Smuzhiyun		This attribute provides description of the present Mali GPU.
58*4882a593Smuzhiyun		Its a read only attribute provides details like GPU family, the
59*4882a593Smuzhiyun		number of cores, the hardware version and the raw product id.
60*4882a593Smuzhiyun
61*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/idle_hysteresis_time
62*4882a593SmuzhiyunDescription:
63*4882a593Smuzhiyun		This attribute is available only with mali platform
64*4882a593Smuzhiyun		device-driver that supports a CSF GPU. This attribute is
65*4882a593Smuzhiyun		used to configure the timeout value in microseconds for the
66*4882a593Smuzhiyun		GPU idle handling. If GPU has been idle for this timeout
67*4882a593Smuzhiyun		period, then it is put to sleep for GPUs where sleep feature
68*4882a593Smuzhiyun		is supported or is powered down after suspending command
69*4882a593Smuzhiyun		stream groups.
70*4882a593Smuzhiyun
71*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/js_ctx_scheduling_mode
72*4882a593SmuzhiyunDescription:
73*4882a593Smuzhiyun		This attribute is available only with platform device that
74*4882a593Smuzhiyun		supports a Job Manager based GPU. This attribute is used to set
75*4882a593Smuzhiyun		context scheduling priority for a job slot.
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun		On Reading it provides the currently set job slot context
78*4882a593Smuzhiyun		priority.
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun		Writing 0 to this attribute sets it to the mode were
81*4882a593Smuzhiyun		higher priority atoms will be scheduled first, regardless of
82*4882a593Smuzhiyun		the context they belong to. Newly-runnable higher priority atoms
83*4882a593Smuzhiyun		can preempt lower priority atoms currently running on the GPU,
84*4882a593Smuzhiyun		even if they belong to a different context.
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun		Writing 1 to this attribute set it to the mode were the
87*4882a593Smuzhiyun		highest-priority atom will be chosen from each context in turn
88*4882a593Smuzhiyun		using a round-robin algorithm, so priority only has an effect
89*4882a593Smuzhiyun		within the context an atom belongs to. Newly-runnable higher
90*4882a593Smuzhiyun		priority atoms can preempt the lower priority atoms currently
91*4882a593Smuzhiyun		running on the GPU, but only if they belong to the same context.
92*4882a593Smuzhiyun
93*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/js_scheduling_period
94*4882a593SmuzhiyunDescription:
95*4882a593Smuzhiyun		This attribute is available only with platform device that
96*4882a593Smuzhiyun                supports a Job Manager based GPU. Used to set the job scheduler
97*4882a593Smuzhiyun		tick period in nano-seconds. The Job Scheduler determines the
98*4882a593Smuzhiyun		jobs that are run on the GPU, and for how long, Job Scheduler
99*4882a593Smuzhiyun		makes decisions at a regular time interval determined by value
100*4882a593Smuzhiyun		in js_scheduling_period.
101*4882a593Smuzhiyun
102*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/js_softstop_always
103*4882a593SmuzhiyunDescription:
104*4882a593Smuzhiyun		This attribute is available only with platform device that
105*4882a593Smuzhiyun                supports a Job Manager based GPU. Soft-stops are disabled when
106*4882a593Smuzhiyun		only a single context is present, this attribute is used to
107*4882a593Smuzhiyun		enable soft-stop when only a single context is present can be
108*4882a593Smuzhiyun		used for debug and unit-testing purposes.
109*4882a593Smuzhiyun
110*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/js_timeouts
111*4882a593SmuzhiyunDescription:
112*4882a593Smuzhiyun		This attribute is available only with platform device that
113*4882a593Smuzhiyun                supports a Job Manager based GPU. It used to set the soft stop
114*4882a593Smuzhiyun		and hard stop times for the job scheduler.
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun		Writing value 0 causes no change, or -1 to restore the
117*4882a593Smuzhiyun		default timeout.
118*4882a593Smuzhiyun
119*4882a593Smuzhiyun		The format used to set js_timeouts is
120*4882a593Smuzhiyun		"<soft_stop_ms> <soft_stop_ms_cl> <hard_stop_ms_ss>
121*4882a593Smuzhiyun		<hard_stop_ms_cl> <hard_stop_ms_dumping> <reset_ms_ss>
122*4882a593Smuzhiyun		<reset_ms_cl> <reset_ms_dumping>"
123*4882a593Smuzhiyun
124*4882a593Smuzhiyun
125*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/lp_mem_pool_max_size
126*4882a593SmuzhiyunDescription:
127*4882a593Smuzhiyun		This attribute is used to set the maximum number of large pages
128*4882a593Smuzhiyun		memory pools that the driver can contain. Large pages are of
129*4882a593Smuzhiyun		size 2MB. On read it displays all the max size of all memory
130*4882a593Smuzhiyun		pools and can be used to modify each individual pools as well.
131*4882a593Smuzhiyun
132*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/lp_mem_pool_size
133*4882a593SmuzhiyunDescription:
134*4882a593Smuzhiyun		This attribute is used to set the number of large memory pages
135*4882a593Smuzhiyun		which should be	populated, changing this value may cause
136*4882a593Smuzhiyun		existing pages to be removed from the pool, or new pages to be
137*4882a593Smuzhiyun		created and then added to the pool. On read it will provide
138*4882a593Smuzhiyun		pool size for all available pools and we can modify individual
139*4882a593Smuzhiyun		pool.
140*4882a593Smuzhiyun
141*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/mem_pool_max_size
142*4882a593SmuzhiyunDescription:
143*4882a593Smuzhiyun		This attribute is used to set the maximum number of small pages
144*4882a593Smuzhiyun		for memory pools that the driver can contain. Here small pages
145*4882a593Smuzhiyun		are of size 4KB. On read it will display the max size for all
146*4882a593Smuzhiyun		available pools and allows us to set max size of
147*4882a593Smuzhiyun		individual pools.
148*4882a593Smuzhiyun
149*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/mem_pool_size
150*4882a593SmuzhiyunDescription:
151*4882a593Smuzhiyun		This attribute is used to set the number of small memory pages
152*4882a593Smuzhiyun		which should be populated, changing this value may cause
153*4882a593Smuzhiyun		existing pages to be removed from the pool, or new pages to
154*4882a593Smuzhiyun		be created and then added to the pool. On read it will provide
155*4882a593Smuzhiyun		pool size for all available pools and we can modify individual
156*4882a593Smuzhiyun		pool.
157*4882a593Smuzhiyun
158*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/device/mempool/ctx_default_max_size
159*4882a593SmuzhiyunDescription:
160*4882a593Smuzhiyun		This attribute is used to set maximum memory pool size for
161*4882a593Smuzhiyun		all the memory pool so that the maximum amount of free memory
162*4882a593Smuzhiyun		that each pool can hold is identical.
163*4882a593Smuzhiyun
164*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/device/mempool/lp_max_size
165*4882a593SmuzhiyunDescription:
166*4882a593Smuzhiyun		This attribute is used to set the maximum number of large pages
167*4882a593Smuzhiyun		for all memory pools that the driver can contain.
168*4882a593Smuzhiyun		Large pages are of size 2MB.
169*4882a593Smuzhiyun
170*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/device/mempool/max_size
171*4882a593SmuzhiyunDescription:
172*4882a593Smuzhiyun		This attribute is used to set the maximum number of small pages
173*4882a593Smuzhiyun		for all the memory pools that the driver can contain.
174*4882a593Smuzhiyun		Here small pages are of size 4KB.
175*4882a593Smuzhiyun
176*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/pm_poweroff
177*4882a593SmuzhiyunDescription:
178*4882a593Smuzhiyun		This attribute contains the current values, represented as the
179*4882a593Smuzhiyun		following space-separated integers:
180*4882a593Smuzhiyun		• PM_GPU_POWEROFF_TICK_NS.
181*4882a593Smuzhiyun		• PM_POWEROFF_TICK_SHADER.
182*4882a593Smuzhiyun		• PM_POWEROFF_TICK_GPU.
183*4882a593Smuzhiyun
184*4882a593Smuzhiyun		Example:
185*4882a593Smuzhiyun		echo 100000 4 4 > /sys/class/misc/mali0/device/pm_poweroff
186*4882a593Smuzhiyun
187*4882a593Smuzhiyun		Sets the following new values: 100,000ns tick, four ticks
188*4882a593Smuzhiyun		for shader power down, and four ticks for GPU power down.
189*4882a593Smuzhiyun
190*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/power_policy
191*4882a593SmuzhiyunDescription:
192*4882a593Smuzhiyun		This attribute is used to find the current power policy been
193*4882a593Smuzhiyun		used, reading will list the power policies available and
194*4882a593Smuzhiyun		enclosed in square bracket is the current one been selected.
195*4882a593Smuzhiyun
196*4882a593Smuzhiyun		Example:
197*4882a593Smuzhiyun		cat /sys/class/misc/mali0/device/power_policy
198*4882a593Smuzhiyun		[demand] coarse_demand always_on
199*4882a593Smuzhiyun
200*4882a593Smuzhiyun		To switch to a different policy at runtime write the valid entry
201*4882a593Smuzhiyun		name back to the attribute.
202*4882a593Smuzhiyun
203*4882a593Smuzhiyun		Example:
204*4882a593Smuzhiyun		echo "coarse_demand" > /sys/class/misc/mali0/device/power_policy
205*4882a593Smuzhiyun
206*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/progress_timeout
207*4882a593SmuzhiyunDescription:
208*4882a593Smuzhiyun		This attribute is available only with mali platform
209*4882a593Smuzhiyun		device-driver that supports a CSF GPU. This attribute
210*4882a593Smuzhiyun		is used to set the progress timeout value and read the current
211*4882a593Smuzhiyun		progress timeout value.
212*4882a593Smuzhiyun
213*4882a593Smuzhiyun		Progress timeout value is the maximum number of GPU cycles
214*4882a593Smuzhiyun		without forward progress to allow to elapse before terminating a
215*4882a593Smuzhiyun		GPU command queue group.
216*4882a593Smuzhiyun
217*4882a593SmuzhiyunWhat:           /sys/class/misc/mali%u/device/mcu_shader_pwroff_timeout
218*4882a593SmuzhiyunDescription:
219*4882a593Smuzhiyun		This attribute is available only with mali platform
220*4882a593Smuzhiyun		device-driver that supports a CSF GPU. The duration value unit
221*4882a593Smuzhiyun		is in micro-seconds and is used for configuring MCU shader Core power-off
222*4882a593Smuzhiyun		timer. The configured MCU shader Core power-off timer will only have
223*4882a593Smuzhiyun		effect when the host driver has delegated the shader cores
224*4882a593Smuzhiyun		power management to MCU. The supplied value will be
225*4882a593Smuzhiyun		recorded internally without any change. But the actual field
226*4882a593Smuzhiyun		value will be subject to core power-off timer source frequency
227*4882a593Smuzhiyun		scaling and maximum value limiting. The default source will be
228*4882a593Smuzhiyun		SYSTEM_TIMESTAMP counter. But in case the platform is not able
229*4882a593Smuzhiyun		to supply it, the GPU CYCLE_COUNTER source will be used as an
230*4882a593Smuzhiyun		alternative.
231*4882a593Smuzhiyun
232*4882a593Smuzhiyun		If we set the value to zero then MCU-controlled shader/tiler
233*4882a593Smuzhiyun		power management will be disabled.
234*4882a593Smuzhiyun
235*4882a593Smuzhiyun
236*4882a593SmuzhiyunWhat:           /sys/class/misc/mali%u/device/csg_scheduling_period
237*4882a593SmuzhiyunDescription:
238*4882a593Smuzhiyun		This attribute is available only with mali platform
239*4882a593Smuzhiyun		device-driver that supports a CSF GPU. The duration value unit
240*4882a593Smuzhiyun		is in milliseconds and is used for configuring csf scheduling
241*4882a593Smuzhiyun		tick duration.
242*4882a593Smuzhiyun
243*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/reset_timeout
244*4882a593SmuzhiyunDescription:
245*4882a593Smuzhiyun		This attribute is used to set the number of milliseconds to
246*4882a593Smuzhiyun		wait for the soft stop to complete for the GPU jobs before
247*4882a593Smuzhiyun		proceeding with the GPU reset.
248*4882a593Smuzhiyun
249*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/soft_job_timeout
250*4882a593SmuzhiyunDescription:
251*4882a593Smuzhiyun		This attribute is available only with platform device that
252*4882a593Smuzhiyun                supports a Job Manager based GPU. It used to set the timeout
253*4882a593Smuzhiyun		value for waiting for any soft event to complete.
254*4882a593Smuzhiyun
255*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/scheduling/serialize_jobs
256*4882a593SmuzhiyunDescription:
257*4882a593Smuzhiyun		This attribute is available only with platform device that
258*4882a593Smuzhiyun                supports a Job Manager based GPU.
259*4882a593Smuzhiyun
260*4882a593Smuzhiyun		Various options available under this are:
261*4882a593Smuzhiyun		• none - for disabling serialization.
262*4882a593Smuzhiyun		• intra-slot - Serialize atoms within a slot, only one
263*4882a593Smuzhiyun				atom per job slot.
264*4882a593Smuzhiyun		• inter-slot - Serialize atoms between slots, only one
265*4882a593Smuzhiyun				job slot running at any time.
266*4882a593Smuzhiyun		• full - it a combination of both inter and intra slot,
267*4882a593Smuzhiyun				so only one atom and one job slot running
268*4882a593Smuzhiyun				at any time.
269*4882a593Smuzhiyun		• full-reset - full serialization and Reset the GPU after
270*4882a593Smuzhiyun				each atom completion
271*4882a593Smuzhiyun
272*4882a593Smuzhiyun		These options are useful for debugging and investigating
273*4882a593Smuzhiyun		failures and gpu hangs to narrow down atoms that could cause
274*4882a593Smuzhiyun		troubles.
275*4882a593Smuzhiyun
276*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/firmware_config/Compute iterator count/*
277*4882a593SmuzhiyunDescription:
278*4882a593Smuzhiyun		This attribute is available only with mali platform
279*4882a593Smuzhiyun		device-driver that supports a CSF GPU. Its a read-only attribute
280*4882a593Smuzhiyun		which indicates the maximum number of Compute iterators
281*4882a593Smuzhiyun		supported by the GPU.
282*4882a593Smuzhiyun
283*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/firmware_config/CSHWIF count/*
284*4882a593SmuzhiyunDescription:
285*4882a593Smuzhiyun		This attribute is available only with mali platform
286*4882a593Smuzhiyun		device-driver that supports a CSF GPU. Its a read-only
287*4882a593Smuzhiyun		attribute which indicates the maximum number of	CSHWIFs
288*4882a593Smuzhiyun		supported by the GPU.
289*4882a593Smuzhiyun
290*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/firmware_config/Fragment iterator count/*
291*4882a593SmuzhiyunDescription:
292*4882a593Smuzhiyun		This attribute is available only with mali platform
293*4882a593Smuzhiyun		device-driver that supports a CSF GPU. Its a read-only
294*4882a593Smuzhiyun		attribute which indicates the maximum number of
295*4882a593Smuzhiyun		Fragment iterators supported by the GPU.
296*4882a593Smuzhiyun
297*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/firmware_config/Scoreboard set count/*
298*4882a593SmuzhiyunDescription:
299*4882a593Smuzhiyun		This attribute is available only with mali platform
300*4882a593Smuzhiyun		device-driver that supports a CSF GPU. Its a read-only
301*4882a593Smuzhiyun		attribute which indicates the maximum number of
302*4882a593Smuzhiyun		Scoreboard set supported by the GPU.
303*4882a593Smuzhiyun
304*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/firmware_config/Tiler iterator count/*
305*4882a593SmuzhiyunDescription:
306*4882a593Smuzhiyun		This attribute is available only with mali platform
307*4882a593Smuzhiyun		device-driver that supports a CSF GPU. Its a read-only
308*4882a593Smuzhiyun		attribute which indicates the maximum number of	Tiler iterators
309*4882a593Smuzhiyun		supported by the GPU.
310*4882a593Smuzhiyun
311*4882a593SmuzhiyunWhat:		/sys/class/misc/mali%u/device/firmware_config/Log verbosity/*
312*4882a593SmuzhiyunDescription:
313*4882a593Smuzhiyun		This attribute is available only with mali platform
314*4882a593Smuzhiyun                device-driver that supports a CSF GPU.
315*4882a593Smuzhiyun
316*4882a593Smuzhiyun		Used to enable firmware logs, logging levels valid values
317*4882a593Smuzhiyun		are indicated using 'min and 'max' attribute values
318*4882a593Smuzhiyun		values that are read-only.
319*4882a593Smuzhiyun
320*4882a593Smuzhiyun		Log level can be set using the 'cur' read, write attribute,
321*4882a593Smuzhiyun		we can use a valid log level value from min and max range values
322*4882a593Smuzhiyun		and set a valid desired log level for firmware logs.
323