From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>,
"maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [Intel-xe] [PATCH] drm/xe/display: Do not use i915 frontbuffer tracking implementation
Date: Thu, 27 Apr 2023 11:46:15 +0000 [thread overview]
Message-ID: <ff5d63dd814c3d1dbd6706ff79f5147799d1cbe2.camel@intel.com> (raw)
In-Reply-To: <ZAnSVOrUThPUSBes@intel.com>
On Thu, 2023-03-09 at 14:34 +0200, Ville Syrjälä wrote:
> On Thu, Mar 09, 2023 at 12:09:55PM +0100, Maarten Lankhorst wrote:
> >
> > On 2023-03-09 12:04, Hogander, Jouni wrote:
> > > On Mon, 2023-03-06 at 22:58 +0200, Ville Syrjälä wrote:
> > > > On Mon, Mar 06, 2023 at 09:23:50PM +0100, Maarten Lankhorst
> > > > wrote:
> > > > > Hey,
> > > > >
> > > > > On 2023-03-06 16:23, Souza, Jose wrote:
> > > > > > On Mon, 2023-03-06 at 15:16 +0100, Maarten Lankhorst wrote:
> > > > > > > As a fallback if we decide not to merge the frontbuffer
> > > > > > > tracking, allow
> > > > > > > i915 to keep its own implementation, and do the right
> > > > > > > thing in
> > > > > > > Xe.
> > > > > > >
> > > > > > > The frontbuffer tracking for Xe is still done per-fb,
> > > > > > > while
> > > > > > > i915 can
> > > > > > > keep doing the weird intel_frontbuffer + i915_active
> > > > > > > thing
> > > > > > > without
> > > > > > > blocking Xe.
> > > > > > Please also disable PSR and FBC with this or at least add a
> > > > > > way
> > > > > > for users to disable those features.
> > > > > > Without frontbuffer tracker those two features will break
> > > > > > in some
> > > > > > cases.
> > > > > FBC and PSR work completely as expected. I don't remove
> > > > > frontbuffer
> > > > > tracking; I only remove the GEM parts.
> > > > >
> > > > > Explicit invalidation using pageflip or CPU rendering +
> > > > > DirtyFB
> > > > > continue
> > > > > to work, as I validated on my laptop with FBC.
> > > > Neither of which are relevant to the removal of the gem hooks.
> > > >
> > > > Like I already said ~10 times in the last meeting, we need a
> > > > proper
> > > > testcase. Here's a rough idea what it should do:
> > > >
> > > > prepare a batch with
> > > > 1. spinner
> > > > 2. something that clobbers the fb
> > > >
> > > > Then
> > > > 1. grab reference crc
> > > > 2. execbuffer
> > > > 3. dirtyfb
> > > > 4. wait long enough for fbc to recompress
> > > > 5. terminate spinner
> > > > 6. gem_sync
> > > > 7. grab crc and compare with reference
> > > >
> > > > No idea what the current status of PSR+CRC is, so not sure
> > > > whether we can actually test PSR or not.
> > > >
> > > CRC calculation doesn't work with PSR currently. PSR is disabled
> > > if CRC
> > > capture is requested.
> > >
> > > Are we supposed to support frontbuffer rendering using GPU?
> >
> > No other driver does that.
>
> Every driver does that when you run X w/o a compositor. Assuming
> there is an actual GPU in there.
>
> > It's fine if DirtyFB hangs instead until the
> > job it waits on completes.
>
> No one tried to make it just wait for the fence(s) w/o doing
> a full blown atomic commit. It might work, but might also
> still suck too much. I guess depends on how overloaded the GPU
> is.
>
> What we could do is do a frontbuffer invalidate on dirtyfb
> invocation, and then once the fence(s) signal we do a frontbuffer
> flush. That would most closely match the gem hook behaviour, except
> the invalidate comes in a bit later. The alternative would be to
> skip the invalidate, which should still guarantee correctness in
> the end, just with possibly jankier interactivity.
>
I have implemented this approach here:
https://patchwork.freedesktop.org/series/116620/
Review/comments are welcome.
BR,
Jouni Högander
next prev parent reply other threads:[~2023-04-27 11:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 14:16 [Intel-gfx] [PATCH] drm/xe/display: Do not use i915 frontbuffer tracking implementation Maarten Lankhorst
2023-03-06 15:23 ` [Intel-gfx] [Intel-xe] " Souza, Jose
2023-03-06 19:15 ` Rodrigo Vivi
2023-03-06 20:23 ` Maarten Lankhorst
2023-03-06 20:58 ` Ville Syrjälä
2023-03-08 12:47 ` Maarten Lankhorst
2023-03-08 13:36 ` Ville Syrjälä
2023-03-08 14:29 ` Maarten Lankhorst
2023-03-08 14:36 ` Ville Syrjälä
2023-03-09 11:04 ` Hogander, Jouni
2023-03-09 11:09 ` Maarten Lankhorst
2023-03-09 12:34 ` Ville Syrjälä
2023-04-27 11:46 ` Hogander, Jouni [this message]
2023-03-06 20:19 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " 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=ff5d63dd814c3d1dbd6706ff79f5147799d1cbe2.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.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