Print Vrr mode along with other vrr members in crtc_state dump. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@xxxxxxxxx> --- .../drm/i915/display/intel_crtc_state_dump.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c index bc9e761a3d1a..bd337ce8d4ad 100644 --- a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c +++ b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c @@ -181,6 +181,20 @@ vlv_dump_csc(struct drm_printer *p, const char *name, csc->coeff[3 * i + 2]); } +static const char * const vrrtg_mode_str[] = { + [INTEL_VRRTG_MODE_NONE] = "none", + [INTEL_VRRTG_MODE_VRR] = "vrr", + [INTEL_VRRTG_MODE_CMRR] = "cmrr", +}; + +static const char *intel_vrrtg_mode_name(enum intel_vrrtg_mode mode) +{ + if (mode >= ARRAY_SIZE(vrrtg_mode_str)) + return "invalid"; + + return vrrtg_mode_str[mode]; +} + void intel_crtc_state_dump(const struct intel_crtc_state *pipe_config, struct intel_atomic_state *state, const char *context) @@ -296,8 +310,9 @@ void intel_crtc_state_dump(const struct intel_crtc_state *pipe_config, intel_dump_buffer("ELD: ", pipe_config->eld, drm_eld_size(pipe_config->eld)); - drm_printf(&p, "vrr: %s, vmin: %d, vmax: %d, pipeline full: %d, guardband: %d flipline: %d, vmin vblank: %d, vmax vblank: %d\n", + drm_printf(&p, "vrr: %s, mode: %s vmin: %d, vmax: %d, pipeline full: %d, guardband: %d flipline: %d, vmin vblank: %d, vmax vblank: %d\n", str_yes_no(intel_vrrtg_is_enabled(pipe_config)), + intel_vrrtg_mode_name(pipe_config->vrr.mode), pipe_config->vrr.vmin, pipe_config->vrr.vmax, pipe_config->vrr.pipeline_full, pipe_config->vrr.guardband, pipe_config->vrr.flipline, -- 2.45.2