From: Liviu Dudau <liviu.dudau@arm.com>
To: Daniel Stone <daniels@collabora.com>
Cc: igt-dev@lists.freedesktop.org, boris.brezillon@collabora.com,
laura.nao@collabora.com, adrian.larumbe@collabora.com,
daniel.almeida@collabora.com
Subject: Re: [PATCH 3/4] panthor: Add more CSF instructions
Date: Wed, 21 Oct 2026 16:53:33 +0100 [thread overview]
Message-ID: <atjf_eDTuIksWbCV@e142607> (raw)
In-Reply-To: <20261015130837.710795-4-daniels@collabora.com>
On Thu, Oct 15, 2026 at 02:05:48PM +0100, Daniel Stone wrote:
> Add a few more CSF instructions which we will need to execute shader
> workloads.
>
> Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Best regards,
Liviu
> ---
> lib/igt_panthor.h | 126 ++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 126 insertions(+)
>
> diff --git a/lib/igt_panthor.h b/lib/igt_panthor.h
> index 3056ebd75..dfeb0ac60 100644
> --- a/lib/igt_panthor.h
> +++ b/lib/igt_panthor.h
> @@ -64,8 +64,13 @@ enum cs_opcode {
> CS_OPCODE_MOVE48 = 1,
> CS_OPCODE_MOVE32 = 2,
> CS_OPCODE_WAIT = 3,
> + CS_OPCODE_RUN_COMPUTE = 4,
> CS_OPCODE_STM = 21,
> + CS_OPCODE_SET_SB_ENTRY = 23,
> + CS_OPCODE_CALL = 32,
> + CS_OPCODE_REQ_RESOURCE = 34,
> CS_OPCODE_FLUSH_CACHE = 36,
> + CS_OPCODE_ERROR_BARRIER = 47,
> };
>
> enum cs_flush_mode {
> @@ -75,6 +80,12 @@ enum cs_flush_mode {
> CS_FLUSH_MODE_CLEAN_AND_INVALIDATE = 3,
> };
>
> +enum cs_task_axis {
> + CS_TASK_AXIS_X = 0,
> + CS_TASK_AXIS_Y = 1,
> + CS_TASK_AXIS_Z = 2,
> +};
> +
> /* There's no plan to support big endian in the UMD, so keep
> * things simple and don't bother supporting it.
> */
> @@ -108,6 +119,19 @@ struct cs_instr {
> uint64_t unused1: 23;
> uint64_t opcode: 8;
> } wait;
> + struct {
> + uint64_t task_increment: 14;
> + uint64_t task_axis: 2;
> + uint64_t unused0: 16;
> + uint64_t progress: 1;
> + uint64_t unused1: 7;
> + uint64_t srt_entry: 2;
> + uint64_t spd_entry: 2;
> + uint64_t tsd_entry: 2;
> + uint64_t fau_entry: 2;
> + uint64_t unused2: 8;
> + uint64_t opcode: 8;
> + } run_compute;
> struct {
> uint64_t offset: 16;
> uint64_t mask: 16;
> @@ -116,6 +140,27 @@ struct cs_instr {
> uint64_t src: 8;
> uint64_t opcode: 8;
> } stm;
> + struct {
> + uint64_t ep_entry: 4;
> + uint64_t other_entry: 4;
> + uint64_t unused: 48;
> + uint64_t opcode: 8;
> + } set_sb_entry;
> + struct {
> + uint64_t unused0: 32;
> + uint64_t len: 8;
> + uint64_t addr: 8;
> + uint64_t unused1: 8;
> + uint64_t opcode: 8;
> + } call;
> + struct {
> + uint64_t compute: 1;
> + uint64_t fragment: 1;
> + uint64_t tiler: 1;
> + uint64_t idvs: 1;
> + uint64_t unused: 52;
> + uint64_t opcode: 8;
> + } req_resource;
> struct {
> uint64_t l2_mode: 4;
> uint64_t lsc_mode: 4;
> @@ -128,6 +173,10 @@ struct cs_instr {
> uint64_t unused2: 4;
> uint64_t opcode: 8;
> } flush;
> + struct {
> + uint64_t unused: 56;
> + uint64_t opcode: 8;
> + } error_barrier;
> uint64_t raw;
> };
> };
> @@ -186,6 +235,27 @@ cs_wait(uint16_t wait_mask, bool progress_inc)
> return instr.raw;
> }
>
> +static inline uint64_t
> +cs_run_compute(uint16_t task_increment, enum cs_task_axis task_axis, bool progress,
> + uint32_t srt_entry, uint32_t spd_entry, uint32_t tsd_entry,
> + uint32_t fau_entry)
> +{
> + struct cs_instr instr = {
> + .run_compute = {
> + .task_increment = task_increment,
> + .task_axis = task_axis,
> + .progress = progress,
> + .srt_entry = srt_entry,
> + .spd_entry = spd_entry,
> + .tsd_entry = tsd_entry,
> + .fau_entry = fau_entry,
> + .opcode = CS_OPCODE_RUN_COMPUTE,
> + },
> + };
> +
> + return instr.raw;
> +}
> +
> static inline uint64_t
> cs_stm(uint8_t address, uint8_t src, uint16_t mask, int16_t offset)
> {
> @@ -214,6 +284,50 @@ cs_stm64(uint8_t address, uint8_t src, int16_t offset)
> return cs_stm(address, src, 0x3, offset);
> }
>
> +static inline uint64_t
> +cs_set_sb_entry(uint32_t ep_entry, uint32_t other_entry)
> +{
> + struct cs_instr instr = {
> + .set_sb_entry = {
> + .ep_entry = ep_entry,
> + .other_entry = other_entry,
> + .opcode = CS_OPCODE_SET_SB_ENTRY,
> + },
> + };
> +
> + return instr.raw;
> +}
> +
> +static inline uint64_t
> +cs_call(uint8_t addr, uint8_t len)
> +{
> + struct cs_instr instr = {
> + .call = {
> + .addr = addr,
> + .len = len,
> + .opcode = CS_OPCODE_CALL,
> + },
> + };
> +
> + return instr.raw;
> +}
> +
> +static inline uint64_t
> +cs_req_resource(bool compute, bool fragment, bool tiler, bool idvs)
> +{
> + struct cs_instr instr = {
> + .req_resource = {
> + .compute = compute,
> + .fragment = fragment,
> + .tiler = tiler,
> + .idvs = idvs,
> + .opcode = CS_OPCODE_REQ_RESOURCE,
> + },
> + };
> +
> + return instr.raw;
> +}
> +
> static inline uint64_t
> cs_flush(enum cs_flush_mode l2_mode,
> enum cs_flush_mode lsc_mode,
> @@ -237,4 +351,16 @@ cs_flush(enum cs_flush_mode l2_mode,
> return instr.raw;
> }
>
> +static inline uint64_t
> +cs_error_barrier(void)
> +{
> + struct cs_instr instr = {
> + .error_barrier = {
> + .opcode = CS_OPCODE_ERROR_BARRIER,
> + },
> + };
> +
> + return instr.raw;
> +}
> +
> #endif /* IGT_PANTHOR_H */
> --
> 2.47.3
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
next prev parent reply other threads:[~2026-10-21 15:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 13:05 [PATCH 0/4] Add Panthor compute-shader test Daniel Stone
2026-10-15 13:05 ` [PATCH 1/4] panthor: Use all available GPU cores Daniel Stone
2026-10-15 15:50 ` Kamil Konieczny
2026-10-21 15:51 ` Liviu Dudau
2026-10-15 13:05 ` [PATCH 2/4] panthor: Add igt_panthor_get_arch() helper Daniel Stone
2026-10-15 15:52 ` Kamil Konieczny
2026-10-21 15:51 ` Liviu Dudau
2026-10-15 13:05 ` [PATCH 3/4] panthor: Add more CSF instructions Daniel Stone
2026-10-15 15:55 ` Kamil Konieczny
2026-10-21 15:53 ` Liviu Dudau [this message]
2026-10-15 13:05 ` [PATCH 4/4] panthor: Add simple compute-shader test Daniel Stone
2026-10-15 16:06 ` Kamil Konieczny
2026-10-21 15:58 ` Liviu Dudau
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=atjf_eDTuIksWbCV@e142607 \
--to=liviu.dudau@arm.com \
--cc=adrian.larumbe@collabora.com \
--cc=boris.brezillon@collabora.com \
--cc=daniel.almeida@collabora.com \
--cc=daniels@collabora.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=laura.nao@collabora.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.