From: Steven Price <steven.price@arm.com>
To: Lukas Zapolskas <lukas.zapolskas@arm.com>,
Boris Brezillon <boris.brezillon@collabora.com>,
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>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: "Adrián Larumbe" <adrian.larumbe@collabora.com>
Subject: Re: [PATCH v4 4/7] drm/panthor: Introduce sampling sessions to handle userspace clients
Date: Fri, 20 Jun 2025 16:28:31 +0100 [thread overview]
Message-ID: <057bf373-7860-4b93-93c2-218adbff61a2@arm.com> (raw)
In-Reply-To: <0319137f966f2dbffc54e51f7a2a3cbac837507b.1747148172.git.lukas.zapolskas@arm.com>
Hi Lukas,
I was going to try testing this out, but it doesn't look functional. See
below.
On 16/05/2025 16:49, Lukas Zapolskas wrote:
[...]
> diff --git a/drivers/gpu/drm/panthor/panthor_perf.c b/drivers/gpu/drm/panthor/panthor_perf.c
> index 9365ce9fed04..15fa533731f3 100644
> --- a/drivers/gpu/drm/panthor/panthor_perf.c
> +++ b/drivers/gpu/drm/panthor/panthor_perf.c
> @@ -2,13 +2,177 @@
> /* Copyright 2023 Collabora Ltd */
> /* Copyright 2025 Arm ltd. */
>
> -#include <linux/bitops.h>
> +#include <drm/drm_gem.h>
> #include <drm/panthor_drm.h>
> +#include <linux/bitops.h>
> +#include <linux/circ_buf.h>
>
> #include "panthor_device.h"
> #include "panthor_fw.h"
> #include "panthor_perf.h"
>
> +/**
> + * 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).
> + */
> +#define PANTHOR_PERF_EM_BITS (BITS_PER_TYPE(u64) * 2)
> +
> +enum panthor_perf_session_state {
> + /** @PANTHOR_PERF_SESSION_ACTIVE: The session is active and can be used for sampling. */
> + PANTHOR_PERF_SESSION_ACTIVE = 0,
> +
> + /**
> + * @PANTHOR_PERF_SESSION_OVERFLOW: The session encountered an overflow in one of the
> + * counters during the last sampling period. This flag
> + * gets propagated as part of samples emitted for this
> + * session, to ensure the userspace client can gracefully
> + * handle this data corruption.
> + */
> + PANTHOR_PERF_SESSION_OVERFLOW,
> +
> + /* Must be last */
> + PANTHOR_PERF_SESSION_MAX,
> +};
> +
> +struct panthor_perf_enable_masks {
> + /**
> + * @mask: Array of bitmasks indicating the counters userspace requested, where
> + * one bit represents a single counter. Used to build the firmware configuration
> + * and ensure that userspace clients obtain only the counters they requested.
> + */
> + unsigned long mask[DRM_PANTHOR_PERF_BLOCK_MAX][BITS_TO_LONGS(PANTHOR_PERF_EM_BITS)];
> +};
> +
> +struct panthor_perf_counter_block {
> + struct drm_panthor_perf_block_header header;
> + u64 counters[];
> +};
I think something has gone rather wrong in a rebasing. This struct was
already added in patch 2. So this causes a build error (that the kernel
test robot caught too).
[...]
> @@ -72,6 +236,122 @@ static void panthor_perf_info_init(struct panthor_device *ptdev)
> perf_info->sample_size = session_get_user_sample_size(perf_info);
> }
>
> +static struct panthor_perf_enable_masks *panthor_perf_create_em(struct drm_panthor_perf_cmd_setup
> + *setup_args)
There's some code style mis-formatting like this - which is then fixed
up in patch 5. So it looks like you've applied fixups to the wrong commit.
Also this series will need rebasing because there's some upstream
changes that it's now conflicting with. The base commit looks pretty
ancient now.
Thanks,
Steve
next prev parent reply other threads:[~2025-06-20 15:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 15:49 [PATCH v4 0/7] Performance counter implementation with single manual client support Lukas Zapolskas
2025-05-16 15:49 ` [PATCH v4 1/7] drm/panthor: Add performance counter uAPI Lukas Zapolskas
2025-07-18 2:43 ` Adrián Larumbe
2025-07-21 8:46 ` Lukas Zapolskas
2025-05-16 15:49 ` [PATCH v4 2/7] drm/panthor: Add DEV_QUERY.PERF_INFO handling for Gx10 Lukas Zapolskas
2025-07-18 2:52 ` Adrián Larumbe
2025-07-21 9:04 ` Lukas Zapolskas
2025-07-18 15:11 ` Adrián Larumbe
2025-07-21 9:06 ` Lukas Zapolskas
2025-05-16 15:49 ` [PATCH v4 3/7] drm/panthor: Add panthor perf initialization and termination Lukas Zapolskas
2025-07-18 3:10 ` Adrián Larumbe
2025-07-21 9:10 ` Lukas Zapolskas
2025-05-16 15:49 ` [PATCH v4 4/7] drm/panthor: Introduce sampling sessions to handle userspace clients Lukas Zapolskas
2025-05-17 7:53 ` kernel test robot
2025-06-20 15:28 ` Steven Price [this message]
2025-07-21 9:58 ` Lukas Zapolskas
2025-07-18 3:34 ` Adrián Larumbe
2025-07-21 9:53 ` Lukas Zapolskas
2025-05-16 15:49 ` [PATCH v4 5/7] drm/panthor: Implement the counter sampler and sample handling Lukas Zapolskas
2025-05-17 8:56 ` kernel test robot
2025-07-18 14:49 ` Adrián Larumbe
2025-07-25 10:29 ` Lukas Zapolskas
2025-05-16 15:49 ` [PATCH v4 6/7] drm/panthor: Add suspend, resume and reset handling Lukas Zapolskas
2025-07-18 15:01 ` Adrián Larumbe
2025-07-25 9:26 ` Lukas Zapolskas
2025-05-16 15:49 ` [PATCH v4 7/7] drm/panthor: Expose the panthor perf ioctls Lukas Zapolskas
2025-07-18 15:05 ` Adrián Larumbe
2025-07-18 15:19 ` Adrián Larumbe
2025-07-25 9:09 ` 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=057bf373-7860-4b93-93c2-218adbff61a2@arm.com \
--to=steven.price@arm.com \
--cc=adrian.larumbe@collabora.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.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=mripard@kernel.org \
--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
all inboxes | Powered by JetHome®