drm/amd/pm/smu7: move variables to where they are used
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 6 Feb 2023 16:47:47 +0000 (11:47 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Feb 2023 03:02:38 +0000 (22:02 -0500)
commit63a9ab264a8c030482ab9e7e20b6c4c162299531
treee5083449b089b3232bd86e285636bbcc3d6eb53c
parent0082e2fcd71c13208fcedd75b0599ff09cb5a940
drm/amd/pm/smu7: move variables to where they are used

Move variable declarations to where they are used.  Fixes
a segfault on smu7 V0 structures where some tables don't
exist.

Cc: Evan Quan <evan.quan@amd.com>
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2388
Fixes: b1a9557a7d00 ("drm/amd/pm: fulfill powerplay peak profiling mode shader/memory clock settings")
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c