[PATCH] drm/amdgpu: Display SPX partition mode for MI3xx VFs

Victor Lu <[email protected]>
Newsgroups org.freedesktop.lists.amd-gfx
Message-ID <[email protected]>
VF's accelerator partition mode does not reflect that of the host.
For consistency, return SPX mode when accelerator partition mode is
queried if running on a VF.

Signed-off-by: Victor Lu <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c b/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c
index cddfe4015f53..a558dffa4062 100644
--- a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c
+++ b/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c
@@ -95,10 +95,10 @@ static int aqua_vanjaram_query_partition_mode(struct amdgpu_xcp_mgr *xcp_mgr)
 		mode = AMDGPU_UNKNOWN_COMPUTE_PARTITION_MODE;
 	struct amdgpu_device *adev = xcp_mgr->adev;
 
-	derv_mode = __aqua_vanjaram_calc_xcp_mode(xcp_mgr);
-
 	if (amdgpu_sriov_vf(adev))
-		return derv_mode;
+		return AMDGPU_SPX_PARTITION_MODE;
+
+	derv_mode = __aqua_vanjaram_calc_xcp_mode(xcp_mgr);
 
 	if (adev->nbio.funcs->get_compute_partition_mode) {
 		mode = adev->nbio.funcs->get_compute_partition_mode(adev);
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.