drm/amdgpu: Make display watermark calculations more accurate
authorMario Kleiner <mario.kleiner.de@gmail.com>
Wed, 29 Mar 2017 20:09:11 +0000 (22:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 12:30:10 +0000 (14:30 +0200)
commit7d2d6022807aa5aea752ab9d37350ec9ce700353
treef2d7a42f2b670ce56ec5aa58771cf2ab690cfbdd
parent349666cfbe76f62c12cab8e42be1f04408100754
drm/amdgpu: Make display watermark calculations more accurate

commit d63c277dc672e0c568481af043359420fa9d4736 upstream.

Avoid big roundoff errors in scanline/hactive durations for
high pixel clocks, especially for >= 500 Mhz, and thereby
program more accurate display fifo watermarks.

Implemented here for DCE 6,8,10,11.
Successfully tested on DCE 10 with AMD R9 380 Tonga.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c