All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 05/10] drm/i915/frontbuffer: Handle the dirtyfb cache flush inside intel_frontbuffer_flush()
Date: Wed, 29 Oct 2025 15:34:41 +0200	[thread overview]
Message-ID: <563c7783ed3df2e81202be6e91eb846fcc022aea@intel.com> (raw)
In-Reply-To: <20251016185408.22735-6-ville.syrjala@linux.intel.com>

On Thu, 16 Oct 2025, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> intel_bo_frontbuffer_flush_for_display() is a bit too low level
> to be direclty in the high level dirtyfb code. Move the calls

*directly

> into intel_frontbuffer_flush().
>
> There is a slight beahavioural change here in that we now skip

*behavioural

> the flush if the bo is not a current scanout buffer (front->bits
> == 0). But that is fine as the flush will eventually happen via
> the fb pinning code if/when the bo becomes a scanout buffer again.
>
> Acked-by: Jani Nikula <jani.nikula@intel.com>

Upgrade to

Reviewed-by: Jani Nikula <jani.nikula@intel.com>


> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_fb.c          | 1 -
>  drivers/gpu/drm/i915/display/intel_frontbuffer.c | 4 +++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
> index ab301c657395..088e194ecf69 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb.c
> +++ b/drivers/gpu/drm/i915/display/intel_fb.c
> @@ -2194,7 +2194,6 @@ static int intel_user_framebuffer_dirty(struct drm_framebuffer *fb,
>  	return ret;
>  
>  flush:
> -	intel_bo_frontbuffer_flush_for_display(front);
>  	intel_frontbuffer_flush(front, ORIGIN_DIRTYFB);
>  	return ret;
>  }
> diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> index 5562801d2ea3..bdf8bfa7deb9 100644
> --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> @@ -150,6 +150,9 @@ void __intel_fb_flush(struct intel_frontbuffer *front,
>  {
>  	struct intel_display *display = to_intel_display(front->obj->dev);
>  
> +	if (origin == ORIGIN_DIRTYFB)
> +		intel_bo_frontbuffer_flush_for_display(front);
> +
>  	if (origin == ORIGIN_CS) {
>  		spin_lock(&display->fb_tracking.lock);
>  		/* Filter out new bits since rendering started. */
> @@ -167,7 +170,6 @@ static void intel_frontbuffer_flush_work(struct work_struct *work)
>  	struct intel_frontbuffer *front =
>  		container_of(work, struct intel_frontbuffer, flush_work);
>  
> -	intel_bo_frontbuffer_flush_for_display(front);
>  	intel_frontbuffer_flush(front, ORIGIN_DIRTYFB);
>  	intel_frontbuffer_put(front);
>  }

-- 
Jani Nikula, Intel

  reply	other threads:[~2025-10-29 14:58 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 [this message]
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ä
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=563c7783ed3df2e81202be6e91eb846fcc022aea@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --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 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.