]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit96d5a00e046cecc3f5221ca8375d13b1d383d89e
tree0b8acbabea61ba1c23f880faa11916dbf5337a81
parent5148ed8ce04f6f15626f0f20eea747300cdcd1a3
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: e1f8c128a81098 ("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