]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/powerplay: convert the sclk/mclk into Mhz for comparation
authorEvan Quan <evan.quan@amd.com>
Tue, 10 Jul 2018 03:35:16 +0000 (11:35 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Jul 2018 19:45:16 +0000 (14:45 -0500)
Convert the clocks into right Mhz unit. Otherwise, it will miss
the equal situation.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c

index cae76fe6588116c602433a3644850c60d2df9d68..c0ceb69a23b0da1e4314b6aca86b140c758e20a1 100644 (file)
@@ -1881,7 +1881,7 @@ static int vega12_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 / 1000 == now) ? "*" : "");
+                               (clocks.data[i].clocks_in_khz / 1000 == now / 100) ? "*" : "");
                break;
 
        case PP_MCLK:
@@ -1897,7 +1897,7 @@ static int vega12_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 / 1000 == now) ? "*" : "");
+                               (clocks.data[i].clocks_in_khz / 1000 == now / 100) ? "*" : "");
                break;
 
        case PP_PCIE: