Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Sai Teja Pottumuttu <sai.teja.pottumuttu@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 1/2] tests/intel/xe_oa: Fetch OA buffer size from observation IOCTL
Date: Mon, 18 Nov 2024 11:51:35 -0800	[thread overview]
Message-ID: <85y11gwcag.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20241118063223.3974722-2-sai.teja.pottumuttu@intel.com>

On Sun, 17 Nov 2024 22:32:22 -0800, Sai Teja Pottumuttu wrote:
>

This one mostly looks good, just a couple of nits below.

Also how are you testing these patches? To test I suggest just run:

	sudo ./build/tests/xe_oa

> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 33e978a48..4e4d0fabc 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -63,9 +63,6 @@
>  #define PIPE_CONTROL_PPGTT_WRITE	(0 << 2)
>  #define PIPE_CONTROL_GLOBAL_GTT_WRITE   (1 << 2)
>
> -#define MAX_OA_BUF_SIZE (16 * 1024 * 1024)
> -#define OA_BUFFER_SIZE MAX_OA_BUF_SIZE
> -
>  #define RING_FORCE_TO_NONPRIV_ADDRESS_MASK 0x03fffffc
>  /*
>   * Engine specific registers defined as offsets from engine->mmio_base. For
> @@ -303,6 +300,7 @@ struct drm_xe_engine_class_instance default_hwe;
>
>  static struct intel_xe_perf *intel_xe_perf;
>  static uint64_t oa_exp_1_millisec;
> +static uint64_t oa_buffer_size;

s/size_t/uint64_t/

Also, for clarity, let's call this default_oa_buffer_size too. Because
oa_buffer_size later can be changed per stream. So that later when we
introduce different oa buffer sizes etc there won't be any confusion.

>  struct intel_mmio_data mmio_data;
>  static igt_render_copyfunc_t render_copy;
>
> @@ -511,6 +509,30 @@ __perf_open(int fd, struct intel_xe_oa_open_prop *param, bool prevent_pm)
>	return ret;
>  }
>
> +static u64 get_default_oa_buffer_size(int fd)

Let's make the return type size_t here too.

Rest lgtm. I'll take a quick look at the next version and should be able to
R-b it.

Thanks.
--
Ashutosh

  reply	other threads:[~2024-11-18 19:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18  6:32 [PATCH i-g-t 0/2] tests/intel/xe_oa: Refactors related to OA buffer size Sai Teja Pottumuttu
2024-11-18  6:32 ` [PATCH i-g-t 1/2] tests/intel/xe_oa: Fetch OA buffer size from observation IOCTL Sai Teja Pottumuttu
2024-11-18 19:51   ` Dixit, Ashutosh [this message]
2024-11-19  6:19     ` Pottumuttu, Sai Teja
2024-11-18 20:03   ` Dixit, Ashutosh
2024-11-18  6:32 ` [PATCH i-g-t 2/2] tests/intel/xe_oa: Replace hardcoded OA buffer size assumptions Sai Teja Pottumuttu
2024-11-18 20:24   ` Dixit, Ashutosh
2024-11-19  7:01     ` Pottumuttu, Sai Teja
2024-11-19  7:21       ` Dixit, Ashutosh
2024-11-19  7:28         ` Pottumuttu, Sai Teja
2024-11-18  7:10 ` ✗ CI.xeBAT: failure for tests/intel/xe_oa: Refactors related to OA buffer size Patchwork
2024-11-18 11:48 ` ✓ Fi.CI.BAT: success " Patchwork
2024-11-18 12:42 ` ✗ CI.xeFULL: 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=85y11gwcag.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=sai.teja.pottumuttu@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