[PATCH 2/2] drm/amdgpu: Add unique_id for Arcturus
Russell, Kent
Kent.Russell at amd.com
Thu Apr 30 13:11:11 UTC 2020
[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
> -----Original Message-----
> From: Quan, Evan <Evan.Quan at amd.com>
> Sent: Wednesday, April 29, 2020 10:43 PM
> To: Russell, Kent <Kent.Russell at amd.com>; amd-gfx at lists.freedesktop.org
> Cc: Russell, Kent <Kent.Russell at amd.com>
> Subject: RE: [PATCH 2/2] drm/amdgpu: Add unique_id for Arcturus
>
> [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 <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Kent
> Russell
> Sent: Tuesday, April 28, 2020 12:48 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Russell, Kent <Kent.Russell at amd.com>
> 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
>
> Signed-off-by: Kent Russell <kent.russell at amd.com>
> Change-Id: I66f8e9ff41521d6c13ff673587d6061c1f3f4b7a
> ---
> drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
> b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
> index e98d92ec1eac..f55f9b371bf2 100644
> --- a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
> +++ b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
> @@ -293,6 +293,7 @@ static int arcturus_get_workload_type(struct
> smu_context *smu, enum PP_SMC_POWER static 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
> *table return -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
> amd-gfx at lists.freedesktop.org
> 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
More information about the amd-gfx
mailing list