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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Sep 2019 06:21:55 +0000 (08:21 +0200)
commit853dc0759586fb6a8cb3b2a659493d63796fe0f1
treec5594211a83e0ad2fa433c307d2ba17d110f16e7
parent5faabd22ed64df5c581f5224fcdbf822ab60a152
drm/amd/pp: Fix truncated clock value when set watermark

[ Upstream commit 4d454e9ffdb1ef5a51ebc147b5389c96048db683 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c