Commit f01bae2d authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Use DRM_MODE_FMT+DRM_MODE_ARG()

Replace all drm_mode_debug_printmodeline() calls with
DRM_MODE_FMT+DRM_MODE_ARG(). Makes the debug output a bit more
terse in places where we previously had a newline in the precedeing
drm_dbg_kms(), and avoids anything else sneaking in between the two
printk()s in all cases.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220323182935.4701-3-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 5d2fd49d
...@@ -306,8 +306,8 @@ parse_lfp_panel_dtd(struct drm_i915_private *i915, ...@@ -306,8 +306,8 @@ parse_lfp_panel_dtd(struct drm_i915_private *i915,
i915->vbt.lfp_lvds_vbt_mode = panel_fixed_mode; i915->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;
drm_dbg_kms(&i915->drm, drm_dbg_kms(&i915->drm,
"Found panel mode in BIOS VBT legacy lfp table:\n"); "Found panel mode in BIOS VBT legacy lfp table: " DRM_MODE_FMT "\n",
drm_mode_debug_printmodeline(panel_fixed_mode); DRM_MODE_ARG(panel_fixed_mode));
fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data, fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data,
lvds_lfp_data_ptrs, lvds_lfp_data_ptrs,
...@@ -397,8 +397,8 @@ parse_generic_dtd(struct drm_i915_private *i915, ...@@ -397,8 +397,8 @@ parse_generic_dtd(struct drm_i915_private *i915,
panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC; panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC;
drm_dbg_kms(&i915->drm, drm_dbg_kms(&i915->drm,
"Found panel mode in BIOS VBT generic dtd table:\n"); "Found panel mode in BIOS VBT generic dtd table: " DRM_MODE_FMT "\n",
drm_mode_debug_printmodeline(panel_fixed_mode); DRM_MODE_ARG(panel_fixed_mode));
i915->vbt.lfp_lvds_vbt_mode = panel_fixed_mode; i915->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;
} }
...@@ -551,8 +551,8 @@ parse_sdvo_panel_data(struct drm_i915_private *i915, ...@@ -551,8 +551,8 @@ parse_sdvo_panel_data(struct drm_i915_private *i915,
i915->vbt.sdvo_lvds_vbt_mode = panel_fixed_mode; i915->vbt.sdvo_lvds_vbt_mode = panel_fixed_mode;
drm_dbg_kms(&i915->drm, drm_dbg_kms(&i915->drm,
"Found SDVO panel mode in BIOS VBT tables:\n"); "Found SDVO panel mode in BIOS VBT tables: " DRM_MODE_FMT "\n",
drm_mode_debug_printmodeline(panel_fixed_mode); DRM_MODE_ARG(panel_fixed_mode));
} }
static int intel_bios_ssc_frequency(struct drm_i915_private *i915, static int intel_bios_ssc_frequency(struct drm_i915_private *i915,
......
...@@ -5421,13 +5421,13 @@ static void intel_dump_pipe_config(const struct intel_crtc_state *pipe_config, ...@@ -5421,13 +5421,13 @@ static void intel_dump_pipe_config(const struct intel_crtc_state *pipe_config,
intel_vrr_vmin_vblank_start(pipe_config), intel_vrr_vmin_vblank_start(pipe_config),
intel_vrr_vmax_vblank_start(pipe_config)); intel_vrr_vmax_vblank_start(pipe_config));
drm_dbg_kms(&dev_priv->drm, "requested mode:\n"); drm_dbg_kms(&dev_priv->drm, "requested mode: " DRM_MODE_FMT "\n",
drm_mode_debug_printmodeline(&pipe_config->hw.mode); DRM_MODE_ARG(&pipe_config->hw.mode));
drm_dbg_kms(&dev_priv->drm, "adjusted mode:\n"); drm_dbg_kms(&dev_priv->drm, "adjusted mode: " DRM_MODE_FMT "\n",
drm_mode_debug_printmodeline(&pipe_config->hw.adjusted_mode); DRM_MODE_ARG(&pipe_config->hw.adjusted_mode));
intel_dump_crtc_timings(dev_priv, &pipe_config->hw.adjusted_mode); intel_dump_crtc_timings(dev_priv, &pipe_config->hw.adjusted_mode);
drm_dbg_kms(&dev_priv->drm, "pipe mode:\n"); drm_dbg_kms(&dev_priv->drm, "pipe mode: " DRM_MODE_FMT "\n",
drm_mode_debug_printmodeline(&pipe_config->hw.pipe_mode); DRM_MODE_ARG(&pipe_config->hw.pipe_mode));
intel_dump_crtc_timings(dev_priv, &pipe_config->hw.pipe_mode); intel_dump_crtc_timings(dev_priv, &pipe_config->hw.pipe_mode);
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"port clock: %d, pipe src: " DRM_RECT_FMT ", pixel rate %d\n", "port clock: %d, pipe src: " DRM_RECT_FMT ", pixel rate %d\n",
......
...@@ -2553,9 +2553,9 @@ static void intel_edp_mso_mode_fixup(struct intel_connector *connector, ...@@ -2553,9 +2553,9 @@ static void intel_edp_mso_mode_fixup(struct intel_connector *connector,
drm_mode_set_name(mode); drm_mode_set_name(mode);
drm_dbg_kms(&i915->drm, drm_dbg_kms(&i915->drm,
"[CONNECTOR:%d:%s] using generated MSO mode: ", "[CONNECTOR:%d:%s] using generated MSO mode: " DRM_MODE_FMT "\n",
connector->base.base.id, connector->base.name); connector->base.base.id, connector->base.name,
drm_mode_debug_printmodeline(mode); DRM_MODE_ARG(mode));
} }
static void intel_edp_mso_init(struct intel_dp *intel_dp) static void intel_edp_mso_init(struct intel_dp *intel_dp)
......
...@@ -391,8 +391,8 @@ intel_dvo_get_current_mode(struct intel_encoder *encoder) ...@@ -391,8 +391,8 @@ intel_dvo_get_current_mode(struct intel_encoder *encoder)
mode = intel_encoder_current_mode(encoder); mode = intel_encoder_current_mode(encoder);
if (mode) { if (mode) {
DRM_DEBUG_KMS("using current (BIOS) mode: "); DRM_DEBUG_KMS("using current (BIOS) mode: " DRM_MODE_FMT "\n",
drm_mode_debug_printmodeline(mode); DRM_MODE_ARG(mode));
mode->type |= DRM_MODE_TYPE_PREFERRED; mode->type |= DRM_MODE_TYPE_PREFERRED;
} }
......
...@@ -984,8 +984,8 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) ...@@ -984,8 +984,8 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
*/ */
fixed_mode = intel_encoder_current_mode(intel_encoder); fixed_mode = intel_encoder_current_mode(intel_encoder);
if (fixed_mode) { if (fixed_mode) {
drm_dbg_kms(&dev_priv->drm, "using current (BIOS) mode: "); drm_dbg_kms(&dev_priv->drm, "using current (BIOS) mode: " DRM_MODE_FMT "\n",
drm_mode_debug_printmodeline(fixed_mode); DRM_MODE_ARG(fixed_mode));
fixed_mode->type |= DRM_MODE_TYPE_PREFERRED; fixed_mode->type |= DRM_MODE_TYPE_PREFERRED;
} }
......
...@@ -194,9 +194,9 @@ intel_panel_edid_downclock_mode(struct intel_connector *connector, ...@@ -194,9 +194,9 @@ intel_panel_edid_downclock_mode(struct intel_connector *connector,
return NULL; return NULL;
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"[CONNECTOR:%d:%s] using downclock mode from EDID: ", "[CONNECTOR:%d:%s] using downclock mode from EDID: " DRM_MODE_FMT "\n",
connector->base.base.id, connector->base.name); connector->base.base.id, connector->base.name,
drm_mode_debug_printmodeline(downclock_mode); DRM_MODE_ARG(downclock_mode));
return downclock_mode; return downclock_mode;
} }
...@@ -221,9 +221,9 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector) ...@@ -221,9 +221,9 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector)
return NULL; return NULL;
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"[CONNECTOR:%d:%s] using preferred mode from EDID: ", "[CONNECTOR:%d:%s] using preferred mode from EDID: " DRM_MODE_FMT "\n",
connector->base.base.id, connector->base.name); connector->base.base.id, connector->base.name,
drm_mode_debug_printmodeline(fixed_mode); DRM_MODE_ARG(fixed_mode));
return fixed_mode; return fixed_mode;
} }
...@@ -238,9 +238,9 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector) ...@@ -238,9 +238,9 @@ intel_panel_edid_fixed_mode(struct intel_connector *connector)
fixed_mode->type |= DRM_MODE_TYPE_PREFERRED; fixed_mode->type |= DRM_MODE_TYPE_PREFERRED;
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"[CONNECTOR:%d:%s] using first mode from EDID: ", "[CONNECTOR:%d:%s] using first mode from EDID: " DRM_MODE_FMT "\n",
connector->base.base.id, connector->base.name); connector->base.base.id, connector->base.name,
drm_mode_debug_printmodeline(fixed_mode); DRM_MODE_ARG(fixed_mode));
return fixed_mode; return fixed_mode;
} }
...@@ -262,9 +262,9 @@ intel_panel_vbt_fixed_mode(struct intel_connector *connector) ...@@ -262,9 +262,9 @@ intel_panel_vbt_fixed_mode(struct intel_connector *connector)
fixed_mode->type |= DRM_MODE_TYPE_PREFERRED; fixed_mode->type |= DRM_MODE_TYPE_PREFERRED;
drm_dbg_kms(&dev_priv->drm, "[CONNECTOR:%d:%s] using mode from VBT: ", drm_dbg_kms(&dev_priv->drm, "[CONNECTOR:%d:%s] using mode from VBT: " DRM_MODE_FMT "\n",
connector->base.base.id, connector->base.name); connector->base.base.id, connector->base.name,
drm_mode_debug_printmodeline(fixed_mode); DRM_MODE_ARG(fixed_mode));
info->width_mm = fixed_mode->width_mm; info->width_mm = fixed_mode->width_mm;
info->height_mm = fixed_mode->height_mm; info->height_mm = fixed_mode->height_mm;
......
...@@ -1145,8 +1145,8 @@ intel_tv_get_config(struct intel_encoder *encoder, ...@@ -1145,8 +1145,8 @@ intel_tv_get_config(struct intel_encoder *encoder,
intel_tv_mode_to_mode(&mode, &tv_mode); intel_tv_mode_to_mode(&mode, &tv_mode);
drm_dbg_kms(&dev_priv->drm, "TV mode:\n"); drm_dbg_kms(&dev_priv->drm, "TV mode: " DRM_MODE_FMT "\n",
drm_mode_debug_printmodeline(&mode); DRM_MODE_ARG(&mode));
intel_tv_scale_mode_horiz(&mode, hdisplay, intel_tv_scale_mode_horiz(&mode, hdisplay,
xpos, mode.hdisplay - xsize - xpos); xpos, mode.hdisplay - xsize - xpos);
...@@ -1250,8 +1250,8 @@ intel_tv_compute_config(struct intel_encoder *encoder, ...@@ -1250,8 +1250,8 @@ intel_tv_compute_config(struct intel_encoder *encoder,
tv_conn_state->bypass_vfilter = false; tv_conn_state->bypass_vfilter = false;
} }
drm_dbg_kms(&dev_priv->drm, "TV mode:\n"); drm_dbg_kms(&dev_priv->drm, "TV mode: " DRM_MODE_FMT "\n",
drm_mode_debug_printmodeline(adjusted_mode); DRM_MODE_ARG(adjusted_mode));
/* /*
* The pipe scanline counter behaviour looks as follows when * The pipe scanline counter behaviour looks as follows when
...@@ -1806,8 +1806,8 @@ intel_tv_get_modes(struct drm_connector *connector) ...@@ -1806,8 +1806,8 @@ intel_tv_get_modes(struct drm_connector *connector)
*/ */
intel_tv_mode_to_mode(mode, tv_mode); intel_tv_mode_to_mode(mode, tv_mode);
if (count == 0) { if (count == 0) {
drm_dbg_kms(&dev_priv->drm, "TV mode:\n"); drm_dbg_kms(&dev_priv->drm, "TV mode: " DRM_MODE_FMT "\n",
drm_mode_debug_printmodeline(mode); DRM_MODE_ARG(mode));
} }
intel_tv_scale_mode_horiz(mode, input->w, 0, 0); intel_tv_scale_mode_horiz(mode, input->w, 0, 0);
intel_tv_scale_mode_vert(mode, input->h, 0, 0); intel_tv_scale_mode_vert(mode, input->h, 0, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment