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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2023 16:27:31 +0000 (18:27 +0200)
commit5525c289dbcf2b1adecc5e727e7d544ade9c7be1
treef4644dfffde47ad3647d02446137e731f07daf9b
parent4346a66ad19876663e46d57c85dac5958f227033
drm/amd/pm/smu7: move variables to where they are used

commit 63a9ab264a8c030482ab9e7e20b6c4c162299531 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c