diff options
| author | Tvrtko Ursulin <tvrtko.ursulin@igalia.com> | 2026-06-26 09:55:57 +0100 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-07-01 11:56:40 -0400 |
| commit | 875a785373327f4c11aaec20e3c765e26f68604e (patch) | |
| tree | af37c6af5e8e8043248fafdf2dedd03f6f6bf402 /drivers/devfreq | |
| parent | 951d2a891e7681adc4b52890158c4cf99d8c0f0a (diff) | |
| download | linux-next-875a785373327f4c11aaec20e3c765e26f68604e.tar.gz linux-next-875a785373327f4c11aaec20e3c765e26f68604e.zip | |
drm/amdgpu: Save some cycles on the job submission path
Every job submission on the Steam Deck ends up walking the list of IP
blocks looking for AMD_IP_BLOCK_TYPE_SMC. Half of the call chain is like
the below, while the second half is from amdgpu_gfx_profile_ring_end_use:
amdgpu_gfx_profile_ring_begin_use
amdgpu_dpm_is_overdrive_enabled
is_support_sw_smu
amdgpu_device_ip_is_valid
On a game menu screen at 90Hz refresh rate we end up with ~840 calls per
second which sticks out when the submission worker is profiled with perf:
13.78% [kernel] [k] __lock_text_start
10.86% [kernel] [k] __lookup_object
8.76% [kernel] [k] __mod_timer
4.94% [kernel] [k] queued_spin_lock_slowpath
1.66% [kernel] [k] amdgpu_device_ip_is_valid
1.54% [kernel] [k] preempt_count_add
1.42% [kernel] [k] amdgpu_sync_peek_fence
1.18% [kernel] [k] amdgpu_vmid_grab
1.17% [kernel] [k] amdgpu_ib_schedule
1.14% [kernel] [k] kthread_worker_fn
Lets short-circuit this walk by simply caching the result of
is_support_sw_smu() in the device.
This is a micro-improvement but it is at least conceptually nicer to avoid
repeating the same walk so much.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/devfreq')
0 files changed, 0 insertions, 0 deletions
