public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Lukas Zapolskas <lukas.zapolskas@arm.com>
Cc: "Liviu Dudau" <liviu.dudau@arm.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Adrián Larumbe" <adrian.larumbe@collabora.com>,
	nd@arm.com, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	"Mihail Atanassov" <mihail.atanassov@arm.com>
Subject: Re: [PATCH v6 4/7] drm/panthor: Introduce sampling sessions to handle userspace clients
Date: Wed, 14 Jan 2026 13:07:17 +0100	[thread overview]
Message-ID: <20260114130717.4818e9d1@fedora> (raw)
In-Reply-To: <20251215171453.2506348-5-lukas.zapolskas@arm.com>

On Mon, 15 Dec 2025 17:14:50 +0000
Lukas Zapolskas <lukas.zapolskas@arm.com> wrote:

> +/**
> + * PANTHOR_PERF_EM_BITS - Number of bits in a user-facing enable mask. This must correspond
> + *                        to the maximum number of counters available for selection on the newest
> + *                        Mali GPUs (128 as of the Mali-Gx15).

This statement worries me a bit. It seems to imply that we might have
more than 128 counters per block at some point, and the way the uAPI is
designed, it's going to be annoying to extend. Maybe we should come up
with an approach that would account for this from the start, like:

- Moving drm_panthor_perf_block_header::enable_mask in its own
  drm_panthor_perf_block_enable_header_mask whose size can be
  determined from perf_info::counters_per_block

- having the enable mask settings passed through an array of
  struct drm_panthor_perf_enable_counter_section looking something like
  that:

/** @struct drm_panthor_perf_enable_counter_section - Describes a counter section to enable */
struct drm_panthor_perf_enable_counter_section {
	/** @block_type: block type this section refers to */
	__u8 block_type;

	/**
	 * @block_counter_offset: counter offset in the block type
	 *
	 * This must bit 64 aligned, and block_counter_offset + 64 must be
	 * <= drm_panthor_perf_info::counters_per_block
	 */
	__u8 block_counter_offset;

	/** @padding: MBZ. */
	__u16 padding;

	/**
	 * @enable_mask: enable mask to set for this portion of the counter block.
	 *
	 * The targeted counters are [@block_counter_offset, @block_counter_offset + 63].
	 */
	__u64 enable_mask;
};

struct drm_panthor_perf_block_setup {
	...
        __u64 sample_freq_ns;

	/// All xxx_enable[2] fields are replaced by the following array.

	/** @enable_sections: Sections of the counter blocks to enable. */
	struct drm_panthor_obj_array enable_sections;
}


> + */
> +#define PANTHOR_PERF_EM_BITS (BITS_PER_TYPE(u64) * 2)

  reply	other threads:[~2026-01-14 12:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15 17:14 [PATCH v6 0/7] Performance counter implementation with single manual client support Lukas Zapolskas
2025-12-15 17:14 ` [PATCH v6 1/7] drm/panthor: Add performance counter uAPI Lukas Zapolskas
2025-12-16 10:59   ` Boris Brezillon
2025-12-16 17:30   ` Boris Brezillon
2026-01-07 15:14     ` Lukas Zapolskas
2025-12-17 14:37   ` Boris Brezillon
2026-01-07 15:13     ` Lukas Zapolskas
2026-01-07 15:32       ` Boris Brezillon
2025-12-22 18:15   ` kernel test robot
2026-01-14 13:06   ` Boris Brezillon
2025-12-15 17:14 ` [PATCH v6 2/7] drm/panthor: Add DEV_QUERY.PERF_INFO handling for Gx10 Lukas Zapolskas
2026-01-14 10:11   ` Boris Brezillon
2025-12-15 17:14 ` [PATCH v6 3/7] drm/panthor: Add panthor perf initialization and termination Lukas Zapolskas
2025-12-18 10:33   ` Boris Brezillon
2025-12-18 10:37   ` Boris Brezillon
2025-12-18 13:30   ` Boris Brezillon
2025-12-15 17:14 ` [PATCH v6 4/7] drm/panthor: Introduce sampling sessions to handle userspace clients Lukas Zapolskas
2026-01-14 12:07   ` Boris Brezillon [this message]
2025-12-15 17:14 ` [PATCH v6 5/7] drm/panthor: Implement the counter sampler and sample handling Lukas Zapolskas
2025-12-20 14:34   ` kernel test robot
2025-12-21  5:13   ` kernel test robot
2026-01-13 16:19   ` Boris Brezillon
2025-12-15 17:14 ` [PATCH v6 6/7] drm/panthor: Add suspend, resume and reset handling Lukas Zapolskas
2025-12-15 17:14 ` [PATCH v6 7/7] drm/panthor: Expose the panthor perf ioctls Lukas Zapolskas

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=20260114130717.4818e9d1@fedora \
    --to=boris.brezillon@collabora.com \
    --cc=adrian.larumbe@collabora.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=lukas.zapolskas@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mihail.atanassov@arm.com \
    --cc=mripard@kernel.org \
    --cc=nd@arm.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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