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>, <umesh.nerlige.ramappa@intel.com>
Subject: Re: [PATCH i-g-t v2] tests/intel/xe_oa: Keep OA user buffer size dynamic
Date: Tue, 18 Mar 2025 22:27:07 -0700	[thread overview]
Message-ID: <87bjtx380k.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20250319042336.3280115-1-sai.teja.pottumuttu@intel.com>

On Tue, 18 Mar 2025 21:23:36 -0700, Sai Teja Pottumuttu wrote:
>
> non-zero-reason OA test has a hardcoded user buffer size for
> any kernel OA buffer. This makes the test act differently for
> different sizes. Thus make the user buffer size to be in line
> with the kernel OA buffer being allocated.
>
> v2: Address operator precedence (Ashutosh)
>
> Signed-off-by: Sai Teja Pottumuttu <sai.teja.pottumuttu@intel.com>
> ---
>  tests/intel/xe_oa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 9bc62c5b9..5c768e4cf 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -2480,7 +2480,7 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_b
>		.num_properties = ARRAY_SIZE(properties) / 2,
>		.properties_ptr = to_user_pointer(properties),
>	};
> -	uint32_t buf_size = 3 * 65536 * report_size;
> +	uint32_t buf_size = 3 * (oa_buffer_size ?: buffer_fill_size);

Looks ok. For "non-zero-reason" buf_size is 3 * OA buffer size. For
"buffer-size" buf_size can be smaller or larger than 3 * OA buffer size.

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

>	uint8_t *buf = malloc(buf_size);
>	uint32_t total_len = 0;
>	const uint32_t *last_report;
> --
> 2.34.1
>

  parent reply	other threads:[~2025-03-19  5:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19  4:23 [PATCH i-g-t v2] tests/intel/xe_oa: Keep OA user buffer size dynamic Sai Teja Pottumuttu
2025-03-19  4:51 ` ✓ Xe.CI.BAT: success for tests/intel/xe_oa: Keep OA user buffer size dynamic (rev2) Patchwork
2025-03-19  5:04 ` ✓ i915.CI.BAT: " Patchwork
2025-03-19  5:27 ` Dixit, Ashutosh [this message]
2025-03-19  5:35 ` ✗ Xe.CI.Full: failure " Patchwork
2025-03-19  6:49 ` ✗ i915.CI.Full: " 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=87bjtx380k.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=sai.teja.pottumuttu@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