drm/amd/amdgpu: Remove static from variable in RLCG Reg RW
authorGavin Wan <Gavin.Wan@amd.com>
Wed, 13 Apr 2022 15:09:22 +0000 (11:09 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 Apr 2022 19:29:20 +0000 (15:29 -0400)
commitd68cf992ded575928cf4ddf7c64faff0d8dcce14
tree0b8acbabea61ba1c23f880faa11916dbf5337a81
parent250e64a3f06c42e993e7b8c6f727d43b5b9f8c96
drm/amd/amdgpu: Remove static from variable in RLCG Reg RW

[why]
These static variables save the RLC Scratch registers address.
When we install multiple GPUs (for example: XGMI setting) and
multiple GPUs call the function at same time. The RLC Scratch
registers address are changed each other. Then it caused
reading/writing from/to wrong GPU.

[how]
Removed the static from the variables. The variables are
on the stack.

Fixes: 5d447e29670148 ("drm/amdgpu: add helper for rlcg indirect reg access")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Gavin Wan <Gavin.Wan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c