Commit 7a6bf54c authored by Ankit Nautiyal's avatar Ankit Nautiyal
Browse files

drm/i915/display: Introduce transcoder_has_vrr() helper



Introduce a new helper to check transcoder_has_vrr() and use
that to exclude transcoders which do not support VRR.

v2: Include HAS_VRR into the helper. (Ville)
v3: Drop the usage in places where not applicable. (Ville)

Signed-off-by: default avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/20250327144629.648306-2-ankit.k.nautiyal@intel.com
parent 61601771
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2625,6 +2625,15 @@ void intel_cpu_transcoder_set_m2_n2(struct intel_crtc *crtc,
		      PIPE_LINK_N2(display, transcoder));
}

static bool
transcoder_has_vrr(const struct intel_crtc_state *crtc_state)
{
	struct intel_display *display = to_intel_display(crtc_state);
	enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;

	return HAS_VRR(display) && !transcoder_is_dsi(cpu_transcoder);
}

static void intel_set_transcoder_timings(const struct intel_crtc_state *crtc_state)
{
	struct intel_display *display = to_intel_display(crtc_state);
@@ -3908,7 +3917,7 @@ static bool hsw_get_pipe_config(struct intel_crtc *crtc,
	    DISPLAY_VER(display) >= 11)
		intel_get_transcoder_timings(crtc, pipe_config);

	if (HAS_VRR(display) && !transcoder_is_dsi(pipe_config->cpu_transcoder))
	if (transcoder_has_vrr(pipe_config))
		intel_vrr_get_config(pipe_config);

	intel_get_pipe_src_size(crtc, pipe_config);