mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 11:33:36 -04:00
drm/amdgpu: Add indirect L1_TLB_CNTL reg programming for VFs
VFs on some IP versions are unable to access this register directly. This register must be programmed before PSP ring is setup, so use PSP VF mailbox directly. PSP will broadcast the register value to all VF assigned instances. Signed-off-by: Victor Skvortsov <victor.skvortsov@amd.com> Reviewed-by: Zhigang Luo <Zhigang.luo@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
4aa8de3d03
commit
0c6e39ce6d
@@ -146,11 +146,13 @@ enum AMDGIM_FEATURE_FLAG {
|
||||
|
||||
enum AMDGIM_REG_ACCESS_FLAG {
|
||||
/* Use PSP to program IH_RB_CNTL */
|
||||
AMDGIM_FEATURE_IH_REG_PSP_EN = (1 << 0),
|
||||
AMDGIM_FEATURE_IH_REG_PSP_EN = (1 << 0),
|
||||
/* Use RLC to program MMHUB regs */
|
||||
AMDGIM_FEATURE_MMHUB_REG_RLC_EN = (1 << 1),
|
||||
AMDGIM_FEATURE_MMHUB_REG_RLC_EN = (1 << 1),
|
||||
/* Use RLC to program GC regs */
|
||||
AMDGIM_FEATURE_GC_REG_RLC_EN = (1 << 2),
|
||||
AMDGIM_FEATURE_GC_REG_RLC_EN = (1 << 2),
|
||||
/* Use PSP to program L1_TLB_CNTL*/
|
||||
AMDGIM_FEATURE_L1_TLB_CNTL_PSP_EN = (1 << 3),
|
||||
};
|
||||
|
||||
struct amdgim_pf2vf_info_v1 {
|
||||
@@ -330,6 +332,10 @@ struct amdgpu_video_codec_info;
|
||||
(amdgpu_sriov_vf((adev)) && \
|
||||
((adev)->virt.reg_access & (AMDGIM_FEATURE_GC_REG_RLC_EN)))
|
||||
|
||||
#define amdgpu_sriov_reg_indirect_l1_tlb_cntl(adev) \
|
||||
(amdgpu_sriov_vf((adev)) && \
|
||||
((adev)->virt.reg_access & (AMDGIM_FEATURE_L1_TLB_CNTL_PSP_EN)))
|
||||
|
||||
#define amdgpu_sriov_rlcg_error_report_enabled(adev) \
|
||||
(amdgpu_sriov_reg_indirect_mmhub(adev) || amdgpu_sriov_reg_indirect_gc(adev))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user