OSDN Git Service

drm/amd/pm: Fix showing incorrect frequencies on aldebaran
authorLijo Lazar <lijo.lazar@amd.com>
Thu, 13 May 2021 07:51:18 +0000 (15:51 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 May 2021 02:38:17 +0000 (22:38 -0400)
commite943dd8861f70785fa862ba699c7f3ba22811609
tree52d2fb1e515d3c10c5364499a7ecbd7027933de1
parenteed13b0e374e752d192b1fc62a7ecdb3938d70a7
drm/amd/pm: Fix showing incorrect frequencies on aldebaran

v1: Use the current and custom pstate frequencies to track the current and
user-set min/max values in manual and determinism mode. Previously, only
actual_* value was used to track the currrent and user requested value.
The value will get reassigned whenever user requests a new value with
pp_od_clk_voltage node. Hence it will show incorrect values when user
requests an invalid value or tries a partial request without committing
the values. Separating out to custom and current variable fixes such
issues.

v2: Remove redundant if-else check

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c