]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/amd/powerplay: do the comparison in the right Khz granularity
authorEvan Quan <evan.quan@amd.com>
Thu, 1 Nov 2018 06:55:08 +0000 (14:55 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Nov 2018 20:49:37 +0000 (15:49 -0500)
Convert the operands on the two sides into the same granularity.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c

index 57143d51e3eed6b1dce0011748345cfece4c7165..07a36af0f2370e09f108cfd35f0b727c12e40773 100644 (file)
@@ -2742,7 +2742,7 @@ static int vega20_print_clock_levels(struct pp_hwmgr *hwmgr,
                for (i = 0; i < clocks.num_levels; i++)
                        size += sprintf(buf + size, "%d: %uMhz %s\n",
                                i, clocks.data[i].clocks_in_khz / 1000,
-                               (clocks.data[i].clocks_in_khz == now) ? "*" : "");
+                               (clocks.data[i].clocks_in_khz == now * 10) ? "*" : "");
                break;
 
        case PP_MCLK:
@@ -2759,7 +2759,7 @@ static int vega20_print_clock_levels(struct pp_hwmgr *hwmgr,
                for (i = 0; i < clocks.num_levels; i++)
                        size += sprintf(buf + size, "%d: %uMhz %s\n",
                                i, clocks.data[i].clocks_in_khz / 1000,
-                               (clocks.data[i].clocks_in_khz == now) ? "*" : "");
+                               (clocks.data[i].clocks_in_khz == now * 10) ? "*" : "");
                break;
 
        case PP_PCIE: