summaryrefslogtreecommitdiff
path: root/mali_kbase/platform/pixel/pixel_gpu_sysfs.c
AgeCommit message (Collapse)Author
2024-02-07Remove IFPO from KMDVamsidhar reddy Gaddam
IFPO feature has been unusued and only creates overhead for smooth driver updates. Bug: 324019470 Change-Id: Iab65e95b9ba21d74cc158557e3fa78d4478c9a71 Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
2023-09-19mali_kbase: Add tracepoints to hint_min_freq / hint_max_freqVarad Gautam
Bug: 291855615 Test: Record manual trace. Signed-off-by: Varad Gautam <varadgautam@google.com> Change-Id: Id4341c3809b2e3b147122adaabaa01ac7b265dfc
2022-03-31mali_kbase: HOST_CONTROLS_SC_RAILS with no pwr offKevin DuBois
Sets the IFPO flag to on, but disables any actual turning off of the rails for now. This changes submission path of userspace threads, without turning rails off while some firmware/shader dependencies are identified for stability. IFPO with shaders power actually turning on or off may be activated by echo 1 > ${module_sysfs_dir}/ifpo Bug: 226918775 Test: turn feature on and off repeatedly in loop. Test: SST local run Change-Id: Iabeae659ee9ef1f6a88b76df30dcbb0a16be06c6
2022-03-23mali_kbase: platform: Add sysfs trigger for SSCDJack Diver
Add a sysfs node, which triggers an SSCD when written to. Bug: 156051622 Test: Write to node and observe core dump Signed-off-by: Jack Diver <diverj@google.com> Change-Id: I38e6a8a38cf1b828740821d6f667868ef062a07d
2021-06-15mali_kbase: platform: power: Correctly track GPU stateSidath Senanayake
Ensure that the GPU top level power domain does not power down when we only go idle so that GPU state is not lost. This allows us to save cycles when there is new GPU work by not requiring the core Mali KMD to regenerate state. In order to do this, we track both GPU power domains and take a reference to the GPU top level power domain when the SOC is not suspended. Bug: 191136938 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I015b3f3f2747a0b6c2f51609d07f0e475bfcac84
2021-05-13mali_kbase: platform: dvfs: Add level lock for PowerHALSidath Senanayake
Adds a new level lock class intended for use by PowerHAL called `GPU_DVFS_LEVEL_LOCK_HINT`. Bug: 188034128 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I7eccdf1a838aad1e27e632043f8fe44b0411f897
2021-05-13mali_kbase: platform: dvfs: Neaten clock_info displaySidath Senanayake
Bug: 188034128 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I9668dba559865197475336b105621fe231079b78
2021-04-29mali_kbase: platform: dvfs: Clean up metricsSidath Senanayake
All changes to clock and power state are now reported to the metrics logic via a single function: gpu_dvfs_metrics_update(). This function tracks clock and power stats as well as issuing tracepoints for frequency changes. Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I94d789eca3cc626fdbbbd4eb2c9dbeac7fe489e1
2021-04-29mali_kbase: platform: dvfs: Clean up clock codeSidath Senanayake
This moves to using arrays for the clocks and voltages used by the GPU. This simplifies the code by factoring out common logic into loops (which the compiler will likely unroll), and allows for adding functionality per clock in a less cumbersome way. Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I4a84a8417eeaa13f1dfafed39da17491c201d198
2021-03-22mali_kbase: platform: dvfs: Add devicetree lockSidath Senanayake
Adds support for a DVFS level lock set in the GPU's devicetree entry, and gives it the lowest priority among the level locks. Bug: 179365671 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I3b8a256d7d4828d48bcb58675e237247f7e490d2
2021-03-17mali_kbase: platform: dvfs: Increase thermal lock prioritySidath Senanayake
Bug: 182988076 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I8e9d16e1c33a50e588bb743b22e5a4dcbc8b28c6
2021-03-17mali_kbase: platform: dvfs: Fix bug with level locksSidath Senanayake
If an update to level lock resulted in a change in both max and min levels for that lock, it was possible that identifying that no effective lock was set would fail. This also fixes a bug in the clock_info sysfs node which would incorrectly assume a lock was set. Bug: 179365671 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ia1dbb3fa9c04fee6bb95d9844ad99ad2c46b4b99
2021-03-13mali_kbase: platform: Replace GPU_LOG with dev_* callsSidath Senanayake
Bug: 182459681 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: If9a03fe0685e30f757f826bbecdffb6840d95e28
2021-03-13mali_kbase: platform: dvfs: Implement extensible level locksSidath Senanayake
Implements a more extensible level locking mechanism that allows for priority-based determination of what levels DVFS governors can scale across. Also updated layout of the `clock_info` sysfs node to display this information. Bug: 179365671 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ia909ad6883110a632f16e7646bf8b9843dd0c292
2021-03-11mali_kbase: dvfs: add min gpu level for compute.Kevin DuBois
Adds a DTBO entry that can be used to set the minimum dvfs OPP when compute contexts are detected running. This effectively uses compute as a proxy signal that there are realtime workloads present Bug: 178234323 Test: tflite does up gpu frequency. Test: UI does not up gpu frequency. Change-Id: Iea8e03e242cee9451ef8500df060b53607789f2b
2021-03-09mali_kbase: platform: dvfs: Fix build warningSidath Senanayake
Bug: 182211881 Change-Id: I6fe103c6512a46e7d63460a6950eb3cb810e67c8
2021-03-09mali_kbase: platform: dvfs: Track freq transition statsSidath Senanayake
Track GPU frequency transition statistics and add a sysfs node that prints the data in the same format as devfreq. Bug: 182211881 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I35401a799b2fc678013072d718770a8f60a9c4bb
2021-02-09mali_kbase: reduce sysfs clock change latencyKevin DuBois
Reduce DVFS change latency when a write to sysfs occurs by calling the DVFS evaluation function from the sysfs store function. Test: boot, verify timings in systrace Fixes: 179270859 Change-Id: I3b82103736b3ac9d672182fd74fe7a3fe351fd5a
2021-01-18mali_kbase: platform: dvfs: Treat G3D clock as main freqSidath Senanayake
Treat the G3D (i.e. shader stack clock) as the primary clock for the GPU. This is mainly due to the fact that the G3D clock is the primary indicator of performance/power for a given operating point in the DVFS table. See the bug for more rationale. This also means that the G3D is the key value in the DVFS table. Bug: 177418377 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I0ff2b0972afff140e40a80ef6fc24394ad4f7ff4
2020-12-23mali_kbase: platform: Print out per-UID time in state statistics on sysfsSidath Senanayake
Bug: 171975331 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I03c4053a296af84467930b8bafec7977a9c04f98
2020-12-14mali_kbase: platform: Expose GPU Utilization metricsDevika Krishnadas
GPU DVFS takes into account GPU Utilization (in percentage) for each dvfs period to decide the next GPU operating point. Bug: 174533058 Test: adb shell "cat /sys/devices/platform/1c500000.mali/utilization" Change-Id: I6c934af49906dd2c46aba4d1b725003056c4e0cc Signed-off-by: Devika Krishnadas <kdevika@google.com>
2020-10-27mali_kbase: platform: Fix Pixel integration warningsSidath Senanayake
Bug: 170311684 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ic1db21c66320aee009b52c37a2ac13cac1789f23
2020-09-18mali_kbase: platform: Show current thermal level limit in sysfsAnkit Goyal
Bug: 163806374 Change-Id: Icc4d9a5e4a3449d0ca704902e8cc21479d34f15d Signed-off-by: Ankit Goyal <layog@google.com>
2020-09-15Merge "mali_kbase: platform: Make Pixel integration debug verbosity ↵TreeHugger Robot
configurable" into android-gs-pixel-5.4
2020-09-15mali_kbase: platform: Make Pixel integration debug verbosity configurableDevika Krishnadas
Currently the Pixel integration of the Mali GPU KMD hardcodes the verbosity of its output. This is updated to allow being set from sysfs. Bug: 163528916 Change-Id: I92a3df308b5da3d0165af13f840995924e5ead49 Signed-off-by: Devika Krishnadas <kdevika@google.com>
2020-09-10mali_kbase: platform: tmu: Support new GPU cooling interfaceSidath Senanayake
Updates the Pixel platform integration to work with the new GPU cooling interface in GS101. This change moves the initialization of the cooling device creation from the GPU cooling driver's init function to the GPU HW probe. Bug: 168212690 Bug: 156057140 Change-Id: Ic1dcaddf4fe13af56991c10a0473726972adfc52 Signed-off-by: Sidath Senanayake <sidaths@google.com>
2020-09-02mali_kbase: platform: Add GPU TMU event supportSidath Senanayake
Adds support for providing frequency and voltage data to GPU cooling as well as handling thermal throttling events. Bug: 156057140 Bug: 158091247 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: If4a1eb2170072a24d86eea0e31731db9c4cfe72d
2020-09-02mali_kbase: platform: Add QOS supportSidath Senanayake
This change allows the GPU DVFS table to specify clock restrictions for INT, MIF and the CPU clusters to ensure consistent performance. These restrictions are set via Linux's PM QOS framework and rely on devfreq and cpufreq support. It also adds support for bus traffic shaping scenarios. Configuration for these features is read from the GPU's device tree node. Bug: 156057140 Bug: 158091247 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I13a92c147aa0b22df2dc1207ccffda7eacd1c8d0
2020-09-02mali_kbase: platform: Add GPU DVFS support and metricsSidath Senanayake
Adds support for clocking the GPU clocks according to a DVFS table specified in the GPU's device tree entry using a simple governor. Support also added for tracking GPU power status along with time in state for each DVFS OPP. Bug: 156057140 Bug: 158091247 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I0b83336c24f0b724a26f4de6b97cf15d9687377b