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 1/7] drm/panthor: Add performance counter uAPI
Date: Wed, 14 Jan 2026 14:06:57 +0100	[thread overview]
Message-ID: <20260114140657.4b0392f1@fedora> (raw)
In-Reply-To: <20251215171453.2506348-2-lukas.zapolskas@arm.com>

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

> +/**
> + * enum drm_panthor_perf_block_type - Performance counter supported block types.
> + */
> +enum drm_panthor_perf_block_type {
> +	/** @DRM_PANTHOR_PERF_BLOCK_METADATA: Internal use only. */
> +	DRM_PANTHOR_PERF_BLOCK_METADATA = 0,

If it's internal-use-only, it shouldn't be exposed here. That's another
case of "I want an HW-agnostic uAPI so I can reconcile things up in
the KMD if things change on new HW, but I want it to match the current
HW mapping because it's simpler". If we really want to standardize the
block types that are exposed to the user (and after discussing it with
you, it seems you have valid reasons to want that), I'd rather have a
tightly packed enum with only the block types visible to the user. It
looks like METADATA is the only block we want to hide at the moment, so
it shouldn't be too hard to special-case this block.

> +
> +	/** @DRM_PANTHOR_PERF_BLOCK_FW: The FW counter block. */
> +	DRM_PANTHOR_PERF_BLOCK_FW,

Let's prefix those values with DRM_PANTHOR_PERF_BLOCK_TYPE_ to avoid
the blk vs blk-type confusion.

> +
> +	/** @DRM_PANTHOR_PERF_BLOCK_CSHW: The CSHW counter block. */
> +	DRM_PANTHOR_PERF_BLOCK_CSHW,
> +
> +	/** @DRM_PANTHOR_PERF_BLOCK_TILER: The tiler counter block. */
> +	DRM_PANTHOR_PERF_BLOCK_TILER,
> +
> +	/** @DRM_PANTHOR_PERF_BLOCK_MEMSYS: A memsys counter block. */
> +	DRM_PANTHOR_PERF_BLOCK_MEMSYS,
> +
> +	/** @DRM_PANTHOR_PERF_BLOCK_SHADER: A shader core counter block. */
> +	DRM_PANTHOR_PERF_BLOCK_SHADER,
> +
> +	/** @DRM_PANTHOR_PERF_BLOCK_FIRST: Internal use only. */
> +	DRM_PANTHOR_PERF_BLOCK_FIRST = DRM_PANTHOR_PERF_BLOCK_FW,
> +
> +	/** @DRM_PANTHOR_PERF_BLOCK_LAST: Internal use only. */
> +	DRM_PANTHOR_PERF_BLOCK_LAST = DRM_PANTHOR_PERF_BLOCK_SHADER,
> +
> +	/** @DRM_PANTHOR_PERF_BLOCK_MAX: Internal use only. */
> +	DRM_PANTHOR_PERF_BLOCK_MAX = DRM_PANTHOR_PERF_BLOCK_LAST + 1,

I think I'd just go for

	DRM_PANTHOR_PERF_BLOCK_TYPE_COUNT,

and drop DRM_PANTHOR_PERF_BLOCK_{FIRST,LAST,MAX) definitions, with a
comment stating that DRM_PANTHOR_PERF_BLOCK_TYPE_COUNT must stay last
in this enum.

> +};

  parent reply	other threads:[~2026-01-14 13: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 [this message]
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
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=20260114140657.4b0392f1@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