drm/amdgpu: Do not program HDP_MISC_CNTL in hdp_v4_0.c under SRIOV
Subsystems (2)
PATCH 1/1 drm/amdgpu: Do not program HDP_MISC_CNTL in hdp_v4_0.c under SRIOV
This register is blocked for VF access.
--- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c +5 -0
@@ -145,6 +145,11 @@ static void hdp_v4_0_init_registers(struct amdgpu_device *adev)break ; } +/* Do not program registers if VF */ +if (amdgpu_sriov_vf (adev)) { +return ; + } +WREG32_FIELD15 (HDP ,0 ,HDP_MISC_CNTL ,FLUSH_INVALIDATE_CACHE ,1 );if (amdgpu_ip_version (adev,HDP_HWIP ,0 ) ==IP_VERSION (4 ,4 ,0 ))
Signature · 1 line
2.34.1
[AMD Official Use Only - General]
Do you also need to skip programming of mmHDP_NONSURFACE_BASE and mmHDP_NONSURFACE_BASE_HI?
-----Original Message-----
From: Lu, Victor Cheng Chi (Victor) <[email protected]>
Sent: Tuesday, November 7, 2023 2:32 PM
To: [email protected]
Cc: Dhume, Samir <[email protected]>; Lu, Victor Cheng Chi (Victor) <[email protected]>
Subject: [PATCH] drm/amdgpu: Do not program HDP_MISC_CNTL in hdp_v4_0.c under SRIOV
This register is blocked for VF access.
--- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c +5 -0
@@ -145,6 +145,11 @@ static void hdp_v4_0_init_registers(struct amdgpu_device *adev)break ; } +/* Do not program registers if VF */ +if (amdgpu_sriov_vf (adev)) { +return ; + } +WREG32_FIELD15 (HDP ,0 ,HDP_MISC_CNTL ,FLUSH_INVALIDATE_CACHE ,1 );if (amdgpu_ip_version (adev,HDP_HWIP ,0 ) ==IP_VERSION (4 ,4 ,0 ))
--
2.34.1
[AMD Official Use Only - General]
Yes, those regs are restricted to PF writes. I should update the commit message
________________________________
From: Dhume, Samir <[email protected]>
Sent: Wednesday, November 8, 2023 9:54 AM
To: Lu, Victor Cheng Chi (Victor) <[email protected]>; [email protected] <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: Do not program HDP_MISC_CNTL in hdp_v4_0.c under SRIOV
[AMD Official Use Only - General]
Do you also need to skip programming of mmHDP_NONSURFACE_BASE and mmHDP_NONSURFACE_BASE_HI?
-----Original Message-----
From: Lu, Victor Cheng Chi (Victor) <[email protected]>
Sent: Tuesday, November 7, 2023 2:32 PM
To: [email protected]
Cc: Dhume, Samir <[email protected]>; Lu, Victor Cheng Chi (Victor) <[email protected]>
Subject: [PATCH] drm/amdgpu: Do not program HDP_MISC_CNTL in hdp_v4_0.c under SRIOV
This register is blocked for VF access.
--- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c +5 -0
@@ -145,6 +145,11 @@ static void hdp_v4_0_init_registers(struct amdgpu_device *adev)break ; } +/* Do not program registers if VF */ +if (amdgpu_sriov_vf (adev)) { +return ; + } +WREG32_FIELD15 (HDP ,0 ,HDP_MISC_CNTL ,FLUSH_INVALIDATE_CACHE ,1 );if (amdgpu_ip_version (adev,HDP_HWIP ,0 ) ==IP_VERSION (4 ,4 ,0 ))
--
2.34.1
PATCH v2 1/1 drm/amdgpu: Do not program PF-only regs in hdp_v4_0.c under SRIOV (v2)
The following regs can only be programmed by the PF:HDP_MISC_CNTLHDP_NONSURFACE_BASEHDP_NONSURFACE_BASE_HI
v2: update commit message
--- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c +5 -0
@@ -145,6 +145,11 @@ static void hdp_v4_0_init_registers(struct amdgpu_device *adev)break ; } +/* Do not program registers if VF */ +if (amdgpu_sriov_vf (adev)) { +return ; + } +WREG32_FIELD15 (HDP ,0 ,HDP_MISC_CNTL ,FLUSH_INVALIDATE_CACHE ,1 );if (amdgpu_ip_version (adev,HDP_HWIP ,0 ) ==IP_VERSION (4 ,4 ,0 ))
Signature · 1 line
2.34.1
RE: [PATCH v2] drm/amdgpu: Do not program PF-only regs in hdp_v4_0.c under SRIOV (v2)
[AMD Official Use Only - General]
-----Original Message-----
From: Lu, Victor Cheng Chi (Victor) <[email protected]>
Sent: Wednesday, November 8, 2023 10:25 AM
To: [email protected]
Cc: Dhume, Samir <[email protected]>; Lu, Victor Cheng Chi (Victor) <[email protected]>
Subject: [PATCH v2] drm/amdgpu: Do not program PF-only regs in hdp_v4_0.c under SRIOV (v2)
The following regs can only be programmed by the PF:HDP_MISC_CNTLHDP_NONSURFACE_BASEHDP_NONSURFACE_BASE_HI
v2: update commit message
--- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c +5 -0
@@ -145,6 +145,11 @@ static void hdp_v4_0_init_registers(struct amdgpu_device *adev)break ; } +/* Do not program registers if VF */ +if (amdgpu_sriov_vf (adev)) { +return ; + } +WREG32_FIELD15 (HDP ,0 ,HDP_MISC_CNTL ,FLUSH_INVALIDATE_CACHE ,1 );if (amdgpu_ip_version (adev,HDP_HWIP ,0 ) ==IP_VERSION (4 ,4 ,0 ))
--
2.34.1