• Yifan Zha's avatar
    drm/amdgpu: Revert programming GRBM_GFX_* in RLCG interface to support GFX9 · fa9b4155
    Yifan Zha authored
    [Why]
    Regression of commit 72fef498 ("drm/amdgpu: Remove writing GRBM_GFX_CNTL in RLCG interface under SRIOV") on GFX9.
    According to GFX9 VF using different method to access GC registers including MMIO(direct) and RLCG(indirect),
    removing GRBM_GFX_* writing would make PIPE/ME/VM/QUEUE selection chaos leading to some OCL benchmark failure.
    
    For example,
    using RLCG interface to program GRBM_GFX_CNTL/INDEX for selecting MEC(actually the value is only in scratch2/3),
    then using MMIO directly program a MEC register in VF driver.
    The register programming are invalid due to GC switched to incorrect ME.
    
    [How]
    With checking RLCG accessing flag, keep writing GRBM_GFX_* as a legacy way.
    But it is still skipped on GFX10+ to avoid violation occurrence.
    Signed-off-by: default avatarYifan Zha <Yifan.Zha@amd.com>
    Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    fa9b4155
amdgpu_virt.c 31.2 KB