drm/amdgpu: fix gmc init fail in sriov mode
authorYang Wang <KevinYang.Wang@amd.com>
Wed, 9 Feb 2022 14:15:24 +0000 (22:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Feb 2022 21:57:52 +0000 (16:57 -0500)
commit63b5fa9dbb711e245e59cc14eaae0106eb716447
tree84b0e49c0a6f608c92ce4a439190dbd61cc29f1a
parent3b99e8e37d0ffaa0ef95598b9b83c49c89bc0ea2
drm/amdgpu: fix gmc init fail in sriov mode

"adev->gfx.rlc.rlcg_reg_access_supported = true;"
the above varible were set too late during driver initialization.
it will cause the driver to fail to write/read register during GMC hw init
in sriov mode.

move gfx_xxx_init_rlcg_reg_access_ctrl() function to gfx early init stage
to avoid this issue.

Fixes: 5d447e29670148 ("drm/amdgpu: add helper for rlcg indirect reg access")

Signed-off-by: Yang Wang <KevinYang.Wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c