All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm/xe/xe_oa: Avoid checking and setting fields in the OA report
Date: Mon, 24 Aug 2026 08:39:12 -0700	[thread overview]
Message-ID: <87ecfnh6jj.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20260821222338.1053887-7-umesh.nerlige.ramappa@intel.com>

On Fri, 21 Aug 2026 15:23:41 -0700, Umesh Nerlige Ramappa wrote:
>
> @@ -260,7 +224,7 @@ static bool mert_wa_14026633728(struct xe_oa_stream *s)
>  static bool xe_oa_buffer_check_unlocked(struct xe_oa_stream *stream)
>  {
>	u32 gtt_offset = xe_bo_ggtt_addr(stream->oa_buffer.bo);
> -	u32 tail, hw_tail, partial_report_size, available;
> +	u32 hw_tail, partial_report_size, available;
>	int report_size = stream->oa_buffer.format->size;
>	unsigned long flags;
>
> @@ -280,29 +244,7 @@ static bool xe_oa_buffer_check_unlocked(struct xe_oa_stream *stream)
>	/* Subtract partial amount off the tail */
>	hw_tail = xe_oa_circ_diff(stream, hw_tail, partial_report_size);
>
> -	tail = hw_tail;
> -
> -	/*
> -	 * Walk the stream backward until we find a report with report id and timestamp
> -	 * not 0. We can't tell whether a report has fully landed in memory before the
> -	 * report id and timestamp of the following report have landed.
> -	 *
> -	 * This is assuming that the writes of the OA unit land in memory in the order
> -	 * they were written.  If not : (╯°□°)╯︵ ┻━┻
> -	 */
> -	while (xe_oa_circ_diff(stream, tail, stream->oa_buffer.tail) >= report_size) {
> -		if (oa_report_id(stream, tail) || oa_timestamp(stream, tail))
> -			break;
> -
> -		tail = xe_oa_circ_diff(stream, tail, report_size);
> -	}
> -
> -	if (xe_oa_circ_diff(stream, hw_tail, tail) > report_size)
> -		drm_dbg(&stream->oa->xe->drm,
> -			"unlanded report(s) head=0x%x tail=0x%x hw_tail=0x%x\n",
> -			stream->oa_buffer.head, tail, hw_tail);
> -
> -	stream->oa_buffer.tail = tail;
> +	stream->oa_buffer.tail = hw_tail;

This line is added here and then is modified in Patch 3. So maybe we should
not add this line here, just add the line in Patch 3? And just delete line
in this patch? So this patch will only contain code deletion.

Also take care of the issue reported by sashiko:

- [Low] The macro `oa_report_header_64bit` is left defined but is completely unused after its only callers were removed.

Apart from these nits, this is:

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

  parent reply	other threads:[~2026-08-24 15:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 22:23 [PATCH 0/3] Modify the SW tail logic in OA Umesh Nerlige Ramappa
2026-08-21 22:23 ` [PATCH 1/3] drm/xe/xe_oa: Clear status only if relevant bits are set Umesh Nerlige Ramappa
2026-08-21 22:23 ` [PATCH 2/3] drm/xe/xe_oa: Avoid checking and setting fields in the OA report Umesh Nerlige Ramappa
2026-08-21 22:34   ` sashiko-bot
2026-08-24 15:39   ` Dixit, Ashutosh [this message]
2026-08-21 22:23 ` [PATCH 3/3] drm/xe/xe_oa: Add a lag to the reports that is exported to user Umesh Nerlige Ramappa
2026-08-21 22:37   ` sashiko-bot
2026-08-24 15:57   ` Dixit, Ashutosh
2026-08-21 22:30 ` ✓ CI.KUnit: success for Modify the SW tail logic in OA Patchwork
2026-08-21 23:25 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-22  0:33 ` ✓ Xe.CI.FULL: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2026-08-21 20:07 [PATCH 0/3] " Umesh Nerlige Ramappa
2026-08-21 20:07 ` [PATCH 2/3] drm/xe/xe_oa: Avoid checking and setting fields in the OA report Umesh Nerlige Ramappa
2026-08-21 20:24   ` sashiko-bot
2026-08-06 22:47 [PATCH 0/3] Modify the SW tail logic in OA Umesh Nerlige Ramappa
2026-08-06 22:47 ` [PATCH 2/3] drm/xe/xe_oa: Avoid checking and setting fields in the OA report Umesh Nerlige Ramappa
2026-07-30 23:35 [PATCH 0/3] Modify the SW tail logic in OA Umesh Nerlige Ramappa
2026-07-30 23:35 ` [PATCH 2/3] drm/xe/xe_oa: Avoid checking and setting fields in the OA report Umesh Nerlige Ramappa
2026-07-22 21:54 [PATCH 0/3] Modify the SW tail logic in OA Umesh Nerlige Ramappa
2026-07-22 21:54 ` [PATCH 2/3] drm/xe/xe_oa: Avoid checking and setting fields in the OA report Umesh Nerlige Ramappa
2026-07-21 23:48 [PATCH 0/3] Modify the SW tail logic in OA Umesh Nerlige Ramappa
2026-07-21 23:48 ` [PATCH 2/3] drm/xe/xe_oa: Avoid checking and setting fields in the OA report Umesh Nerlige Ramappa

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=87ecfnh6jj.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=umesh.nerlige.ramappa@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.