drm/amd/amdgpu/sriov: Aligned the definition with libgv
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +1 -1
@@ -334,7 +334,7 @@ void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev)if (adev->fw_vram_usage.va !=NULL ) { adev->virt.fw_reserve.p_pf2vf = - (struct amdgim_pf2vf_info_header *)( + (struct amd_sriov_msg_pf2vf_info_header *)( adev->fw_vram_usage.va +AMDGIM_DATAEXCHANGE_OFFSET );AMDGPU_FW_VRAM_PF2VF_READ (adev, header.size, &pf2vf_size);AMDGPU_FW_VRAM_PF2VF_READ (adev, checksum, &checksum);
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +14 -10
@@ -63,8 +63,8 @@ struct amdgpu_virt_ops {* Firmware Reserve Frame buffer */ struct amdgpu_virt_fw_reserve { -struct amdgim_pf2vf_info_header *p_pf2vf; -struct amdgim_vf2pf_info_header *p_vf2pf; +struct amd_sriov_msg_pf2vf_info_header *p_pf2vf; +struct amd_sriov_msg_vf2pf_info_header *p_vf2pf;unsigned int checksum_key; };/*
@@ -85,15 +85,17 @@ enum AMDGIM_FEATURE_FLAG { AMDGIM_FEATURE_GIM_FLR_VRAMLOST = 0x4, }; -struct amdgim_pf2vf_info_header { +struct amd_sriov_msg_pf2vf_info_header {/* the total structure size in byte. */ uint32_t size;/* version of this structure, written by the GIM */ uint32_t version; +/* reserved */ +uint32_t reserved[2 ]; }__aligned(4) ;struct amdgim_pf2vf_info_v1 {/* header contains size and version */ -struct amdgim_pf2vf_info_header header; +struct amd_sriov_msg_pf2vf_info_header header;/* max_width * max_height */ unsigned int uvd_enc_max_pixels_count;/* 16x16 pixels/sec, codec independent */
@@ -112,7 +114,7 @@ struct amdgim_pf2vf_info_v1 {struct amdgim_pf2vf_info_v2 {/* header contains size and version */ -struct amdgim_pf2vf_info_header header; +struct amd_sriov_msg_pf2vf_info_header header;/* use private key from mailbox 2 to create chueksum */ uint32_t checksum;/* The features flags of the GIM driver supports. */
@@ -137,20 +139,22 @@ struct amdgim_pf2vf_info_v2 {uint64_t vcefw_kboffset;/* VCE FW size in KB */ uint32_t vcefw_ksize; -uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE (256 ,0 ,0 , (9 +sizeof (struct amdgim_pf2vf_info_header )/sizeof (uint32_t )),3 )]; +uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE (256 ,0 ,0 , (9 +sizeof (struct amd_sriov_msg_pf2vf_info_header )/sizeof (uint32_t )),3 )]; }__aligned(4) ; -struct amdgim_vf2pf_info_header { +struct amd_sriov_msg_vf2pf_info_header {/* the total structure size in byte. */ uint32_t size;/*version of this structure, written by the guest */ uint32_t version; +/* reserved */ +uint32_t reserved[2 ]; }__aligned(4) ;struct amdgim_vf2pf_info_v1 {/* header contains size and version */ -struct amdgim_vf2pf_info_header header; +struct amd_sriov_msg_vf2pf_info_header header;/* driver version */ char driver_version[64 ];/* driver certification, 1=WHQL, 0=None */
@@ -180,7 +184,7 @@ struct amdgim_vf2pf_info_v1 {struct amdgim_vf2pf_info_v2 {/* header contains size and version */ -struct amdgim_vf2pf_info_header header; +struct amd_sriov_msg_vf2pf_info_header header;uint32_t checksum;/* driver version */ uint8_t driver_version[64 ];
@@ -206,7 +210,7 @@ struct amdgim_vf2pf_info_v2 {uint32_t uvd_enc_usage;/* guest uvd engine usage percentage. 0xffff means N/A. */ uint32_t uvd_enc_health; -uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE (256 ,64 ,0 , (12 +sizeof (struct amdgim_vf2pf_info_header )/sizeof (uint32_t )),0 )]; +uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE (256 ,64 ,0 , (12 +sizeof (struct amd_sriov_msg_vf2pf_info_header )/sizeof (uint32_t )),0 )]; }__aligned(4) ;#define AMDGPU_FW_VRAM_VF2PF_VER 2
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1542122857-3342-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org
Hi Frank,
Could you help to review this?
Best wishes
Emily Deng
Quoted 126 lines
-----Original Message-----
From: Emily Deng <[email protected]>
Sent: Tuesday, November 13, 2018 10:28 AM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amd/amdgpu/sriov: Aligned the definition with libgvAligned the
amd_sriov_msg_pf2vf_info_headerand amd_sriov_msg_pf2vf_info_header's definition with libgv.Signed-off-by Emily Deng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c| 2 +-drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h| 24 ++++++++++++++----------2 files changed, 15 insertions(+), 11 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +1
-1@@ -334,7 +334,7 @@ void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev)if (adev->fw_vram_usage.va !=NULL ) { adev->virt.fw_reserve.p_pf2vf = - (struct amdgim_pf2vf_info_header *)( + (struct amd_sriov_msg_pf2vf_info_header *)( adev->fw_vram_usage.va +AMDGIM_DATAEXCHANGE_OFFSET );AMDGPU_FW_VRAM_PF2VF_READ(adev, header.size,
&pf2vf_size);
AMDGPU_FW_VRAM_PF2VF_READ(adev, checksum,
&checksum); diff --gita/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.hb/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
index 0728fbc..722deef 100644drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +6
-4@@ -63,8 +63,8 @@ struct amdgpu_virt_ops {* Firmware Reserve Frame buffer */ struct amdgpu_virt_fw_reserve { -struct amdgim_pf2vf_info_header *p_pf2vf; -struct amdgim_vf2pf_info_header *p_vf2pf; +struct amd_sriov_msg_pf2vf_info_header *p_pf2vf; +struct amd_sriov_msg_vf2pf_info_header *p_vf2pf;unsigned int checksum_key; };/* @@ -85,15 +85,17 @@ enum AMDGIM_FEATURE_FLAG { AMDGIM_FEATURE_GIM_FLR_VRAMLOST = 0x4, }; -struct amdgim_pf2vf_info_header { +struct amd_sriov_msg_pf2vf_info_header {/* the total structure size in byte. */ uint32_t size;/* version of this structure, written by the GIM */ uint32_t version; +/* reserved */ +uint32_t reserved[2 ]; }__aligned(4) ;struct amdgim_pf2vf_info_v1 {/* header contains size and version */ -struct amdgim_pf2vf_info_header header; +struct amd_sriov_msg_pf2vf_info_header header;/* max_width * max_height */ unsigned int uvd_enc_max_pixels_count; /* 16x16 pixels/sec, codec independent */ @@ -112,7 +114,7 @@ struct amdgim_pf2vf_info_v1 {struct amdgim_pf2vf_info_v2 { /* header contains size and version */drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-1-struct amdgim_pf2vf_info_header header; +struct amd_sriov_msg_pf2vf_info_header header;/* use private key from mailbox 2 to create chueksum */ uint32_t checksum; /* The features flags of the GIM driver supports. */ @@ -137,20 +139,22 @@ struct amdgim_pf2vf_info_v2 { uint64_t vcefw_kboffset; /* VCE FW size in KB */ uint32_t vcefw_ksize;drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +0
-1- uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE(256, 0,0, (9 +
sizeof(struct amdgim_pf2vf_info_header)/sizeof(uint32_t)), 3)];drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-0+ uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE(256, 0,0, (9 +
+sizeof(struct amd_sriov_msg_pf2vf_info_header)/sizeof(uint32_t)), 3)]; }__aligned(4);drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-1-struct amdgim_vf2pf_info_header { +struct amd_sriov_msg_vf2pf_info_header {/* the total structure size in byte. */ uint32_t size; /*version of this structure, written by the guest */ uint32_t version;drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +2
-0+/* reserved */ +uint32_t reserved[2 ];}
__aligned(4);struct amdgim_vf2pf_info_v1 { /* header contains size and version */drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-1-struct amdgim_vf2pf_info_header header; +struct amd_sriov_msg_vf2pf_info_header header;/* driver version */ char driver_version[64]; /* driver certification, 1=WHQL, 0=None */ @@ -180,7 +184,7 @@struct
amdgim_vf2pf_info_v1{struct amdgim_vf2pf_info_v2 { /* header contains size and version */drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-1-struct amdgim_vf2pf_info_header header; +struct amd_sriov_msg_vf2pf_info_header header;uint32_t checksum; /* driver version */ uint8_t driver_version[64];drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-1@@ -206,7 +210,7 @@ struct amdgim_vf2pf_info_v2 {uint32_t uvd_enc_usage;/* guest uvd engine usage percentage. 0xffff means N/A. */ uint32_t uvd_enc_health; -uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE (256 ,64 , 0, (12 + sizeof(struct amdgim_vf2pf_info_header)/sizeof(uint32_t)), 0)]; + uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE(256, 64,0, (12 +
+sizeof(struct amd_sriov_msg_vf2pf_info_header)/sizeof(uint32_t)), 0)]; }__aligned(4);
Quoted 3 lines
#define
AMDGPU_FW_VRAM_VF2PF_VER2
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BN7PR12MB2644459AE71FA371D835C0188FC20-Zx/IyJUqfGKoYeSiBV3SvgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Hi Emily,
This patch looks good for me.
Best Regards,
Frank
-----邮件原件-----
发件人: Deng, Emily
发送时间: 2018年11月14日 0:09
收件人: Min, Frank <[email protected]>
抄送: [email protected]
主题: RE: [PATCH] drm/amd/amdgpu/sriov: Aligned the definition with libgv
Hi Frank,
Could you help to review this?
Best wishes
Emily Deng
Quoted 127 lines
-----Original Message-----
From: Emily Deng <[email protected]>
Sent: Tuesday, November 13, 2018 10:28 AM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amd/amdgpu/sriov: Aligned the definition with libgvAligned the
amd_sriov_msg_pf2vf_info_headerand amd_sriov_msg_pf2vf_info_header's definition with libgv.Signed-off-by Emily Deng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c| 2 +-drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h| 24 ++++++++++++++----------2 files changed, 15 insertions(+), 11 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +1
-1@@ -334,7 +334,7 @@ void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev)if (adev->fw_vram_usage.va !=NULL ) { adev->virt.fw_reserve.p_pf2vf = - (struct amdgim_pf2vf_info_header *)( + (struct amd_sriov_msg_pf2vf_info_header *)( adev->fw_vram_usage.va +AMDGIM_DATAEXCHANGE_OFFSET );AMDGPU_FW_VRAM_PF2VF_READ(adev, header.size, &pf2vf_size); AMDGPU_FW_VRAM_PF2VF_READ(adev, checksum, &checksum); diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.hb/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
index 0728fbc..722deef 100644drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +6
-4@@ -63,8 +63,8 @@ struct amdgpu_virt_ops {* Firmware Reserve Frame buffer */ struct amdgpu_virt_fw_reserve { -struct amdgim_pf2vf_info_header *p_pf2vf; -struct amdgim_vf2pf_info_header *p_vf2pf; +struct amd_sriov_msg_pf2vf_info_header *p_pf2vf; +struct amd_sriov_msg_vf2pf_info_header *p_vf2pf;unsigned int checksum_key; };/* @@ -85,15 +85,17 @@ enum AMDGIM_FEATURE_FLAG { AMDGIM_FEATURE_GIM_FLR_VRAMLOST = 0x4, }; -struct amdgim_pf2vf_info_header { +struct amd_sriov_msg_pf2vf_info_header {/* the total structure size in byte. */ uint32_t size;/* version of this structure, written by the GIM */ uint32_t version; +/* reserved */ +uint32_t reserved[2 ]; }__aligned(4) ;struct amdgim_pf2vf_info_v1 {/* header contains size and version */ -struct amdgim_pf2vf_info_header header; +struct amd_sriov_msg_pf2vf_info_header header;/* max_width * max_height */ unsigned int uvd_enc_max_pixels_count; /* 16x16 pixels/sec, codec independent */ @@ -112,7 +114,7 @@ struct amdgim_pf2vf_info_v1 {struct amdgim_pf2vf_info_v2 { /* header contains size and version */drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-1-struct amdgim_pf2vf_info_header header; +struct amd_sriov_msg_pf2vf_info_header header;/* use private key from mailbox 2 to create chueksum */ uint32_t checksum; /* The features flags of the GIM driver supports. */ @@ -137,20 +139,22 @@ struct amdgim_pf2vf_info_v2 { uint64_t vcefw_kboffset; /* VCE FW size in KB */ uint32_t vcefw_ksize;drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +0
-1- uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE(256, 0,0, (9 +
sizeof(struct amdgim_pf2vf_info_header)/sizeof(uint32_t)), 3)];drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-0+ uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE(256, 0,0, (9 +
+sizeof(struct amd_sriov_msg_pf2vf_info_header)/sizeof(uint32_t)), 3)]; }__aligned(4);drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-1-struct amdgim_vf2pf_info_header { +struct amd_sriov_msg_vf2pf_info_header {/* the total structure size in byte. */ uint32_t size; /*version of this structure, written by the guest */ uint32_t version;drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +2
-0+/* reserved */ +uint32_t reserved[2 ];}
__aligned(4);struct amdgim_vf2pf_info_v1 { /* header contains size and version */drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-1-struct amdgim_vf2pf_info_header header; +struct amd_sriov_msg_vf2pf_info_header header;/* driver version */ char driver_version[64]; /* driver certification, 1=WHQL, 0=None */ @@ -180,7 +184,7 @@ struct
amdgim_vf2pf_info_v1{struct amdgim_vf2pf_info_v2 { /* header contains size and version */drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-1-struct amdgim_vf2pf_info_header header; +struct amd_sriov_msg_vf2pf_info_header header;uint32_t checksum; /* driver version */ uint8_t driver_version[64];drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +1
-1@@ -206,7 +210,7 @@ struct amdgim_vf2pf_info_v2 {uint32_t uvd_enc_usage;/* guest uvd engine usage percentage. 0xffff means N/A. */ uint32_t uvd_enc_health; -uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE (256 ,64 ,0 , (12 +sizeof (struct amdgim_vf2pf_info_header )/sizeof (uint32_t )), 0)]; + uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE(256, 64,0, (12 +
+sizeof(struct amd_sriov_msg_vf2pf_info_header)/sizeof(uint32_t)), 0)]; }__aligned(4);
Quoted 3 lines
#define
AMDGPU_FW_VRAM_VF2PF_VER2
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx