drm/i915: Always perform internal fixed16 division in 64 bits
authorKumar, Mahesh <mahesh1.kumar@intel.com>
Wed, 5 Jul 2017 14:31:45 +0000 (20:01 +0530)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 13 Jul 2017 14:37:20 +0000 (16:37 +0200)
commiteed02a7b53131abb796ba8a8cf2886cee366a89f
tree9b6c017f2f0073eb485e0df7e1471853d0bc3bc0
parent07ab976d1971a91a7ac25d4782dc8985a2314b87
drm/i915: Always perform internal fixed16 division in 64 bits

This patch combines fixed_16_16_div & fixed_16_16_div_u64 wrappers.
And new fixed_16_16_div wrapper always performs division operation in
u64 internally, to avoid any data loss which was happening in earlier
version of wrapper.
earlier wrapper was converting u32 to fixed16 in 32 bit so we were
losing 16-MSB data.

Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170705143154.32132-3-mahesh1.kumar@intel.com
[mlankhorst: Fix typo in commit message.]
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_pm.c