From: Boris Brezillon <boris.brezillon@collabora.com>
To: Daniel Almeida <daniel.almeida@collabora.com>
Cc: Daniel Stone <daniel@fooishbar.org>,
adrinael@adrinael.net, arek@hiler.eu,
kamil.konieczny@linux.intel.com, juhapekka.heikkila@gmail.com,
bhanuprakash.modem@gmail.com, ashutosh.dixit@intel.com,
karthik.b.s@intel.com, liviu.dudau@arm.com, steven.price@arm.com,
aliceryhl@google.com, jeffv@google.com,
intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2 3/3] tests/panthor: add panthor tests
Date: Tue, 7 Oct 2025 18:50:31 +0200 [thread overview]
Message-ID: <20251007185031.46473b7b@fedora> (raw)
In-Reply-To: <B53163CD-9D92-47A7-BE69-A9C9D5C25E5D@collabora.com>
On Tue, 7 Oct 2025 13:40:11 -0300
Daniel Almeida <daniel.almeida@collabora.com> wrote:
> > On 7 Oct 2025, at 10:39, Daniel Almeida <daniel.almeida@collabora.com> wrote:
> >
> > Hi Dan, thanks for the review!
> >
> > […]
> >
> >>
> >>> +static void
> >>> +issue_store_multiple(u8 *command_stream, uint64_t kernel_va, uint32_t constant)
> >>> +{
> >>> + uint64_t opcode, reg_num, mov48, store_multiple, flush;
> >>> + uint64_t sr, src0, register_bitmap, offset;
> >>> +
> >>> + // MOV48: Load the source register ([r68; r69]) with the kernel address
> >>> + opcode = 0x1;
> >>> + reg_num = 68;
> >>> + mov48 = (opcode << 56) | (reg_num << 48) | kernel_va;
> >>> + mov48 = htole64(mov48);
> >>> + memcpy(&command_stream[0], &mov48, sizeof(mov48));
> >>> +
> >>> + // MOV48: Load a known constant into r70
> >>> + opcode = 0x1;
> >>> + reg_num = 70;
> >>> + mov48 = (opcode << 56) | (reg_num << 48) | constant;
> >>> + mov48 = htole64(mov48);
> >>> + memcpy(&command_stream[8], &mov48, sizeof(mov48));
> >>> +
> >>> + // STORE_MULTIPLE: Store the first register to the address pointed to by [r68; r69]
> >>> + opcode = 0x15; // STORE_MULTIPLE
> >>> + sr = 70; // Starting from register r70
> >>> + src0 = 68; // Address pointed to by [r68; r69]
> >>> + register_bitmap = 1; // Store the first register
> >>> + offset = 0; // Offset
> >>> + store_multiple = (opcode << 56) | (sr << 48) | (src0 << 40) |
> >>> + (register_bitmap << 16) | offset;
> >>> + store_multiple = htole64(store_multiple);
> >>> + memcpy(&command_stream[16], &store_multiple, sizeof(store_multiple));
> >>
> >> // MOV48 r68, 0 on the below?
> >
> > Wdym? / Why?
> >
> > I want to clarify what you mean here because it was a bit tricky to get this to
> > work, so I am trying to be really mindful about any changes so that it
> > doesn’t break.
> >
>
> Oh, I now see that you probably also want this to be a comment placed before the
> opcode like the FLUSH_CACHES below.
BTW, if we start adding more tests using manually forged command
streams, it might make sense to provides some sort of helpers like
those we have in mesa[1], but let's keep that for later.
[1]https://elixir.bootlin.com/mesa/mesa-25.2.4/source/src/panfrost/genxml/cs_builder.h
next prev parent reply other threads:[~2025-10-07 16:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-12 18:19 [PATCH i-g-t v2 0/3] Add initial Panthor tests Daniel Almeida
2025-09-12 18:19 ` [PATCH i-g-t v2 1/3] lib: add support for opening Panthor devices Daniel Almeida
2025-09-16 12:03 ` Kamil Konieczny
2025-09-12 18:19 ` [PATCH i-g-t v2 2/3] panthor: add initial infrastructure Daniel Almeida
2025-09-16 12:12 ` Kamil Konieczny
2025-09-25 12:42 ` Daniel Almeida
2025-09-25 14:51 ` Kamil Konieczny
2025-09-12 18:19 ` [PATCH i-g-t v2 3/3] tests/panthor: add panthor tests Daniel Almeida
2025-09-16 12:15 ` Kamil Konieczny
2025-09-25 15:45 ` Daniel Stone
2025-10-07 13:39 ` Daniel Almeida
2025-10-07 16:40 ` Daniel Almeida
2025-10-07 16:50 ` Boris Brezillon [this message]
2025-09-25 17:46 ` Kamil Konieczny
2025-09-15 14:40 ` [PATCH i-g-t v2 0/3] Add initial Panthor tests Steven Price
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=20251007185031.46473b7b@fedora \
--to=boris.brezillon@collabora.com \
--cc=adrinael@adrinael.net \
--cc=aliceryhl@google.com \
--cc=arek@hiler.eu \
--cc=ashutosh.dixit@intel.com \
--cc=bhanuprakash.modem@gmail.com \
--cc=daniel.almeida@collabora.com \
--cc=daniel@fooishbar.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jeffv@google.com \
--cc=juhapekka.heikkila@gmail.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=karthik.b.s@intel.com \
--cc=liviu.dudau@arm.com \
--cc=steven.price@arm.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