drm/i915: Refactor wm calculations
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 21 Apr 2017 18:14:27 +0000 (21:14 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 10 May 2017 13:48:31 +0000 (16:48 +0300)
commitbaf69ca8a51c8a5ef6ef869f684764459a9b6fa2
tree5a2979759fdf2d022b869a623fab16336004c84f
parent0f95ff8505b25aa29530818afcf12ff08399ccf5
drm/i915: Refactor wm calculations

All platforms until SKL compute their watermarks essentially
using the same method1/small buffer and method2/large buffer
formulas. Most just open code it in slightly different ways.
Let's pull it all into common helpers. This makes it a little
easier to spot the actual differences.

While at it try to add some docs explainign what the formulas
are trying to do.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170421181432.15216-11-ville.syrjala@linux.intel.com
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/i915/intel_pm.c