drm/i915: Relocate pipe_config_mismatch()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 15 Feb 2024 16:40:53 +0000 (18:40 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 15 Mar 2024 12:23:51 +0000 (14:23 +0200)
Hoist pipe_config_mismatch() upwards a bit so that it can get
reused by the other mismatch() functions.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240215164055.30585-11-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display.c

index cdd489c1d145a280c02fde25d79c84e79f9df946..c2c8683ec831556ee18a47f89d5aaff363357d77 100644 (file)
@@ -4797,6 +4797,29 @@ intel_compare_buffer(const u8 *a, const u8 *b, size_t len)
        return memcmp(a, b, len) == 0;
 }
 
+static void __printf(4, 5)
+pipe_config_mismatch(bool fastset, const struct intel_crtc *crtc,
+                    const char *name, const char *format, ...)
+{
+       struct drm_i915_private *i915 = to_i915(crtc->base.dev);
+       struct va_format vaf;
+       va_list args;
+
+       va_start(args, format);
+       vaf.fmt = format;
+       vaf.va = &args;
+
+       if (fastset)
+               drm_dbg_kms(&i915->drm,
+                           "[CRTC:%d:%s] fastset requirement not met in %s %pV\n",
+                           crtc->base.base.id, crtc->base.name, name, &vaf);
+       else
+               drm_err(&i915->drm, "[CRTC:%d:%s] mismatch in %s %pV\n",
+                       crtc->base.base.id, crtc->base.name, name, &vaf);
+
+       va_end(args);
+}
+
 static void
 pipe_config_infoframe_mismatch(bool fastset, const struct intel_crtc *crtc,
                               const char *name,
@@ -4906,29 +4929,6 @@ pipe_config_buffer_mismatch(bool fastset, const struct intel_crtc *crtc,
                       16, 0, b, len, false);
 }
 
-static void __printf(4, 5)
-pipe_config_mismatch(bool fastset, const struct intel_crtc *crtc,
-                    const char *name, const char *format, ...)
-{
-       struct drm_i915_private *i915 = to_i915(crtc->base.dev);
-       struct va_format vaf;
-       va_list args;
-
-       va_start(args, format);
-       vaf.fmt = format;
-       vaf.va = &args;
-
-       if (fastset)
-               drm_dbg_kms(&i915->drm,
-                           "[CRTC:%d:%s] fastset requirement not met in %s %pV\n",
-                           crtc->base.base.id, crtc->base.name, name, &vaf);
-       else
-               drm_err(&i915->drm, "[CRTC:%d:%s] mismatch in %s %pV\n",
-                       crtc->base.base.id, crtc->base.name, name, &vaf);
-
-       va_end(args);
-}
-
 static void
 pipe_config_pll_mismatch(bool fastset,
                         const struct intel_crtc *crtc,