From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: Lionel G Landwerlin <lionel.g.landwerlin@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/3] i915/perf: Do not add ggtt offset to hw_tail
Date: Wed, 31 May 2023 21:07:37 -0700 [thread overview]
Message-ID: <87zg5jvn92.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20230531235634.1309525-3-umesh.nerlige.ramappa@intel.com>
On Wed, 31 May 2023 16:56:33 -0700, Umesh Nerlige Ramappa wrote:
>
> ggtt offset for hw_tail is not required for the calculations, so drop
> it.
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> ---
> drivers/gpu/drm/i915/i915_perf.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index 29124dcba8e2..beb1269422ca 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -565,7 +565,7 @@ static bool oa_buffer_check_unlocked(struct i915_perf_stream *stream)
> partial_report_size %= report_size;
>
> /* Subtract partial amount off the tail */
> - hw_tail = gtt_offset + OA_TAKEN(hw_tail, partial_report_size);
> + hw_tail = OA_TAKEN(hw_tail, partial_report_size);
>
>
> /* NB: The head we observe here might effectively be a little
> @@ -575,7 +575,6 @@ static bool oa_buffer_check_unlocked(struct i915_perf_stream *stream)
> head = stream->oa_buffer.head - gtt_offset;
> aged_tail = stream->oa_buffer.tail - gtt_offset;
>
> - hw_tail -= gtt_offset;
Yes gtt_offset addition/subtraction is now redundant after we drop the if-else.
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> tail = hw_tail;
>
> /* Walk the stream backward until we find a report with report
> --
> 2.36.1
>
next prev parent reply other threads:[~2023-06-01 4:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 23:56 [Intel-gfx] [PATCH 0/3] Avoid reading OA reports before they land Umesh Nerlige Ramappa
2023-05-31 23:56 ` [Intel-gfx] [PATCH 1/3] i915/perf: Drop the aging_tail logic in perf OA Umesh Nerlige Ramappa
2023-06-01 4:06 ` Dixit, Ashutosh
2023-05-31 23:56 ` [Intel-gfx] [PATCH 2/3] i915/perf: Do not add ggtt offset to hw_tail Umesh Nerlige Ramappa
2023-06-01 4:07 ` Dixit, Ashutosh [this message]
2023-05-31 23:56 ` [Intel-gfx] [PATCH 3/3] i915/perf: Drop the aged_tail from rewind logic Umesh Nerlige Ramappa
2023-06-01 4:13 ` Dixit, Ashutosh
2023-06-01 18:16 ` Umesh Nerlige Ramappa
2023-06-01 3:41 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Avoid reading OA reports before they land Patchwork
2023-06-01 3:55 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-06-02 19:20 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=87zg5jvn92.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lionel.g.landwerlin@linux.intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox