aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2017-01-09 02:23:17 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-01-27 11:13:19 -0500
commitbd7de27d81a73c91fad9a3358f56ecf7f0dc8ede (patch)
treed68efc85e62adfdb27e35f9e4871d27da6c80564 /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
parent3e19e69ab01f53d68fc85e2fedcdd93c74994415 (diff)
drm/amdgpu:new field members for SRIOV
and implement CSA functions in this file Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
index 0d821d9c6932..63609e179651 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
@@ -28,11 +28,17 @@
28#define AMDGPU_SRIOV_CAPS_ENABLE_IOV (1 << 1) /* sr-iov is enabled on this GPU */ 28#define AMDGPU_SRIOV_CAPS_ENABLE_IOV (1 << 1) /* sr-iov is enabled on this GPU */
29#define AMDGPU_SRIOV_CAPS_IS_VF (1 << 2) /* this GPU is a virtual function */ 29#define AMDGPU_SRIOV_CAPS_IS_VF (1 << 2) /* this GPU is a virtual function */
30#define AMDGPU_PASSTHROUGH_MODE (1 << 3) /* thw whole GPU is pass through for VM */ 30#define AMDGPU_PASSTHROUGH_MODE (1 << 3) /* thw whole GPU is pass through for VM */
31
31/* GPU virtualization */ 32/* GPU virtualization */
32struct amdgpu_virt { 33struct amdgpu_virt {
33 uint32_t caps; 34 uint32_t caps;
35 struct amdgpu_bo *csa_obj;
36 uint64_t csa_vmid0_addr;
34}; 37};
35 38
39#define AMDGPU_CSA_SIZE (8 * 1024)
40#define AMDGPU_CSA_VADDR (AMDGPU_VA_RESERVED_SIZE - AMDGPU_CSA_SIZE)
41
36#define amdgpu_sriov_enabled(adev) \ 42#define amdgpu_sriov_enabled(adev) \
37((adev)->virt.caps & AMDGPU_SRIOV_CAPS_ENABLE_IOV) 43((adev)->virt.caps & AMDGPU_SRIOV_CAPS_ENABLE_IOV)
38 44