All of lore.kernel.org
 help / color / mirror / Atom feed
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 4/7] drm/i915/dsb: Extract intel_dsb_set_ins()
Date: Tue, 17 Nov 2026 17:48:09 +0200	[thread overview]
Message-ID: <72a8a263d785c3f85a92691e3d8f7ddf39507153@intel.com> (raw)
In-Reply-To: <20261116081041.6519-5-ville.syrjala@linux.intel.com>

On Mon, 16 Nov 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We're adjusting the previous instruction tracking data in
> a few places. Extract that to a helper. I'll be adding a
> few other uses soon.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
> index fa4964c17163..75f98b31c780 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -310,6 +310,15 @@ static unsigned int intel_dsb_tail(struct intel_dsb *dsb)
>  	return dsb_buffer_ggtt_offset(dsb) + intel_dsb_size(dsb);
>  }
>  
> +static void intel_dsb_set_ins(struct intel_dsb *dsb,
> +			      unsigned int ins_start_offset,
> +			      u32 ldw, u32 udw)
> +{
> +	dsb->ins_start_offset = ins_start_offset;
> +	dsb->ins[0] = ldw;
> +	dsb->ins[1] = udw;
> +}
> +
>  static bool intel_dsb_prev_ins_is_indexed_write(struct intel_dsb *dsb)
>  {
>  	u32 opcode = DSB_OPCODE_INDEXED_WRITE << DSB_OPCODE_SHIFT;
> @@ -344,9 +353,7 @@ static void intel_dsb_emit(struct intel_dsb *dsb, u32 ldw, u32 udw)
>  
>  	intel_dsb_ins_align(dsb);
>  
> -	dsb->ins_start_offset = dsb->free_pos;
> -	dsb->ins[0] = ldw;
> -	dsb->ins[1] = udw;
> +	intel_dsb_set_ins(dsb, dsb->free_pos, ldw, udw);
>  
>  	dsb_buffer_write(dsb, dsb->free_pos++, dsb->ins[0]);
>  	dsb_buffer_write(dsb, dsb->free_pos++, dsb->ins[1]);
> @@ -1023,9 +1030,7 @@ void intel_dsb_wait(struct intel_dsb *dsb)
>  
>  	/* Attempt to reset it */
>  	dsb->free_pos = 0;
> -	dsb->ins_start_offset = 0;
> -	dsb->ins[0] = 0;
> -	dsb->ins[1] = 0;
> +	intel_dsb_set_ins(dsb, 0, 0, 0);
>  
>  	intel_de_write_fw(display, DSB_CTRL(pipe, dsb->id), 0);

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-11-17 15:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  8:10 [PATCH 0/7] drm/i915/dsb: Optimize indexed register writes Ville Syrjala
2026-11-16  8:10 ` [PATCH 1/7] drm/i915/dsb: Remove old comment about stale contents of the DSB buffer Ville Syrjala
2026-11-17 15:43   ` Jani Nikula
2026-11-16  8:10 ` [PATCH 2/7] drm/i915/dsb: Eliminate intel_dsb_prev_ins_is_write() Ville Syrjala
2026-11-17 15:44   ` Jani Nikula
2026-11-16  8:10 ` [PATCH 3/7] drm/i915/dsb: Carve up intel_dsb_prev_ins_is_indexed_write() Ville Syrjala
2026-11-17 15:47   ` Jani Nikula
2026-11-16  8:10 ` [PATCH 4/7] drm/i915/dsb: Extract intel_dsb_set_ins() Ville Syrjala
2026-11-17 15:48   ` Jani Nikula [this message]
2026-11-16  8:10 ` [PATCH 5/7] drm/i915/dsb: Update previous instruction tracking in intel_dsb_align_tail() & co Ville Syrjala
2026-11-17 16:07   ` Jani Nikula
2026-11-17 18:41     ` Ville Syrjälä
2026-11-17 18:55       ` Ville Syrjälä
2026-11-16  8:10 ` [PATCH 6/7] drm/i915/dsb: Skip redundant zeroing of every second indexed write DW Ville Syrjala
2026-11-17 15:57   ` Jani Nikula
2026-11-16  8:10 ` [PATCH 7/7] drm/i915/dsb: Avoid redundant writes to the DSB buffer for indexed register writes Ville Syrjala
2026-11-17 16:05   ` Jani Nikula
2026-11-17 18:46     ` Ville Syrjälä
2026-11-16  8:47 ` ✓ CI.KUnit: success for drm/i915/dsb: Optimize " Patchwork
2026-11-16  9:19 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-16  9:49 ` ✓ i915.CI.BAT: " Patchwork
2026-11-16 12:32 ` ✓ Xe.CI.FULL: " Patchwork
2026-11-16 14:34 ` ✗ i915.CI.Full: failure " 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=72a8a263d785c3f85a92691e3d8f7ddf39507153@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 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.