OSDN Git Service

drm/amdgpu: add amdgpu_virt_get_vf_mode helper function
authorKevin Wang <kevin1.wang@amd.com>
Wed, 29 Apr 2020 10:49:23 +0000 (18:49 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 May 2020 15:23:52 +0000 (11:23 -0400)
commita7f28103374787ae43b936cd2ec2f8388958668e
tree18566592700960d3c3acce68ecff4b9975cb805d
parent728e7e0cd61899208e924472b9e641dbeb0775c4
drm/amdgpu: add amdgpu_virt_get_vf_mode helper function

the swsmu or powerplay(hwmgr) need to handle task according to different VF mode,
this function to help query vf mode.

vf mode:
1. SRIOV_VF_MODE_BARE_METAL: the driver work on host  OS (PF)
2. SRIOV_VF_MODE_ONE_VF    : the driver work on guest OS with one VF
3. SRIOV_VF_MODE_MULTI_VF  : the driver work on guest OS with multi VF

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h