drm/i915: Try harder to get best m, n, p values with minimal error
authorShobhit Kumar <shobhit.kumar@intel.com>
Tue, 10 Dec 2013 06:44:57 +0000 (12:14 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 11 Dec 2013 22:52:18 +0000 (23:52 +0100)
commit8e1eed5aa8fe6cdd2c445b7aded42498523ad4dd
treef17c214f7711f226e9d7ab615a3b2a2bfb0dcc0e
parent44d4c6eebb2ef04f698c292bb6eda5f2e80c663b
drm/i915: Try harder to get best m, n, p values with minimal error

Basically check for both +ive and -ive deviation from target clock and
pick the one with minimal error. If we get a direct match, break from
loop to acheive some optimization.

v2: Use signed variable for target and calculated dsi clock values

Signed-off-by: Vijayakumar Balakrishnan <vijayakumar.balakrishnan@intel.com>
Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dsi_pll.c