From: Jani Nikula <jani.nikula@intel.com>
To: Manasi Navare <navaremanasi@google.com>
Cc: Juasheem Sultan <jdsultan@google.com>,
intel-gfx@lists.freedesktop.org, intel_xe@lists.freedesktop.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Drew Davenport <ddavenport@google.com>,
Sean Paul <seanpaul@google.com>,
Samuel Jacob <samjaco@google.com>,
Rajat Jain <rajatja@google.com>,
ville.syrjala@linux.intel.com
Subject: Re: [RFC PATCH v3 2/2] drm/i915/display: Synchronize crtc_state for initial commit
Date: Tue, 03 Mar 2026 11:44:32 +0200 [thread overview]
Message-ID: <bc56a6bc956aaef264946d6fe68296a564ba231d@intel.com> (raw)
In-Reply-To: <CAMNLLoSf4gyiQpi7D=yGwcGkR7X9EZqXmP+CJKrFcgjkDhPXQA@mail.gmail.com>
On Mon, 02 Mar 2026, Manasi Navare <navaremanasi@google.com> wrote:
> Hi @Jani Nikula <jani.nikula@intel.com> :
>
> Before we file a fdo issue with complete debug logs to understand what the
> FW is setting up the HW at, I wanted to understand a few more things in
> terms of the final solution:
>
> - Ideally if the FW is setting up the initial state or programming the HW
> registers for the initial splashscreen, for the initial commit when we do
> the HW state readout, it should have the HW values programmed to some mode
> parameters
> - Then like you suggested, we would need to read out the HW state
> - Could you elaborate on "1) reading out the hw state to sw
> state? - Does that mean do the HW state readout and compute
> pipe_config/crtc_state for that?
>
> - Then add some sanitization to have this computed pipe_config that will be
> programmed to the HW
> - Then ensure that both are same so that the intel fastset logic can apply
> fastset?
Let's start with the regular modesets, ignoring the probe for a bit.
For every modeset, we have the old (current) state and the new
state. These are both software states. We compare the states to
determine whether a full modeset is required or not. This is mostly
dependent on what the hardware can change on the fly. If we can bypass a
full modeset, we call it a fastset.
We write either the full new state (modeset) or just the changes
(fastset) to the hardware, and the new state becomes the old (current)
state.
After that, we read back the hardware state to verify we did everything
right. This is the state checker. The comparison is done using the same
functions as for determining whether a full modeset is required.
Rinse and repeat.
At probe, we obviously don't have the old (current) software state. We
create it by reading out the hardware state, using the same mechanisms
as in the state checker. We call it the inherited state. We do the
initial commit with that.
Then we arrive at the first userspace/client initiated modeset. It goes
through the same paths as the regular modeset. If we can get away with a
fastset, we call it fastboot i.e. no full modeset at boot.
That's the basic idea, anyway. Now the caveats.
Sometimes GOP (or whatever pre-os) ends up using slightly different
parameters for the same mode than the driver. Or we might not be able to
read out everything. Or we lose accuracy in the sw->hw->sw changes. Or
the pre-os enables stuff that it doesn't even use or care about. We
wiggle around those issues using sanitization or ignoring small
differences or simply bypassing some parts on the first modeset.
Obviously, if there are gaps in the state readout in the first place,
the inherited state will be incomplete, and likely leads to a full
modeset. (And we also miss out on the state verification of those
parts.)
If the GOP (or pre-os) sets a mode, and the first modeset requests a
completely different mode, you can't have fastboot either.
The thing we absolutely can't do is what patch 2 here does. We can't
simply copy over stuff from one state to another, and hope it works. It
might appear to work by coincidence in some cases, but it is all
wrong. It ignores the computed modeset parameters for the new state,
even if userspace tries a completely different mode. It bypasses the
comparison for whether a full modeset is needed or not. It's not
discretional, it depends on what the hardware can change on the fly, and
it's undocumented at best what happens when you try to change such
things without a modeset.
You can do a lot of debugging based on just looking at the debug output
for the state comparison where we decide a fastset (and in this case
fastboot) is not possible. Where does the differing info come from? Is
there a readout in place? Is something completely zero in the readout,
or are there minor differences? Do you get fastsets on the second and
subsequent regular modesets? Etc. Etc.
HTH,
Jani.
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-03-03 9:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 20:46 [RFC PATCH v3 0/2] Enable seamless boot (fastboot) for PTL Juasheem Sultan
2026-01-21 20:46 ` [RFC PATCH v3 1/2] drm/xe/display: Fix reading the framebuffer from stolen memory Juasheem Sultan
2026-01-21 20:46 ` [RFC PATCH v3 2/2] drm/i915/display: Synchronize crtc_state for initial commit Juasheem Sultan
2026-01-21 22:02 ` Manasi Navare
2026-01-22 15:29 ` Jani Nikula
2026-01-27 8:05 ` Juasheem Sultan
2026-02-03 18:18 ` Manasi Navare
2026-02-03 19:47 ` Jani Nikula
2026-02-03 21:03 ` Manasi Navare
2026-03-03 0:43 ` Manasi Navare
2026-03-03 9:44 ` Jani Nikula [this message]
2026-03-04 3:30 ` Juasheem Sultan
2026-01-21 21:29 ` ✗ Fi.CI.BUILD: failure for Enable seamless boot (fastboot) for PTL Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc56a6bc956aaef264946d6fe68296a564ba231d@intel.com \
--to=jani.nikula@intel.com \
--cc=ddavenport@google.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel_xe@lists.freedesktop.org \
--cc=jdsultan@google.com \
--cc=navaremanasi@google.com \
--cc=rajatja@google.com \
--cc=rodrigo.vivi@intel.com \
--cc=samjaco@google.com \
--cc=seanpaul@google.com \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox