aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
diff options
context:
space:
mode:
authorLijo Lazar <[email protected]>2023-01-16 05:25:38 +0000
committerAlex Deucher <[email protected]>2023-06-09 13:55:29 +0000
commitded7d99eb5b78931cec30dd49cd4097d0ac770e1 (patch)
tree5c69496ae071595803e3d5ab783069ddd7b8418a /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
parentdrm/amd/pm: fix wrong smu socclk value (diff)
downloadkernel-ded7d99eb5b78931cec30dd49cd4097d0ac770e1.tar.gz
kernel-ded7d99eb5b78931cec30dd49cd4097d0ac770e1.zip
drm/amdgpu: Add flags for partition mode query
It's not required to take lock on all cases while querying partition mode. Querying partition mode during KFD init process doesn't need to take a lock. Init process after a switch will already be happening under lock. Control the behaviour by adding flags to xcp_query_partition_mode. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index 70c6099353b8..1487ecac2705 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -1177,7 +1177,8 @@ static ssize_t amdgpu_gfx_get_current_compute_partition(struct device *dev,
int mode;
char *partition_mode;
- mode = amdgpu_xcp_query_partition_mode(adev->xcp_mgr);
+ mode = amdgpu_xcp_query_partition_mode(adev->xcp_mgr,
+ AMDGPU_XCP_FL_NONE);
switch (mode) {
case AMDGPU_SPX_PARTITION_MODE: