aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorBokun Zhang <Bokun.Zhang@amd.com>2020-11-09 14:09:03 -0500
committerAlex Deucher <alexander.deucher@amd.com>2020-11-10 14:26:31 -0500
commitde21e4aeb2b26128dcc5be1bcb2fafa73d041e51 (patch)
treed9ff99b130ad9ee1e1cf494faeaf07b1ea65a58f /drivers/gpu/drm
parentdrm/amd/amdgpu: Fix incorrect logic to increment VCN doorbell index (diff)
downloadlinux-de21e4aeb2b26128dcc5be1bcb2fafa73d041e51.tar.gz
linux-de21e4aeb2b26128dcc5be1bcb2fafa73d041e51.zip
drm/amd/amdgpu: Add rev_id workaround logic for SRIOV setup
- When we are under SRIOV setup, the rev_id cannot be read properly. Therefore, we will return default value for it Signed-off-by: Bokun Zhang <Bokun.Zhang@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c b/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c
index e0048806afaa..b5c3db16c2b0 100644
--- a/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c
@@ -53,8 +53,17 @@ static void nbio_v2_3_remap_hdp_registers(struct amdgpu_device *adev)
static u32 nbio_v2_3_get_rev_id(struct amdgpu_device *adev)
{
- u32 tmp = RREG32_SOC15(NBIO, 0, mmRCC_DEV0_EPF0_STRAP0);
+ u32 tmp;
+ /*
+ * guest vm gets 0xffffffff when reading RCC_DEV0_EPF0_STRAP0,
+ * therefore we force rev_id to 0 (which is the default value)
+ */
+ if (amdgpu_sriov_vf(adev)) {
+ return 0;
+ }
+
+ tmp = RREG32_SOC15(NBIO, 0, mmRCC_DEV0_EPF0_STRAP0);
tmp &= RCC_DEV0_EPF0_STRAP0__STRAP_ATI_REV_ID_DEV0_F0_MASK;
tmp >>= RCC_DEV0_EPF0_STRAP0__STRAP_ATI_REV_ID_DEV0_F0__SHIFT;
1'>ocfs2: remove ocfs2_is_o2cb_active()Gang He3-10/+1 2018-11-03mm: thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappingsAndrea Arcangeli1-2/+30 2018-11-03include/linux/notifier.h: SRCU: fix ctagsSam Protsenko1-2/+1 2018-11-03mm: handle no memcg case in memcg_kmem_charge() properlyRoman Gushchin1-1/+1 2018-11-02ARM: dts: stm32: update HASH1 dmas property on stm32mp157cAlexandre Torgue1-1/+1 2018-11-02ARM: orion: avoid VLA in orion_mpp_confArnd Bergmann1-1/+6 2018-11-02iov_iter: Fix 9p virtio breakageMarc Zyngier1-1/+1 2018-11-02cifs: fix signed/unsigned mismatch on aio_read patchSteve French1-6/+11 2018-11-02cifs: don't dereference smb_file_target before null checkColin Ian King1-2/+5 2018-11-02CIFS: Add direct I/O functions to file_operationsLong Li1-6/+4 2018-11-02CIFS: Add support for direct I/O writeLong Li2-41/+164 2018-11-02CIFS: Add support for direct I/O readLong Li3-39/+192 2018-11-02smb3: missing defines and structs for reparse point handlingSteve French2-0/+38 2018-11-02smb3: allow more detailed protocol info on open files for debuggingSteve French4-0/+65 2018-11-02smb3: on kerberos mount if server doesn't specify auth type use krb5Steve French1-2/+4 2018-11-02smb3: add trace point for tree connectionSteve French2-1/+44 2018-11-02cifs: fix spelling mistake, EACCESS -> EACCESColin Ian King2-3/+3 2018-11-02cifs: fix return value for cifs_listxattrRonnie Sahlberg1-5/+6