mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
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 <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -30,6 +30,9 @@
|
||||
|
||||
#define AMDGPU_XCP_MODE_NONE -1
|
||||
|
||||
#define AMDGPU_XCP_FL_NONE 0
|
||||
#define AMDGPU_XCP_FL_LOCKED (1 << 0)
|
||||
|
||||
enum AMDGPU_XCP_IP_BLOCK {
|
||||
AMDGPU_XCP_GFXHUB,
|
||||
AMDGPU_XCP_GFX,
|
||||
@@ -99,7 +102,7 @@ int amdgpu_xcp_resume(struct amdgpu_xcp_mgr *xcp_mgr, int xcp_id);
|
||||
|
||||
int amdgpu_xcp_mgr_init(struct amdgpu_device *adev, int init_mode,
|
||||
int init_xcps, struct amdgpu_xcp_mgr_funcs *xcp_funcs);
|
||||
int amdgpu_xcp_query_partition_mode(struct amdgpu_xcp_mgr *xcp_mgr);
|
||||
int amdgpu_xcp_query_partition_mode(struct amdgpu_xcp_mgr *xcp_mgr, u32 flags);
|
||||
int amdgpu_xcp_switch_partition_mode(struct amdgpu_xcp_mgr *xcp_mgr, int mode);
|
||||
int amdgpu_xcp_get_partition(struct amdgpu_xcp_mgr *xcp_mgr,
|
||||
enum AMDGPU_XCP_IP_BLOCK ip, int instance);
|
||||
|
||||
Reference in New Issue
Block a user