Skip to content

Commit f2efcd9

Browse files
committed
drm/i915/display: clean up DP Adaptive Sync SDP state mismatch logging
Pass the drm_printer from intel_pipe_config_compare(), and use it for logging, along with pipe_config_mismatch(), to simplify and unify. While at it, differentiate the VSC and AS SDP log texts from each other. Reviewed-by: Mitul Golani <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Jani Nikula <[email protected]>
1 parent d82bb73 commit f2efcd9

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5216,7 +5216,7 @@ pipe_config_dp_vsc_sdp_mismatch(struct drm_printer *p, bool fastset,
52165216
const struct drm_dp_vsc_sdp *a,
52175217
const struct drm_dp_vsc_sdp *b)
52185218
{
5219-
pipe_config_mismatch(p, fastset, crtc, name, "dp sdp");
5219+
pipe_config_mismatch(p, fastset, crtc, name, "dp vsc sdp");
52205220

52215221
drm_printf(p, "expected:\n");
52225222
drm_dp_vsc_sdp_log(p, a);
@@ -5225,27 +5225,18 @@ pipe_config_dp_vsc_sdp_mismatch(struct drm_printer *p, bool fastset,
52255225
}
52265226

52275227
static void
5228-
pipe_config_dp_as_sdp_mismatch(struct drm_i915_private *i915,
5229-
bool fastset, const char *name,
5228+
pipe_config_dp_as_sdp_mismatch(struct drm_printer *p, bool fastset,
5229+
const struct intel_crtc *crtc,
5230+
const char *name,
52305231
const struct drm_dp_as_sdp *a,
52315232
const struct drm_dp_as_sdp *b)
52325233
{
5233-
struct drm_printer p;
5234+
pipe_config_mismatch(p, fastset, crtc, name, "dp as sdp");
52345235

5235-
if (fastset) {
5236-
p = drm_dbg_printer(&i915->drm, DRM_UT_KMS, NULL);
5237-
5238-
drm_printf(&p, "fastset requirement not met in %s dp sdp\n", name);
5239-
} else {
5240-
p = drm_err_printer(&i915->drm, NULL);
5241-
5242-
drm_printf(&p, "mismatch in %s dp sdp\n", name);
5243-
}
5244-
5245-
drm_printf(&p, "expected:\n");
5246-
drm_dp_as_sdp_log(&p, a);
5247-
drm_printf(&p, "found:\n");
5248-
drm_dp_as_sdp_log(&p, b);
5236+
drm_printf(p, "expected:\n");
5237+
drm_dp_as_sdp_log(p, a);
5238+
drm_printf(p, "found:\n");
5239+
drm_dp_as_sdp_log(p, b);
52495240
}
52505241

52515242
/* Returns the length up to and including the last differing byte */
@@ -5494,7 +5485,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
54945485
#define PIPE_CONF_CHECK_DP_AS_SDP(name) do { \
54955486
if (!intel_compare_dp_as_sdp(&current_config->infoframes.name, \
54965487
&pipe_config->infoframes.name)) { \
5497-
pipe_config_dp_as_sdp_mismatch(dev_priv, fastset, __stringify(name), \
5488+
pipe_config_dp_as_sdp_mismatch(&p, fastset, crtc, __stringify(name), \
54985489
&current_config->infoframes.name, \
54995490
&pipe_config->infoframes.name); \
55005491
ret = false; \

0 commit comments

Comments
 (0)