drm/radeon: Make display watermark calculations more accurate
authorMario Kleiner <mario.kleiner.de@gmail.com>
Sun, 23 Apr 2017 23:33:09 +0000 (01:33 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Apr 2017 21:33:04 +0000 (17:33 -0400)
commite6b9a6c84b936e61f1ccff779494f3bd38775503
treef04c4f77182d3b82d9f309ab2a42dc2e75bb66e1
parentae45bbc2ba8f92b5a773fece6f5792f497c89282
drm/radeon: Make display watermark calculations more accurate

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

This is a port of the corresponding amdgpu patch.

Implemented for DCE 4,6,8.
Tested on Evergreen/DCE-4 with Radeon HD-5770.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/si.c