ci: Add Intel GPU frequency utility
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Tue, 29 Mar 2022 12:55:38 +0000 (15:55 +0300)
committerMarge Bot <emma+marge@anholt.net>
Wed, 6 Apr 2022 13:11:05 +0000 (13:11 +0000)
commit5d5af8bffbb76e2e88ad4b8e20d74ff5d591eab7
treee055622cbccdffe428d78eb9e32b8822cd4c6cc5
parent88f77aa811befffd931571216bb4d6978a1fb155
ci: Add Intel GPU frequency utility

Add script to manage Intel GPU frequencies.

It can be used for debugging performance problems or to lock a stable
frequency while executing benchmark tests.

Typical use cases:

- Get all available GPU frequency information
$ ./intel-gpu-freq.sh -g all

* Hardware capabilities
   RP0: 1350 MHz
   RPn:  100 MHz
   RP1:  400 MHz

* Enforcements
   max: 1350 MHz
   min:  100 MHz
 boost: 1350 MHz

* Actual
   act:  100 MHz
   cur:  400 MHz

- Lock frequency to 80% of the maximum allowed by hardware and enable
  throttling detection
$ ./intel-gpu-freq.sh -s 80% -d

GPU throttling detected: act=1050 min=1350 cur=1350 RPn=100
GPU throttling detected: act=1100 min=1350 cur=1350 RPn=100

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15662>
.gitlab-ci/common/intel-gpu-freq.sh [new file with mode: 0755]