Skip to contentSkip to conversation

drm/amdgpu: Ignore stop rlc on SRIOV environment.

PATCH In review Gavin Wan 4 participants 4 messages Nov 9, 2022 – Nov 10, 2022

Subsystems (3)
lore
Share & tools
lore

Gavin Wan

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Ignore stop rlc on SRIOV environment.

For SRIOV, the guest driver should not do stop rlc. The host handles programing RLC.

On SRIOV, the stop rlc will be hang (RLC related registers are blocked by policy) when the RLCG interface is not enabled.

Change-Id Iac31332e2c958aae9506759de1d3a311b5c84942
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -1
index 4fe75dd2b329..0e9529b95d35 100644
@@ -1517,7 +1517,7 @@ static int smu_disable_dpms(struct smu_context *smu)
 	}
 
 	if (adev->ip_versions[GC_HWIP][0] >= IP_VERSION(9, 4, 2) &&
-	    adev->gfx.rlc.funcs->stop)
+	    !amdgpu_sriov_vf(adev) && adev->gfx.rlc.funcs->stop)
 		adev->gfx.rlc.funcs->stop(adev);
 
 	return ret;
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Gavin Wan

For SRIOV, the guest driver should not do stop rlc. The host handles programing RLC.

On SRIOV, the stop rlc will be hang (RLC related registers are blocked by policy) when the RLCG interface is not enabled.

Quoted 20 lines

Change-Id: Iac31332e2c958aae9506759de1d3a311b5c84942> ---

 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -2
index 4fe75dd2b329..0e9529b95d35 100644
@@ -1517,7 +1517,7 @@ static int smu_disable_dpms(struct smu_context *smu)
        }
 
        if (adev->ip_versions[GC_HWIP][0] >= IP_VERSION(9, 4, 2) &&
-           adev->gfx.rlc.funcs->stop)
+           !amdgpu_sriov_vf(adev) && adev->gfx.rlc.funcs->stop)
                adev->gfx.rlc.funcs->stop(adev);
 
        return ret;
--

2.34.1

Acked-by Alex Deucher
#2 lore raw

[AMD Official Use Only - General]

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, November 9, 2022 2:07 PM
To: Wan, Gavin <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu: Ignore stop rlc on SRIOV environment.

Quoted 8 lines · Gavin Wan

For SRIOV, the guest driver should not do stop rlc. The host handles programing RLC.

On SRIOV, the stop rlc will be hang (RLC related registers are blocked by policy) when the RLCG interface is not enabled.

Quoted 21 lines

Change-Id: Iac31332e2c958aae9506759de1d3a311b5c84942> --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -2
index 4fe75dd2b329..0e9529b95d35 100644
@@ -1517,7 +1517,7 @@ static int smu_disable_dpms(struct smu_context *smu)
        }
 
        if (adev->ip_versions[GC_HWIP][0] >= IP_VERSION(9, 4, 2) &&
-           adev->gfx.rlc.funcs->stop)
+           !amdgpu_sriov_vf(adev) && adev->gfx.rlc.funcs->stop)
                adev->gfx.rlc.funcs->stop(adev);
 
        return ret;
--

2.34.1

Reviewed-by on v1 1/1
#3 lore raw
In reply to Gavin Wan

[AMD Official Use Only - General]

Best Regards,
Kevin

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Gavin Wan
Sent: Thursday, November 10, 2022 2:24 AM
To: [email protected]
Cc: Wan, Gavin <[email protected]>
Subject: [PATCH] drm/amdgpu: Ignore stop rlc on SRIOV environment.

For SRIOV, the guest driver should not do stop rlc. The host handles programing RLC.

On SRIOV, the stop rlc will be hang (RLC related registers are blocked by policy) when the RLCG interface is not enabled.

Change-Id Iac31332e2c958aae9506759de1d3a311b5c84942
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -1
index 4fe75dd2b329..0e9529b95d35 100644
@@ -1517,7 +1517,7 @@ static int smu_disable_dpms(struct smu_context *smu)
        }
 
        if (adev->ip_versions[GC_HWIP][0] >= IP_VERSION(9, 4, 2) &&
-           adev->gfx.rlc.funcs->stop)
+           !amdgpu_sriov_vf(adev) && adev->gfx.rlc.funcs->stop)
                adev->gfx.rlc.funcs->stop(adev);
 
        return ret;

--
2.34.1