drm/amd/pp: Fix truncated clock value when set watermark
authorRex Zhu <Rex.Zhu@amd.com>
Tue, 13 Nov 2018 03:15:56 +0000 (11:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Nov 2018 15:20:41 +0000 (10:20 -0500)
commit4d454e9ffdb1ef5a51ebc147b5389c96048db683
tree2e804e9089b9f6fc7e0e71119c3f18921aa32236
parentc837243ff4017f493c7d6f4ab57278d812a86859
drm/amd/pp: Fix truncated clock value when set watermark

the clk value should be tranferred to MHz first and
then transfer to uint16. otherwise, the clock value
will be truncated.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reported-by: Hersen Wu <hersenxs.wu@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c