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