drm/amdgpu: Add ReadSerial defines for Arcturus
Subsystems (2)
PATCH 1/2 drm/amdgpu: Add ReadSerial defines for Arcturus
Add the ReadSerial definitions for Arcturus to the arcturus_ppsmc.h header for use with unique_id
--- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 2 ++ drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h | 3 +++ 2 files changed, 5 insertions(+)
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +2 -0
@@ -128,6 +128,8 @@ static struct smu_11_0_cmn2aisc_mapping arcturus_message_map[SMU_MSG_MAX_COUNT]MSG_MAP (SetXgmiMode, PPSMC_MSG_SetXgmiMode),MSG_MAP (SetMemoryChannelEnable, PPSMC_MSG_SetMemoryChannelEnable),MSG_MAP (DFCstateControl, PPSMC_MSG_DFCstateControl), +MSG_MAP (ReadSerialNumTop32, PPSMC_MSG_ReadSerialNumTop32), + MSG_MAP(ReadSerialNumBottom32, PPSMC_MSG_ReadSerialNumBottom32), }; static struct smu_11_0_cmn2aisc_mapping arcturus_clk_map[SMU_CLK_COUNT] = {
drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h +3 -0
@@ -116,6 +116,9 @@#define PPSMC_MSG_DFCstateControl 0x3B#define PPSMC_Message_Count 0x3C +#define PPSMC_MSG_ReadSerialNumTop32 0x49 +#define PPSMC_MSG_ReadSerialNumBottom32 0x4A +typedef uint32_t PPSMC_Result ;typedef uint32_t PPSMC_Msg ;#pragma pack(pop)
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/2 drm/amdgpu: Add unique_id for Arcturus
Add support for unique_id for Arcturus, since we only have the ppsmc definitions for that added at the moment
--- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +10 -0
@@ -293,6 +293,7 @@ static int arcturus_get_workload_type(struct smu_context *smu, enum PP_SMC_POWERstatic int arcturus_tables_init (struct smu_context *smu,struct smu_table *tables) {struct smu_table_context *smu_table = &smu->smu_table; +uint32_t top32, bottom32;SMU_TABLE_INIT (tables,SMU_TABLE_PPTABLE ,sizeof (PPTable_t),PAGE_SIZE ,AMDGPU_GEM_DOMAIN_VRAM );
@@ -315,6 +316,15 @@ static int arcturus_tables_init(struct smu_context *smu, struct smu_table *tablereturn -ENOMEM ; smu_table->metrics_time =0 ; +if (smu->adev->asic_type ==CHIP_ARCTURUS ) { +/* Get the SN to turn into a Unique ID */ +smu_send_smc_msg (smu, SMU_MSG_ReadSerialNumTop32, + &top32); +smu_send_smc_msg (smu, SMU_MSG_ReadSerialNumBottom32, + &bottom32); + + smu->adev->unique_id = ((uint64_t )bottom32 <<32 ) | top32; + }return 0 ; }
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 2/2] drm/amdgpu: Add unique_id for Arcturus
Quoted 24 lines · Kent Russell
Add support for
unique_idfor Arcturus, since we only have the ppsmc definitions for that added at the momentSigned-off-by Kent Russell <[email protected]>Change-Id I66f8e9ff41521d6c13ff673587d6061c1f3f4b7a--- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +1
-0@@ -293,6 +293,7 @@ static int arcturus_get_workload_type(struct smu_context *smu, enum PP_SMC_POWERstatic int arcturus_tables_init (struct smu_context *smu,struct smu_table *tables) {struct smu_table_context *smu_table = &smu->smu_table; +uint32_t top32, bottom32;SMU_TABLE_INIT (tables,SMU_TABLE_PPTABLE ,sizeof (PPTable_t),PAGE_SIZE ,AMDGPU_GEM_DOMAIN_VRAM );@@ -315,6 +316,15 @@ static int arcturus_tables_init(struct smu_context *smu, struct smu_table *tablereturn -ENOMEM ;
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c static int arcturus_tables_init(struct smu_context *smu, struct smu_table *table · line 326
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +8
-0smu_table->metrics_time =0 ; +if (smu->adev->asic_type ==CHIP_ARCTURUS ) { +/* Get the SN to turn into a Unique ID */ +smu_send_smc_msg (smu, SMU_MSG_ReadSerialNumTop32, + &top32); +smu_send_smc_msg (smu, SMU_MSG_ReadSerialNumBottom32, + &bottom32); + + smu->adev->unique_id = ((uint64_t )bottom32 <<32 ) | top32;
I presume the top/bottom order is still backwards for consistency? With that addressed, the series is:
Quoted 11 lines
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +1
-1+ }return 0 ; } --2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH 2/2] drm/amdgpu: Add unique_id for Arcturus
[AMD Official Use Only - Internal Distribution Only]
Quoted 47 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Wednesday, April 29, 2020 1:39 PM
To: Russell, Kent <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH 2/2] drm/amdgpu: Addunique_idfor ArcturusQuoted 17 lines · Kent Russell
Add support for
unique_idfor Arcturus, since we only have the ppsmc definitions for that added at the momentSigned-off-by Kent Russell <[email protected]>Change-Id I66f8e9ff41521d6c13ff673587d6061c1f3f4b7a--- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +0
-0@@ -293,6 +293,7 @@ static int arcturus_get_workload_type(struct
smu_context*smu, enumPP_SMC_POWERstatic intQuoted 7 lines
arcturus_tables_init(struct smu_context *smu, struct smu_table *tables) { struct smu_table_context *smu_table = &smu->smu_table;+
uint32_ttop32, bottom32;SMU_TABLE_INIT(tables,
SMU_TABLE_PPTABLE,sizeof(PPTable_t),
PAGE_SIZE,AMDGPU_GEM_DOMAIN_VRAM); @@ -315,6
+316,15 @@ static int arcturus_tables_init(structsmu_context*smu, struct
smu_table*tabledrivers/gpu/drm/amd/powerplay/arcturus_ppt.c static int arcturus_tables_init(struct smu_context *smu, struct smu_table *table
Quoted 12 lines
return -ENOMEM; smu_table->metrics_time = 0;drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +9
-0+if (smu->adev->asic_type ==CHIP_ARCTURUS ) { +/* Get the SN to turn into a Unique ID */ +smu_send_smc_msg (smu, SMU_MSG_ReadSerialNumTop32, + &top32); +smu_send_smc_msg (smu, SMU_MSG_ReadSerialNumBottom32, + &bottom32); + + smu->adev->unique_id = ((uint64_t )bottom32 <<32 ) | + top32;
Quoted 3 lines
I presume the top/bottom order is still backwards for consistency? With that addressed, the series is:
Reviewed-by Alex Deucher <[email protected]>
Correct, I confirmed that they still have it flipped here too. Thanks!
Kent
Quoted 13 lines
Quoted 5 lines
+ }
return 0;}
Quoted 8 lines
--
2.17.1_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-
Quoted 8 lines
gfx&data=02%7C01%7Cke
Quoted 1 line
nt.russell%40amd.com%7Cba8c8392f8864d5cc40408d7ec644c31%7C3dd8961f e488
Quoted 1 line
4e608e11a82d994e183d%7C0%7C0%7C637237787836285236&sdata=Np hMfjNehm
Quoted 1 line
QHll%2BsskbXLRUip6UPYoRi0QWTuB%2FqoZI%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH 2/2] drm/amdgpu: Add unique_id for Arcturus
In reply to Kent Russell[AMD Official Use Only - Internal Distribution Only]
arcturus_tables_init() is performed on ip sw_init when the SMU hw may be not ready for message handling. I would suggest to put this in some API of later SMU hw_init.
Regards,
Evan
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Kent Russell
Sent: Tuesday, April 28, 2020 12:48 AM
To: [email protected]
Cc: Russell, Kent <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: Add unique_id for Arcturus
Add support for unique_id for Arcturus, since we only have the ppsmc definitions for that added at the moment
--- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +10 -0
@@ -293,6 +293,7 @@ static int arcturus_get_workload_type(struct smu_context *smu, enum PP_SMC_POWERstatic int arcturus_tables_init (struct smu_context *smu,struct smu_table *tables) {struct smu_table_context *smu_table = &smu->smu_table; +uint32_t top32, bottom32;SMU_TABLE_INIT (tables,SMU_TABLE_PPTABLE ,sizeof (PPTable_t),PAGE_SIZE ,AMDGPU_GEM_DOMAIN_VRAM );
@@ -315,6 +316,15 @@ static int arcturus_tables_init(struct smu_context *smu, struct smu_table *tablereturn -ENOMEM ; smu_table->metrics_time =0 ; +if (smu->adev->asic_type ==CHIP_ARCTURUS ) { +/* Get the SN to turn into a Unique ID */ +smu_send_smc_msg (smu, SMU_MSG_ReadSerialNumTop32, + &top32); +smu_send_smc_msg (smu, SMU_MSG_ReadSerialNumBottom32, + &bottom32); + +smu->adev->unique_id = ((uint64_t )bottom32 <<32 ) | top32; +}return 0 ; }
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cevan.quan%40amd.com%7Ce1f630b561f3402e0abc08d7eacab98c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637236029365851744&sdata=re07oSC474wvdHv7wWJCVYxj842eihH%2Fkr0Sz0YoE94%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH 2/2] drm/amdgpu: Add unique_id for Arcturus
[AMD Official Use Only - Internal Distribution Only]
[AMD Official Use Only - Internal Distribution Only]
Good to know. I'll make a new patch to move it down the boot order. Thanks!
Kent
Quoted 61 lines
-----Original Message-----
From: Quan, Evan <[email protected]>
Sent: Wednesday, April 29, 2020 10:43 PM
To: Russell, Kent <[email protected]>; [email protected]
Cc: Russell, Kent <[email protected]>
Subject: RE: [PATCH 2/2] drm/amdgpu: Addunique_idfor Arcturus[AMD Official Use Only - Internal Distribution Only]
arcturus_tables_init()is performed on ipsw_initwhen the SMU hw may be not ready for message handling.
I would suggest to put this in some API of later SMUhw_init.Regards,
Evan
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Kent Russell
Sent: Tuesday, April 28, 2020 12:48 AM
To: [email protected]
Cc: Russell, Kent <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: Addunique_idfor ArcturusAdd support for
unique_idfor Arcturus, since we only have the ppsmc definitions for that added at the momentSigned-off-by Kent Russell <[email protected]>Change-Id I66f8e9ff41521d6c13ff673587d6061c1f3f4b7a--- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +0
-0@@ -293,6 +293,7 @@ static int arcturus_get_workload_type(struct
smu_context*smu, enumPP_SMC_POWERstatic intarcturus_tables_init(struct smu_context *smu, struct smu_table *tables){ structsmu_table_context*smu_table=&smu->smu_table; +uint32_t top32, bottom32;SMU_TABLE_INIT(tables,
SMU_TABLE_PPTABLE,sizeof(PPTable_t),PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); @@ -315,6 +316,15 @@static int arcturus_tables_init(struct
smu_context*smu, structsmu_table*table return-ENOMEM;smu_table->metrics_time= 0;drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +7
-1+if (smu->adev->asic_type ==CHIP_ARCTURUS ) { +/* Get the SN to turn into a Unique ID */ smu_send_smc_msg (smu, +SMU_MSG_ReadSerialNumTop32, &top32);smu_send_smc_msg (smu, +SMU_MSG_ReadSerialNumBottom32, &bottom32); + +smu->adev->unique_id = ((uint64_t )bottom32 <<32 ) | top32; +}return 0 ; } --2.17.1
Quoted 9 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.fr
eedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=02%7C01%7Cevan.quan%40amd.com%7Ce1f630b561f3402e0a bc08d7eacab98c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63 7236029365851744&sdata=re07oSC474wvdHv7wWJCVYxj842eihH%2Fkr0 Sz0YoE94%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Friendly ping
Quoted 54 lines
-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: Monday, April 27, 2020 12:48 PM
To: [email protected]
Cc: Russell, Kent <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: Add ReadSerial defines for ArcturusAdd the ReadSerial definitions for Arcturus to the
arcturus_ppsmc.hheader for use withunique_idSigned-off-by Kent Russell <[email protected]>Change-Id I71849ec381730b1803e54cd6040aa3b245b53de8--- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 2 ++ drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h | 3 +++ 2 files changed, 5 insertions(+)drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +0
-0@@ -128,6 +128,8 @@ static struct smu_11_0_cmn2aisc_mappingarcturus_message_map[SMU_MSG_MAX_COUNT]
MSG_MAP(SetXgmiMode,PPSMC_MSG_SetXgmiMode),
MSG_MAP(SetMemoryChannelEnable,PPSMC_MSG_SetMemoryChannelEnable),
MSG_MAP(DFCstateControl,PPSMC_MSG_DFCstateControl),drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +1
-0+ MSG_MAP(ReadSerialNumTop32,
PPSMC_MSG_ReadSerialNumTop32),drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +1
-0+ MSG_MAP(ReadSerialNumBottom32,
PPSMC_MSG_ReadSerialNumBottom32),
};static struct
smu_11_0_cmn2aisc_mapping
arcturus_clk_map[SMU_CLK_COUNT] = { diff --gita/drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.hb/drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.hindexf736d773f9d6..b426be7c76c6100644drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h +3
-1@@ -116,6 +116,9 @@#define PPSMC_MSG_DFCstateControl 0x3B#define PPSMC_Message_Count 0x3C +#define PPSMC_MSG_ReadSerialNumTop32 0x49 +#define PPSMC_MSG_ReadSerialNumBottom32 0x4A +typedef uint32_t PPSMC_Result ;typedef uint32_t PPSMC_Msg ;#pragma pack(pop) --
Quoted 1 line
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Kent Russell
Sent: Tuesday, April 28, 2020 12:48 AM
To: [email protected]
Cc: Russell, Kent <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: Add ReadSerial defines for Arcturus
Add the ReadSerial definitions for Arcturus to the arcturus_ppsmc.h header for use with unique_id
--- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 2 ++ drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h | 3 +++ 2 files changed, 5 insertions(+)
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +2 -0
@@ -128,6 +128,8 @@ static struct smu_11_0_cmn2aisc_mapping arcturus_message_map[SMU_MSG_MAX_COUNT]MSG_MAP (SetXgmiMode, PPSMC_MSG_SetXgmiMode),MSG_MAP (SetMemoryChannelEnable, PPSMC_MSG_SetMemoryChannelEnable),MSG_MAP (DFCstateControl, PPSMC_MSG_DFCstateControl), +MSG_MAP (ReadSerialNumTop32, PPSMC_MSG_ReadSerialNumTop32), +MSG_MAP(ReadSerialNumBottom32, PPSMC_MSG_ReadSerialNumBottom32), }; static struct smu_11_0_cmn2aisc_mapping arcturus_clk_map[SMU_CLK_COUNT] = {
drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h +3 -0
@@ -116,6 +116,9 @@#define PPSMC_MSG_DFCstateControl 0x3B#define PPSMC_Message_Count 0x3C +#define PPSMC_MSG_ReadSerialNumTop32 0x49 +#define PPSMC_MSG_ReadSerialNumBottom32 0x4A +typedef uint32_t PPSMC_Result ;typedef uint32_t PPSMC_Msg ;#pragma pack(pop)
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cevan.quan%40amd.com%7Cc2675663f55d426a634108d7eacab850%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637236028782497186&sdata=ezFXnyPtAUvbkwhWr54gHggH7ejxxCeAtvxjWx9e2UI%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx