]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: move i915_vgacntrl_reg() where needed
authorJani Nikula <jani.nikula@intel.com>
Thu, 2 May 2019 15:02:44 +0000 (18:02 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 3 May 2019 07:06:44 +0000 (10:06 +0300)
Reduce clutter from i915_drv.h.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d30a79d008b875f708f5acf7924f9ca8ab06b575.1556809195.git.jani.nikula@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_display.c

index a4ae6ed2362046de9555f4ab47418e00aaab2e67..5f65c75594ef1f7109d63f344fd3afcd6a6db39e 100644 (file)
@@ -3357,16 +3357,6 @@ extern void intel_display_print_error_state(struct drm_i915_error_state_buf *e,
 #define INTEL_BROADCAST_RGB_FULL 1
 #define INTEL_BROADCAST_RGB_LIMITED 2
 
-static inline i915_reg_t i915_vgacntrl_reg(struct drm_i915_private *dev_priv)
-{
-       if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
-               return VLV_VGACNTRL;
-       else if (INTEL_GEN(dev_priv) >= 5)
-               return CPU_VGACNTRL;
-       else
-               return VGACNTRL;
-}
-
 static inline unsigned long msecs_to_jiffies_timeout(const unsigned int m)
 {
        unsigned long j = msecs_to_jiffies(m);
index bb0815c55bd0c52e6dae66386b4c63304e7b2fb4..cb1815bdf0884a34060f1ab25683cc93ed7c669b 100644 (file)
@@ -15486,6 +15486,16 @@ void intel_init_display_hooks(struct drm_i915_private *dev_priv)
                dev_priv->display.update_crtcs = intel_update_crtcs;
 }
 
+static i915_reg_t i915_vgacntrl_reg(struct drm_i915_private *dev_priv)
+{
+       if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
+               return VLV_VGACNTRL;
+       else if (INTEL_GEN(dev_priv) >= 5)
+               return CPU_VGACNTRL;
+       else
+               return VGACNTRL;
+}
+
 /* Disable the VGA plane that we never use */
 static void i915_disable_vga(struct drm_i915_private *dev_priv)
 {