drm/i915: fix 64bit divide
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 13 Nov 2017 23:34:53 +0000 (23:34 +0000)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 14 Nov 2017 14:17:51 +0000 (16:17 +0200)
commitf577a03ba920df1a9163221d4823627999c59bfd
tree5b4afdf8811925c819ad6bec5706ee8aa2de0907
parent3657e92762c42b098cb7057ac86b1c7cd30336e5
drm/i915: fix 64bit divide

ERROR: "__udivdi3" [drivers/gpu/drm/i915/i915.ko] undefined!
ERROR: "__divdi3" [drivers/gpu/drm/i915/i915.ko] undefined!

Store the frequency in kHz and drop 64bit divisions.

v2: Use div64_u64 (Matthew)

v3: store frequency in kHz to avoid 64bit divs (Chris/Ville)

Fixes: dab9178333 ("drm/i915: expose command stream timestamp frequency to userspace")
Reported-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171113233455.12085-3-lionel.g.landwerlin@intel.com
Reviewed-by: Ewelina Musial <ewelina.musial@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_device_info.c