drm/amdgpu: partially revert powerplay `__counted_by` changes
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Oct 2024 21:27:25 +0000 (17:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Oct 2024 18:58:26 +0000 (14:58 -0400)
commitd6b9f492e229be1d1bd360c3ac5bee4635bacf99
treedc032ab71c60685c659862d53ead49850c0358d2
parent8e82d1199564ea0baab7be31f6558406bab4fe1d
drm/amdgpu: partially revert powerplay `__counted_by` changes

Partially revert
commit 0ca9f757a0e2 ("drm/amd/pm: powerplay: Add `__counted_by` attribute for flexible arrays")

The count attribute for these arrays does not get set until
after the arrays are allocated and populated leading to false
UBSAN warnings.

Fixes: 0ca9f757a0e2 ("drm/amd/pm: powerplay: Add `__counted_by` attribute for flexible arrays")
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3662
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 8a5ae927b653b43623e55610d2215ee94c027e8c)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h