]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/pm: Avoid overflow when sorting pp_feature list
authorAsad Kamal <asad.kamal@amd.com>
Mon, 2 Mar 2026 05:35:30 +0000 (13:35 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 Mar 2026 16:50:56 +0000 (11:50 -0500)
commit8e8f6bda8a84f41c4002bca44ac89a5b3f8c7df2
treef23ebd98e3984a8e1eb86e6e7ab342a28db7c64b
parentb2e997e6cfefdc24241656ef2352ab1176823735
drm/amd/pm: Avoid overflow when sorting pp_feature list

pp_features sorting uses int8_t sort_feature[] to store driver
feature enum indices. On newer ASICs the enum index can exceed 127,
causing signed overflow and silently dropping entries from the output.
Switch the array to int16_t so all enum indices are preserved.

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c