summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
diff options
context:
space:
mode:
authorBokun Zhang <bokun.zhang@amd.com>2021-05-13 08:17:54 +0300
committerAlex Deucher <alexander.deucher@amd.com>2021-05-20 05:29:58 +0300
commited9d205363c3ec786126e46568e9e9aadaf0cb93 (patch)
treec85cae3e228dda8bf72c38d71f06ef5d13a7eaa2 /drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
parent2b2339eeaff597778b042bf0010b87bac33715e2 (diff)
downloadlinux-ed9d205363c3ec786126e46568e9e9aadaf0cb93.tar.xz
drm/amdgpu: Complete multimedia bandwidth interface
- Update SRIOV PF2VF header with latest revision - Extend existing function in amdgpu_virt.c to read MM bandwidth config from PF2VF message - Add SRIOV Sienna Cichlid codec array and update the bandwidth with PF2VF message v2: squash in removal of unused variable (Alex) Signed-off-by: Bokun Zhang <bokun.zhang@amd.com> Reviewed-by: Monk liu <monk.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h54
1 files changed, 48 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h b/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
index befd0b4b7bea..a434c71fde8e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
@@ -56,6 +56,8 @@
#define AMD_SRIOV_MSG_RESERVE_UCODE 24
+#define AMD_SRIOV_MSG_RESERVE_VCN_INST 4
+
enum amd_sriov_ucode_engine_id {
AMD_SRIOV_UCODE_ID_VCE = 0,
AMD_SRIOV_UCODE_ID_UVD,
@@ -98,10 +100,10 @@ union amd_sriov_msg_feature_flags {
union amd_sriov_reg_access_flags {
struct {
- uint32_t vf_reg_psp_access_ih : 1;
- uint32_t vf_reg_rlc_access_mmhub : 1;
- uint32_t vf_reg_rlc_access_gc : 1;
- uint32_t reserved : 29;
+ uint32_t vf_reg_access_ih : 1;
+ uint32_t vf_reg_access_mmhub : 1;
+ uint32_t vf_reg_access_gc : 1;
+ uint32_t reserved : 29;
} flags;
uint32_t all;
};
@@ -114,6 +116,37 @@ union amd_sriov_msg_os_info {
uint32_t all;
};
+struct amd_sriov_msg_uuid_info {
+ union {
+ struct {
+ uint32_t did : 16;
+ uint32_t fcn : 8;
+ uint32_t asic_7 : 8;
+ };
+ uint32_t time_low;
+ };
+
+ struct {
+ uint32_t time_mid : 16;
+ uint32_t time_high : 12;
+ uint32_t version : 4;
+ };
+
+ struct {
+ struct {
+ uint8_t clk_seq_hi : 6;
+ uint8_t variant : 2;
+ };
+ union {
+ uint8_t clk_seq_low;
+ uint8_t asic_6;
+ };
+ uint16_t asic_4;
+ };
+
+ uint32_t asic_0;
+};
+
struct amd_sriov_msg_pf2vf_info_header {
/* the total structure size in byte */
uint32_t size;
@@ -160,10 +193,19 @@ struct amd_sriov_msg_pf2vf_info {
/* identification in ROCm SMI */
uint64_t uuid;
uint32_t fcn_idx;
- /* flags which indicate the register access method VF should use */
+ /* flags to indicate which register access method VF should use */
union amd_sriov_reg_access_flags reg_access_flags;
+ /* MM BW management */
+ struct {
+ uint32_t decode_max_dimension_pixels;
+ uint32_t decode_max_frame_pixels;
+ uint32_t encode_max_dimension_pixels;
+ uint32_t encode_max_frame_pixels;
+ } mm_bw_management[AMD_SRIOV_MSG_RESERVE_VCN_INST];
+ /* UUID info */
+ struct amd_sriov_msg_uuid_info uuid_info;
/* reserved */
- uint32_t reserved[256-27];
+ uint32_t reserved[256 - 47];
};
struct amd_sriov_msg_vf2pf_info_header {