All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Cc: igt-dev@lists.freedesktop.org,
	Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Subject: Re: [PATCH 1/2] lib/intel_blt: BB index should be incremented in dwords
Date: Mon, 10 Nov 2025 06:48:58 -0800	[thread overview]
Message-ID: <87346muen9.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20251110135805.3620715-3-balasubramani.vivekanandan@intel.com>

On Mon, 10 Nov 2025 05:58:06 -0800, Balasubramani Vivekanandan wrote:
>
> Size in bytes in used to increment the BB index, which is incorrect.
> Convert bytes to number of dwords.
>
> Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> ---
>  lib/intel_blt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/intel_blt.c b/lib/intel_blt.c
> index 7f7f5485e..9a0bcb96b 100644
> --- a/lib/intel_blt.c
> +++ b/lib/intel_blt.c
> @@ -1714,7 +1714,7 @@ uint64_t emit_blt_fast_copy(int fd,
>
>	igt_assert(bb_pos + sizeof(data) < blt->bb.size);
>	memcpy(bb + bb_pos, &data, sizeof(data));

What about here?


> -	bb_pos += sizeof(data);
> +	bb_pos += DIV_ROUND_UP(sizeof(data), sizeof(*bb));
>
>	if (emit_bbe) {
>		igt_assert(bb_pos + sizeof(uint32_t) < blt->bb.size);

Here also has:

	bb_pos += sizeof(uint32_t);

And the function is returning bb_pos and can be called multiple times with
the returned bb_pos.

> --
> 2.43.0
>

So there are multiple places where bb_pos is being added to bb. Maybe the
fix should be to just make bb a uint8_t * rather than uint32 * ?

  parent reply	other threads:[~2025-11-10 14:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-10 13:58 [PATCH 1/2] lib/intel_blt: BB index should be incremented in dwords Balasubramani Vivekanandan
2025-11-10 13:58 ` [PATCH 2/2] xe_exercise_blt: Insert a flush between two consecutive FAST_COPY Balasubramani Vivekanandan
2025-11-11  0:40   ` Matt Roper
2025-11-11  8:20     ` Vivekanandan, Balasubramani
2025-11-12  9:06     ` Zbigniew Kempczyński
2025-11-13 14:08       ` Vivekanandan, Balasubramani
2025-11-10 14:48 ` Dixit, Ashutosh [this message]
2025-11-11  8:10   ` [PATCH 1/2] lib/intel_blt: BB index should be incremented in dwords Vivekanandan, Balasubramani
2025-11-10 23:55 ` ✓ Xe.CI.BAT: success for series starting with [1/2] " Patchwork
2025-11-10 23:56 ` ✓ i915.CI.BAT: " Patchwork
2025-11-11  7:32 ` ✗ i915.CI.Full: failure " Patchwork
2025-11-11  8:14 ` ✗ Xe.CI.Full: " Patchwork
2025-11-12  9:02 ` [PATCH 1/2] " Zbigniew Kempczyński

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=87346muen9.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=balasubramani.vivekanandan@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=zbigniew.kempczynski@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.