drm/amdgpu: make amdgpu device attr_update() function more efficient
authorYang Wang <kevinyang.wang@amd.com>
Tue, 26 Mar 2024 08:54:03 +0000 (16:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Apr 2024 01:48:40 +0000 (21:48 -0400)
commit2ea6f4d94d0d215798eb1a623f43e5e0fb526f4a
tree7c8efdd15813c43a68a2bd6677083b52d5feccb3
parentd7f1487643552f18d1855474eba54a8ff3655935
drm/amdgpu: make amdgpu device attr_update() function more efficient

v1:
add a new enumeration type to identify device attribute node,
this method is relatively more efficient compared with 'strcmp' in
update_attr() function.

v2:
rename device_attr_type to device_attr_id.

Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Ma Jun <majun@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c
drivers/gpu/drm/amd/pm/inc/amdgpu_pm.h