Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Stone <daniels@collabora.com>
To: igt-dev@lists.freedesktop.org
Cc: boris.brezillon@collabora.com, laura.nao@collabora.com,
	adrian.larumbe@collabora.com, daniel.almeida@collabora.com,
	liviu.dudau@arm.com
Subject: [PATCH 1/4] panthor: Use all available GPU cores
Date: Thu, 15 Oct 2026 14:05:46 +0100	[thread overview]
Message-ID: <20261015130837.710795-2-daniels@collabora.com> (raw)
In-Reply-To: <20261015130837.710795-1-daniels@collabora.com>

There's no reason to limit ourselves to one arbitrarily-chosen core.

Signed-off-by: Daniel Stone <daniels@collabora.com>
---
 lib/igt_panthor.c | 29 +++++++----------------------
 lib/igt_panthor.h |  1 -
 2 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/lib/igt_panthor.c b/lib/igt_panthor.c
index 11d8ec342..cd6b6b7fd 100644
--- a/lib/igt_panthor.c
+++ b/lib/igt_panthor.c
@@ -2,6 +2,7 @@
 // SPDX-FileCopyrightText: Copyright (C) 2025 Collabora Ltd.
 
 #include "drmtest.h"
+#include "igt_aux.h"
 #include "igt_panthor.h"
 #include "ioctl_wrappers.h"
 #include "panthor_drm.h"
@@ -69,22 +70,6 @@ void igt_panthor_group_submit(int fd, struct drm_panthor_group_submit *group_sub
 		do_ioctl(fd, DRM_IOCTL_PANTHOR_GROUP_SUBMIT, group_submit);
 }
 
-/**
- * igt_panthor_get_first_core:
- * @cores_present: bitmask of available cores
- *
- * Get a mask with only the first available core bit set.
- *
- * Returns: core mask with first available core, or 0 if no cores available
- */
-uint64_t igt_panthor_get_first_core(uint64_t cores_present)
-{
-	if (cores_present == 0)
-		return 0;
-
-	return 1ULL << (ffs(cores_present) - 1);
-}
-
 /**
  * igt_panthor_group_create_simple:
  * @fd: device file descriptor
@@ -109,13 +94,13 @@ uint32_t igt_panthor_group_create_simple(int fd, uint32_t vm_id, int err)
 	queues = (struct drm_panthor_obj_array)DRM_PANTHOR_OBJ_ARRAY(1, &queue);
 
 	group_create.queues = queues;
-	group_create.max_compute_cores = 1;
-	group_create.max_fragment_cores = 1;
-	group_create.max_tiler_cores = 1;
+	group_create.max_compute_cores = igt_hweight(gpu_info.shader_present);
+	group_create.max_fragment_cores = igt_hweight(gpu_info.shader_present);
+	group_create.max_tiler_cores = igt_hweight(gpu_info.tiler_present);
 	group_create.priority = PANTHOR_GROUP_PRIORITY_MEDIUM;
-	group_create.compute_core_mask = igt_panthor_get_first_core(gpu_info.shader_present);
-	group_create.fragment_core_mask = igt_panthor_get_first_core(gpu_info.shader_present);
-	group_create.tiler_core_mask = igt_panthor_get_first_core(gpu_info.tiler_present);
+	group_create.compute_core_mask = gpu_info.shader_present;
+	group_create.fragment_core_mask = gpu_info.shader_present;
+	group_create.tiler_core_mask = gpu_info.tiler_present;
 	group_create.vm_id = vm_id;
 
 	igt_panthor_group_create(fd, &group_create, err);
diff --git a/lib/igt_panthor.h b/lib/igt_panthor.h
index ba4a9bf1e..63c4f2bf4 100644
--- a/lib/igt_panthor.h
+++ b/lib/igt_panthor.h
@@ -36,7 +36,6 @@ void igt_panthor_group_submit_simple(int fd, uint32_t group_handle,
 				     uint32_t queue_index, uint64_t stream_addr,
 				     uint32_t stream_size, uint32_t syncobj_handle,
 				     int err);
-uint64_t igt_panthor_get_first_core(uint64_t cores_present);
 
 static inline void igt_panthor_vm_bind(int fd, uint32_t vm_id, uint32_t bo_handle,
 				       uint64_t va, uint64_t size, uint32_t flags, int err)
-- 
2.47.3


  reply	other threads:[~2026-10-15 13:09 UTC|newest]

Thread overview: 9+ 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 ` Daniel Stone [this message]
2026-10-15 15:50   ` [PATCH 1/4] panthor: Use all available GPU cores Kamil Konieczny
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-15 13:05 ` [PATCH 3/4] panthor: Add more CSF instructions Daniel Stone
2026-10-15 15:55   ` Kamil Konieczny
2026-10-15 13:05 ` [PATCH 4/4] panthor: Add simple compute-shader test Daniel Stone
2026-10-15 16:06   ` Kamil Konieczny

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=20261015130837.710795-2-daniels@collabora.com \
    --to=daniels@collabora.com \
    --cc=adrian.larumbe@collabora.com \
    --cc=boris.brezillon@collabora.com \
    --cc=daniel.almeida@collabora.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=laura.nao@collabora.com \
    --cc=liviu.dudau@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