All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 09/10] drm/i915/frontbuffer: Fix intel_frontbuffer lifetime handling
Date: Fri, 7 Nov 2025 20:45:26 +0200	[thread overview]
Message-ID: <aQ4-RoNa8rkf4G_D@intel.com> (raw)
In-Reply-To: <aQywXhRtluWSFN8P@intel.com>

On Thu, Nov 06, 2025 at 04:27:42PM +0200, Ville Syrjälä wrote:
> On Thu, Nov 06, 2025 at 03:48:25PM +0200, Jani Nikula wrote:
> > On Wed, 29 Oct 2025, Jani Nikula <jani.nikula@intel.com> wrote:
> > > On Wed, 29 Oct 2025, Jani Nikula <jani.nikula@intel.com> wrote:
> > >> On Thu, 16 Oct 2025, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> > >>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >>>
> > >>> The current attempted split between xe/i915 vs. display
> > >>> for intel_frontbuffer is a mess:
> > >>> - the i915 rcu leaks through the interface to the display side
> > >>> - the obj->frontbuffer write-side is now protected by a display
> > >>>   specific spinlock even though the actual obj->framebuffer
> > >>>   pointer lives in a i915 specific structure
> > >>> - the kref is getting poked directly from both sides
> > >>> - i915_active is still on the display side
> > >>>
> > >>> Clean up the mess by moving everything about the frontbuffer
> > >>> lifetime management to the i915/xe side:
> > >>> - the rcu usage is now completely contained in i915
> > >>> - frontbuffer_lock is moved into i915
> > >>> - kref is on the i915/xe side (xe needs the refcount as well
> > >>>   due to intel_frontbuffer_queue_flush()->intel_frontbuffer_ref())
> > >>> - the bo (and its refcounting) is no longer on the display side
> > >>> - i915_active is contained in i915
> > >>>
> > >>> I was pondering whether we could do this in some kind of smaller
> > >>> steps, and perhaps we could, but it would probably have to start
> > >>> with a bunch of reverts (which for sure won't go cleanly anymore).
> > >>> So not convinced it's worth the hassle.
> > >>
> > >> It's a PITA to review, that's for sure. :p
> > >>
> > >> I'm not particularly fond of embedding struct intel_frontbuffer inside
> > >> struct i915_frontbuffer and struct xe_frontbuffer, because it means i915
> > >> and xe will need to know the struct intel_frontbuffer definition. If we
> > >> can't live with the embedding long term, we'll probably need opaque
> > >> pointers back and forth.
> > >>
> > >> That said, I think the overall change here is net positive, and makes
> > >> life much easier. We don't have to fix everything at once, so let's go
> > >> with this.
> > >>
> > >> I didn't spot any obvious issues, but my confidence level with the
> > >> review is super low. :(
> > >>
> > >> I guess the alternatives are to just go with that, trusting CI, or give
> > >> me more time to review. I'm fine either way, as I can trust you to step
> > >> up if it goes crashing down. ;)
> > >
> > > One approach is to send 1-8 first, get CI, get them merged, and then do
> > > 9-10 separately, to get separate CI. Maybe? *shrug*
> > 
> > Any conclusions on this? Just merge the whole thing as-is rather than
> > let it go stale...?
> 
> I think we could just merge as is. Pretty sure I didn't have any
> real functional changes in there.

Merged the whole thing. Thanks for the review.

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2025-11-07 18:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16 18:53 [PATCH v2 00/10] drm/i915/frontbuffer: Fix the intel_frontbuffer lifetime mess Ville Syrjala
2025-10-16 18:53 ` [PATCH v2 01/10] drm/i915/overlay: Drop the DIRTYFB flush Ville Syrjala
2025-10-16 18:54 ` [PATCH v2 02/10] drm/i915/overlay: Switch to intel_frontbuffer_flip() Ville Syrjala
2025-10-16 18:54 ` [PATCH v2 03/10] drm/i915/frontbuffer: Nuke intel_frontbuffer_flip_{prepare, complete}() Ville Syrjala
2025-10-29 13:32   ` [PATCH v2 03/10] drm/i915/frontbuffer: Nuke intel_frontbuffer_flip_{prepare,complete}() Jani Nikula
2025-10-29 13:32   ` Jani Nikula
2025-10-16 18:54 ` [PATCH v2 04/10] drm/i915/frontbuffer: Turn intel_bo_flush_if_display() into a frontbuffer operation Ville Syrjala
2025-10-29 13:33   ` Jani Nikula
2025-10-16 18:54 ` [PATCH v2 05/10] drm/i915/frontbuffer: Handle the dirtyfb cache flush inside intel_frontbuffer_flush() Ville Syrjala
2025-10-29 13:34   ` Jani Nikula
2025-10-16 18:54 ` [PATCH v2 06/10] drm/i915/frontbuffef: Split fb_tracking.lock into two Ville Syrjala
2025-10-29 13:35   ` Jani Nikula
2025-10-16 18:54 ` [PATCH v2 07/10] drm/i915/frontbuffer: Extract intel_frontbuffer_ref() Ville Syrjala
2025-10-29 13:35   ` Jani Nikula
2025-10-16 18:54 ` [PATCH v2 08/10] drm/i915/frontbuffer: Add intel_frontbuffer::display Ville Syrjala
2025-10-29 13:36   ` Jani Nikula
2025-10-29 13:37   ` Jani Nikula
2025-10-16 18:54 ` [PATCH v2 09/10] drm/i915/frontbuffer: Fix intel_frontbuffer lifetime handling Ville Syrjala
2025-10-29 13:51   ` Jani Nikula
2025-10-29 15:00     ` Jani Nikula
2025-11-06 13:48       ` Jani Nikula
2025-11-06 14:27         ` Ville Syrjälä
2025-11-07 18:45           ` Ville Syrjälä [this message]
2025-10-16 18:54 ` [PATCH v2 10/10] drm/i915/gem: s/i915_gem_object_get_frontbuffer/i915_gem_object_frontbuffer_lookup/ Ville Syrjala
2025-10-29 13:37   ` Jani Nikula
2025-10-16 19:00 ` ✗ CI.checkpatch: warning for drm/i915/frontbuffer: Fix the intel_frontbuffer lifetime mess (rev2) Patchwork
2025-10-16 19:01 ` ✓ CI.KUnit: success " Patchwork
2025-10-16 19:17 ` ✗ CI.checksparse: warning " Patchwork
2025-10-16 21:49 ` ✓ i915.CI.BAT: success " Patchwork
2025-10-17  8:34 ` ✗ i915.CI.Full: failure " Patchwork
2025-10-17 16:49 ` ✗ Xe.CI.Full: " 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=aQ4-RoNa8rkf4G_D@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.