drm/amd/pm: avoid driver getting empty metrics table for the first time
authorYang Wang <KevinYang.Wang@amd.com>
Tue, 30 May 2023 09:08:08 +0000 (17:08 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Aug 2023 22:07:41 +0000 (18:07 -0400)
commite01eeffc3f861425b3e8238f3d848b25ef9c1243
tree73d8b78717ed1a49110c2f8c7b8bd5296cba2c7c
parentbd6040b0ea04aca3f90bc81ccd2aa816d20292d7
drm/amd/pm: avoid driver getting empty metrics table for the first time

add metrics.AccumulationCouter check to avoid driver getting an empty
metrics data since metrics table not updated completely in pmfw side.

Signed-off-by: Yang Wang <KevinYang.Wang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Tested-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c