]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/i915/dsb: Add support for triggering VRR push with DSB
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 16 Jan 2025 20:16:36 +0000 (22:16 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 21 Jan 2025 15:12:44 +0000 (17:12 +0200)
commitaee21ab36e142c10fa6b56694b9d160fb5a49abb
tree357ce6a52d566621347ede00ad188c577ab96d8f
parent42fdbe94b69ceed77622e58b33701546f49283a4
drm/i915/dsb: Add support for triggering VRR push with DSB

We have at least two options for how to do the
TRANS_PUSH_SEND + commit completion signalling
with the DSB:

Option A)
 1. trigger TRANS_PUSH_SEND
 2. wait for "safe window"
 3. signal the interrupt

In this cases step 2 should not do anything if we were already
between vmin and vmax decision boundaries. Otherwise we'll wait
until the next start of the vblank period.

Option B)
 1. wait for "safe window"
 2. trigger TRANS_PUSH_SEND
 3. signal the interrupt

This option is perhaps a bit less racy, but if we do somehow
screw up and the wait is a nop but the push gets deferred
until the next frame then we'll end up completing the commit
a frame too early.

So for now I'm leaning towards option A since losing the race
won't have any drastic consequences. To deal with the race we
can give the DSB a bit more time to start step 2 before the
hardware has started the vblank termination properly. Often
times it seems to be fast enough to make it in time even without
any extra vblank delay (the push is issued somewhere within a
scanline and it latches on the next scanline).

v2: Use intel_vrr_possible() to determine if we need some
    vblank delay (also avoids adding it for DSI which doens't
    actually program the transcoder registers correctly for it)

Cc: Paz Zcharya <pazz@chromium.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116201637.22486-8-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_display.c