]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i915: Move DIV_ROUND_CLOSEST_ULL macro to header
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Mon, 29 Sep 2014 22:49:33 +0000 (15:49 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 6 Oct 2014 14:49:27 +0000 (16:49 +0200)
Move the duplicated DIV_ROUND_CLOSEST_ULL macro into the intel_drv.h
header file so that it can be shared between intel_display.c
and intel_panel.c.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-By: Joe Konno <joe.konno@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_panel.c

index 507370513f3d2e8494f4d4ad89fe265b0128e295..6a0cc367934df0e65ab1e9501423f99ee04d0a76 100644 (file)
@@ -73,9 +73,6 @@ static const uint32_t intel_cursor_formats[] = {
        DRM_FORMAT_ARGB8888,
 };
 
-#define DIV_ROUND_CLOSEST_ULL(ll, d)   \
-({ unsigned long long _tmp = (ll)+(d)/2; do_div(_tmp, d); _tmp; })
-
 static void intel_increase_pllclock(struct drm_device *dev,
                                    enum pipe pipe);
 static void intel_crtc_update_cursor(struct drm_crtc *crtc, bool on);
index 07ce04683c3091a11afeacdee99e3b1b41c03461..ba715229a54016324411687113d730fec801c479 100644 (file)
@@ -35,6 +35,9 @@
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_dp_mst_helper.h>
 
+#define DIV_ROUND_CLOSEST_ULL(ll, d)   \
+({ unsigned long long _tmp = (ll)+(d)/2; do_div(_tmp, d); _tmp; })
+
 /**
  * _wait_for - magic (register) wait macro
  *
index 97ff71f40dd3b1925a657c7821d6a3483e9e2c35..0e018cb49147367f1fa1eacd5af6ed082ca29680 100644 (file)
@@ -398,9 +398,6 @@ intel_panel_detect(struct drm_device *dev)
        }
 }
 
-#define DIV_ROUND_CLOSEST_ULL(ll, d)   \
-({ unsigned long long _tmp = (ll)+(d)/2; do_div(_tmp, d); _tmp; })
-
 /**
  * scale - scale values from one range to another
  *