]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/vrr: Move the TGL SCL mangling of vmin/vmax/flipline deeper
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 17 Sep 2025 20:34:46 +0000 (23:34 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 18 Sep 2025 20:43:07 +0000 (23:43 +0300)
commita58b9e3d6e6777fc52040fcd93a46d107f87c7ec
tree41c6c3af196e4a37f1c3d7a3a06b60e6277944c6
parent1e2266dc68ae3d8c5017f07d2002a2ba79549f01
drm/i915/vrr: Move the TGL SCL mangling of vmin/vmax/flipline deeper

Currently our crtc_state->vrr.{vmin.vmax,flipline} are mangled on
TGL to account for the SCL delay (the hardware requires this mangling
or the actual vtotals will become incorrect). Unfortunately this
means that one can't simply use these values directly in many places,
and instead we always have to go through functions that undo the
damage first. This is all rather fragile.

Simplify our lives a bit by hiding this mangling deeper inside
the low level VRR code, leaving the number stored in the crtc
state actually something that humans can use.

This does introduce a dependdency as intel_vrr_get_config()
will now need to know the SCL value, which is read out in
intel_get_transcoder_timings(). I suppose we could simply
duplicate the SCL readout in both places should this become
a real hinderance. For now just leave a note around the
intel_get_transcoder_timings() call to remind us.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250917203446.14374-6-ville.syrjala@linux.intel.com
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_vrr.c