]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Make drm_mode_vrefresh() a bit more accurate
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 13 Mar 2018 15:07:58 +0000 (17:07 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 16 Mar 2018 16:31:49 +0000 (18:31 +0200)
commitf17ac8bc9495cac25f73273bec7c3832e388904f
treee5b12b5b3bb171b37ec79ba10296bf64bbc690aa
parent4831785516f47f81cc436d8909f467f28eb6fdc7
drm: Make drm_mode_vrefresh() a bit more accurate

Do the refresh rate calculation with a single division. This gives
us slightly more accurate results, especially for interlaced since
we don't just double the final truncated result.

We do lose one bit compared to the old way, so with an interlaced
mode the new code can only handle ~2GHz instead of the ~4GHz the
old code handeled.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180313150759.27620-2-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_modes.c