From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 02/19] drm/i915/overlay: Track current frontbuffer_bits
Date: Wed, 25 Feb 2026 12:38:13 +0200 [thread overview]
Message-ID: <bc1719a455be6d86b6dfd37c573824f2f128625a@intel.com> (raw)
In-Reply-To: <20260218152806.18885-3-ville.syrjala@linux.intel.com>
On Wed, 18 Feb 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Store the current frontbuffer_bits in the overlay data. The
> main benefit here is that we get rid of the 'crtc->pipe'
> usage from intel_overlay_flip_prepare() which will have to
> move to the i915 side of the parent vs. display driver split.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_overlay.c | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c
> index 33a38d116c90..dd04e75fe3a7 100644
> --- a/drivers/gpu/drm/i915/display/intel_overlay.c
> +++ b/drivers/gpu/drm/i915/display/intel_overlay.c
> @@ -205,6 +205,7 @@ struct intel_overlay {
> struct drm_i915_gem_object *reg_bo;
> struct overlay_registers __iomem *regs;
> u32 flip_addr;
> + u32 frontbuffer_bits;
> /* flip handling */
> struct i915_active last_flip;
> void (*flip_complete)(struct intel_overlay *ovl);
> @@ -255,7 +256,8 @@ alloc_request(struct intel_overlay *overlay, void (*fn)(struct intel_overlay *))
> }
>
> /* overlay needs to be disable in OCMD reg */
> -static int intel_overlay_on(struct intel_overlay *overlay)
> +static int intel_overlay_on(struct intel_overlay *overlay,
> + u32 frontbuffer_bits)
> {
> struct intel_display *display = overlay->display;
> struct i915_request *rq;
> @@ -274,6 +276,7 @@ static int intel_overlay_on(struct intel_overlay *overlay)
> }
>
> overlay->active = true;
> + overlay->frontbuffer_bits = frontbuffer_bits;
>
> if (display->platform.i830)
> i830_overlay_clock_gating(display, false);
> @@ -293,7 +296,6 @@ static void intel_overlay_flip_prepare(struct intel_overlay *overlay,
> struct i915_vma *vma)
> {
> struct intel_display *display = overlay->display;
> - enum pipe pipe = overlay->crtc->pipe;
> struct intel_frontbuffer *frontbuffer = NULL;
>
> drm_WARN_ON(display->drm, overlay->old_vma);
> @@ -302,7 +304,7 @@ static void intel_overlay_flip_prepare(struct intel_overlay *overlay,
> frontbuffer = intel_frontbuffer_get(intel_bo_to_drm_bo(vma->obj));
>
> intel_frontbuffer_track(overlay->frontbuffer, frontbuffer,
> - INTEL_FRONTBUFFER_OVERLAY(pipe));
> + overlay->frontbuffer_bits);
>
> if (overlay->frontbuffer)
> intel_frontbuffer_put(overlay->frontbuffer);
> @@ -364,7 +366,7 @@ static void intel_overlay_release_old_vma(struct intel_overlay *overlay)
> if (drm_WARN_ON(display->drm, !vma))
> return;
>
> - intel_frontbuffer_flip(display, INTEL_FRONTBUFFER_OVERLAY(overlay->crtc->pipe));
> + intel_frontbuffer_flip(display, overlay->frontbuffer_bits);
>
> i915_vma_unpin(vma);
> i915_vma_put(vma);
> @@ -382,9 +384,8 @@ static void intel_overlay_off_tail(struct intel_overlay *overlay)
>
> intel_overlay_release_old_vma(overlay);
>
> - overlay->crtc->overlay = NULL;
> - overlay->crtc = NULL;
The movement of these to intel_overlay_switch_off() seems like an
unrelated change. Maybe mention in the commit message at a minimum.
BR,
Jani.
> overlay->active = false;
> + overlay->frontbuffer_bits = 0;
>
> if (display->platform.i830)
> i830_overlay_clock_gating(display, true);
> @@ -506,6 +507,7 @@ void intel_overlay_reset(struct intel_display *display)
> overlay->old_yscale = 0;
> overlay->crtc = NULL;
> overlay->active = false;
> + overlay->frontbuffer_bits = 0;
> }
>
> static int packed_depth_bytes(u32 format)
> @@ -836,7 +838,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
> OCONF_PIPE_A : OCONF_PIPE_B;
> iowrite32(oconfig, ®s->OCONFIG);
>
> - ret = intel_overlay_on(overlay);
> + ret = intel_overlay_on(overlay, INTEL_FRONTBUFFER_OVERLAY(pipe));
> if (ret != 0)
> goto out_unpin;
> }
> @@ -924,6 +926,9 @@ int intel_overlay_switch_off(struct intel_overlay *overlay)
>
> iowrite32(0, &overlay->regs->OCMD);
>
> + overlay->crtc->overlay = NULL;
> + overlay->crtc = NULL;
> +
> return intel_overlay_off(overlay);
> }
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-02-25 10:38 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 15:27 [PATCH 00/19] drm/i915/overlay: Convert to parent interface Ville Syrjala
2026-02-18 15:27 ` [PATCH 01/19] drm/i915/overlay: Remove GPU hang snapshot stuff Ville Syrjala
2026-02-18 15:27 ` [PATCH 02/19] drm/i915/overlay: Track current frontbuffer_bits Ville Syrjala
2026-02-25 10:38 ` Jani Nikula [this message]
2026-02-18 15:27 ` [PATCH 03/19] drm/i915/overlay: Extract i915_overlay_is_active() Ville Syrjala
2026-02-18 15:27 ` [PATCH 04/19] drm/i915/overlay: Remove redundant overlay->active Ville Syrjala
2026-02-18 15:27 ` [PATCH 05/19] drm/i915/overlay: Relocate the underrun check Ville Syrjala
2026-02-18 15:27 ` [PATCH 06/19] drm/i915/overlay: Introduce i915_overlay_obj_lookup() Ville Syrjala
2026-02-25 9:40 ` Jani Nikula
2026-02-25 10:06 ` Ville Syrjälä
2026-02-18 15:27 ` [PATCH 07/19] drm/i915/overlay: Use struct drm_gem_object as the type Ville Syrjala
2026-02-18 15:27 ` [PATCH 08/19] drm/i915/overlay: Extract i915_overlay_reset() Ville Syrjala
2026-02-18 15:27 ` [PATCH 09/19] drm/i915/overlay: Extract i915_overlay_setup() Ville Syrjala
2026-02-18 15:27 ` [PATCH 10/19] drm/i915/overlay: Extract i915_overlay_cleanup() Ville Syrjala
2026-02-18 15:27 ` [PATCH 11/19] drm/i915/overlay: Abstract buffer (un)pinning Ville Syrjala
2026-02-18 15:27 ` [PATCH 12/19] drm/i915/overlay: Rename low level i915 specific functions Ville Syrjala
2026-02-18 15:28 ` [PATCH 13/19] drm/i915/overlay: Adjust i915 specific interfaces Ville Syrjala
2026-02-18 15:28 ` [PATCH 14/19] drm/i915/overlay: Make i830_overlay_clock_gating() i915 specific Ville Syrjala
2026-02-18 15:28 ` [PATCH 15/19] drm/i915/overlay: s/dev_priv/i915/ Ville Syrjala
2026-02-18 15:28 ` [PATCH 16/19] drm/i915/overlay: Split 'struct intel_overlay' Ville Syrjala
2026-02-18 15:28 ` [PATCH 17/19] drm/i915/overlay: Don't use fetch_and_zero() in display code Ville Syrjala
2026-02-25 9:47 ` Jani Nikula
2026-02-25 10:00 ` Ville Syrjälä
2026-02-18 15:28 ` [PATCH 18/19] drm/i915/overlay: Move i915 specific code into i915_overlay.c Ville Syrjala
2026-02-18 15:28 ` [PATCH 19/19] drm/i915/overlay: Convert overlay to parent interface Ville Syrjala
2026-02-18 18:09 ` ✗ CI.checkpatch: warning for drm/i915/overlay: Convert " Patchwork
2026-02-18 18:11 ` ✓ CI.KUnit: success " Patchwork
2026-02-18 18:26 ` ✗ CI.checksparse: warning " Patchwork
2026-02-18 19:12 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-02-18 21:42 ` ✗ Xe.CI.FULL: " Patchwork
2026-02-25 11:19 ` [PATCH 00/19] " Jani Nikula
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=bc1719a455be6d86b6dfd37c573824f2f128625a@intel.com \
--to=jani.nikula@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox