diff options
author | Emily Deng <Emily.Deng@amd.com> | 2018-11-14 10:20:13 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-19 15:27:42 -0500 |
commit | bed1ed366d5f68a9e038364ec22fe34ed361c1ba (patch) | |
tree | 56f243f490a77d01ec2d515c8d64f45ec92376c5 /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | |
parent | 6ccda157732d7ff6773a325f3d3252ad4d56f015 (diff) |
drm/amd/amdgpu/sriov: Aligned the definition with libgv
Aligned the amd_sriov_msg_pf2vf_info_header and amd_sriov_msg_pf2vf_info_header's
definition with libgv.
Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Frank.Min <Frank.Min@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.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h index 0728fbc9a692..722deefc0a7e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | |||
@@ -63,8 +63,8 @@ struct amdgpu_virt_ops { | |||
63 | * Firmware Reserve Frame buffer | 63 | * Firmware Reserve Frame buffer |
64 | */ | 64 | */ |
65 | struct amdgpu_virt_fw_reserve { | 65 | struct amdgpu_virt_fw_reserve { |
66 | struct amdgim_pf2vf_info_header *p_pf2vf; | 66 | struct amd_sriov_msg_pf2vf_info_header *p_pf2vf; |
67 | struct amdgim_vf2pf_info_header *p_vf2pf; | 67 | struct amd_sriov_msg_vf2pf_info_header *p_vf2pf; |
68 | unsigned int checksum_key; | 68 | unsigned int checksum_key; |
69 | }; | 69 | }; |
70 | /* | 70 | /* |
@@ -85,15 +85,17 @@ enum AMDGIM_FEATURE_FLAG { | |||
85 | AMDGIM_FEATURE_GIM_FLR_VRAMLOST = 0x4, | 85 | AMDGIM_FEATURE_GIM_FLR_VRAMLOST = 0x4, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | struct amdgim_pf2vf_info_header { | 88 | struct amd_sriov_msg_pf2vf_info_header { |
89 | /* the total structure size in byte. */ | 89 | /* the total structure size in byte. */ |
90 | uint32_t size; | 90 | uint32_t size; |
91 | /* version of this structure, written by the GIM */ | 91 | /* version of this structure, written by the GIM */ |
92 | uint32_t version; | 92 | uint32_t version; |
93 | /* reserved */ | ||
94 | uint32_t reserved[2]; | ||
93 | } __aligned(4); | 95 | } __aligned(4); |
94 | struct amdgim_pf2vf_info_v1 { | 96 | struct amdgim_pf2vf_info_v1 { |
95 | /* header contains size and version */ | 97 | /* header contains size and version */ |
96 | struct amdgim_pf2vf_info_header header; | 98 | struct amd_sriov_msg_pf2vf_info_header header; |
97 | /* max_width * max_height */ | 99 | /* max_width * max_height */ |
98 | unsigned int uvd_enc_max_pixels_count; | 100 | unsigned int uvd_enc_max_pixels_count; |
99 | /* 16x16 pixels/sec, codec independent */ | 101 | /* 16x16 pixels/sec, codec independent */ |
@@ -112,7 +114,7 @@ struct amdgim_pf2vf_info_v1 { | |||
112 | 114 | ||
113 | struct amdgim_pf2vf_info_v2 { | 115 | struct amdgim_pf2vf_info_v2 { |
114 | /* header contains size and version */ | 116 | /* header contains size and version */ |
115 | struct amdgim_pf2vf_info_header header; | 117 | struct amd_sriov_msg_pf2vf_info_header header; |
116 | /* use private key from mailbox 2 to create chueksum */ | 118 | /* use private key from mailbox 2 to create chueksum */ |
117 | uint32_t checksum; | 119 | uint32_t checksum; |
118 | /* The features flags of the GIM driver supports. */ | 120 | /* The features flags of the GIM driver supports. */ |
@@ -137,20 +139,22 @@ struct amdgim_pf2vf_info_v2 { | |||
137 | uint64_t vcefw_kboffset; | 139 | uint64_t vcefw_kboffset; |
138 | /* VCE FW size in KB */ | 140 | /* VCE FW size in KB */ |
139 | uint32_t vcefw_ksize; | 141 | uint32_t vcefw_ksize; |
140 | uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE(256, 0, 0, (9 + sizeof(struct amdgim_pf2vf_info_header)/sizeof(uint32_t)), 3)]; | 142 | uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE(256, 0, 0, (9 + sizeof(struct amd_sriov_msg_pf2vf_info_header)/sizeof(uint32_t)), 3)]; |
141 | } __aligned(4); | 143 | } __aligned(4); |
142 | 144 | ||
143 | 145 | ||
144 | struct amdgim_vf2pf_info_header { | 146 | struct amd_sriov_msg_vf2pf_info_header { |
145 | /* the total structure size in byte. */ | 147 | /* the total structure size in byte. */ |
146 | uint32_t size; | 148 | uint32_t size; |
147 | /*version of this structure, written by the guest */ | 149 | /*version of this structure, written by the guest */ |
148 | uint32_t version; | 150 | uint32_t version; |
151 | /* reserved */ | ||
152 | uint32_t reserved[2]; | ||
149 | } __aligned(4); | 153 | } __aligned(4); |
150 | 154 | ||
151 | struct amdgim_vf2pf_info_v1 { | 155 | struct amdgim_vf2pf_info_v1 { |
152 | /* header contains size and version */ | 156 | /* header contains size and version */ |
153 | struct amdgim_vf2pf_info_header header; | 157 | struct amd_sriov_msg_vf2pf_info_header header; |
154 | /* driver version */ | 158 | /* driver version */ |
155 | char driver_version[64]; | 159 | char driver_version[64]; |
156 | /* driver certification, 1=WHQL, 0=None */ | 160 | /* driver certification, 1=WHQL, 0=None */ |
@@ -180,7 +184,7 @@ struct amdgim_vf2pf_info_v1 { | |||
180 | 184 | ||
181 | struct amdgim_vf2pf_info_v2 { | 185 | struct amdgim_vf2pf_info_v2 { |
182 | /* header contains size and version */ | 186 | /* header contains size and version */ |
183 | struct amdgim_vf2pf_info_header header; | 187 | struct amd_sriov_msg_vf2pf_info_header header; |
184 | uint32_t checksum; | 188 | uint32_t checksum; |
185 | /* driver version */ | 189 | /* driver version */ |
186 | uint8_t driver_version[64]; | 190 | uint8_t driver_version[64]; |
@@ -206,7 +210,7 @@ struct amdgim_vf2pf_info_v2 { | |||
206 | uint32_t uvd_enc_usage; | 210 | uint32_t uvd_enc_usage; |
207 | /* guest uvd engine usage percentage. 0xffff means N/A. */ | 211 | /* guest uvd engine usage percentage. 0xffff means N/A. */ |
208 | uint32_t uvd_enc_health; | 212 | uint32_t uvd_enc_health; |
209 | uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE(256, 64, 0, (12 + sizeof(struct amdgim_vf2pf_info_header)/sizeof(uint32_t)), 0)]; | 213 | uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE(256, 64, 0, (12 + sizeof(struct amd_sriov_msg_vf2pf_info_header)/sizeof(uint32_t)), 0)]; |
210 | } __aligned(4); | 214 | } __aligned(4); |
211 | 215 | ||
212 | #define AMDGPU_FW_VRAM_VF2PF_VER 2 | 216 | #define AMDGPU_FW_VRAM_VF2PF_VER 2 |