From: Rob Clark <rob.clark@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
freedreno@lists.freedesktop.org,
Akhil P Oommen <akhilpo@oss.qualcomm.com>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Bill Wendling <morbo@google.com>,
David Airlie <airlied@gmail.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Jessica Zhang <jesszhan0024@gmail.com>,
Justin Stitt <justinstitt@google.com>,
Konrad Dybcio <konradybcio@kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b"
<llvm@lists.linux.dev>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Marijn Suijten <marijn.suijten@somainline.org>,
Maxime Ripard <mripard@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Sean Paul <sean@poorly.run>, Simona Vetter <simona@ffwll.ch>,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH 00/13] drm/msm: Add PERFCNTR_CONFIG ioctl
Date: Wed, 22 Apr 2026 10:29:57 -0700 [thread overview]
Message-ID: <CACSVV02a0tt83+G6svZ_foEuoZ=aag75z7D8TveQnLO74pTMww@mail.gmail.com> (raw)
In-Reply-To: <b4hkax45ohmz3dk4b2wgfmq73px7er66wqxixquxhwd64ngboa@zu4frfofekef>
On Tue, Apr 21, 2026 at 6:54 PM Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> wrote:
>
> On Mon, Apr 20, 2026 at 03:25:22PM -0700, Rob Clark wrote:
> > Add a new PERFCNTR_CONFIG ioctl, serving two functions:
> >
> > 1. Global counter collection (restricted to perfmon_capable()) using the
> > MSM_PERFCNTR_STREAM flag. Global counter sampling is, global, across
> > contexts. Only a single global counter stream is allowed at a time.
> > 2. Reserve counters for local counter collection. Local counter
> > collection is local to a cmdstream (GEM_SUBMIT), and as such is
> > allowed in all processes without additional privileges.
> >
> > The kernel enforces that counters assigned for global counter collection
> > do not conflict with counters reserved for local counter collection, and
> > visa versa. Since local counter collection is scoped to a single cmd-
> > stream, multiple UMD processes can overlap in their reserved counters.
> > But cannot conflict with global counter usage.
> >
> > In the case of local counter collection, the UMD is still responsible
> > for programming the corresponding SELect registers, and sampling the
> > counter values, from it's cmdstream. But by performing the reservation
> > step, the UMD protects itself from the kernel trying to use the same
> > SEL/counter regs for global counter collection.
> >
> > For global counter collection, the kernel programs SEL regs, and sets up
> > a timer for counter sampling. Userspace reads out the sampled values
> > from the returned perfcntr stream fd. Releasing the global perfcntr
> > stream is simply a matter of close()ing the fd.
> >
> > Since the counter sampling is done in the kernel, this prepares us for
> > not having to disable IFPC while global counter sampling is active. But
> > wiring this up will come in a later patch.
> >
> > The mesa side of this is at:
> > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40522
> >
> > Rob Clark (13):
> > drm/msm: Remove obsolete perf infrastructure
> > drm/msm/adreno: Sync registers from mesa
> > drm/msm/registers: Sync gen_header.py from mesa
> > drm/msm/registers: Add perfcntr json
> > drm/msm: Allow CAP_PERFMON for setting SYSPROF
> > drm/msm: Add a6xx+ perfcntr tables
> > drm/msm: Add sysprof accessors
> > drm/msm/a6xx: Add yield & flush helper
> > drm/msm: Add per-context perfcntr state
> > drm/msm: Add basic perfcntr infrastructure
> > drm/msm/a6xx+: Add support to configure perfcntrs
> > drm/msm/a8xx: Add perfcntr flush sequence
> > drm/msm: Add PERFCNTR_CONFIG ioctl
> >
> The series doesn't apply to linux-next. Please switch to b4 and use b4
> --edit-deps to specify dependencies.
fwiw 20260411150312.257937-1-robin.clark@oss.qualcomm.com is the thing
missing from linux-next
BR,
-R
next prev parent reply other threads:[~2026-04-22 17:30 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 22:25 [PATCH 00/13] drm/msm: Add PERFCNTR_CONFIG ioctl Rob Clark
2026-04-20 22:25 ` [PATCH 01/13] drm/msm: Remove obsolete perf infrastructure Rob Clark
2026-04-20 23:49 ` Dmitry Baryshkov
2026-04-21 13:07 ` Rob Clark
2026-04-21 15:39 ` Dmitry Baryshkov
2026-04-21 20:48 ` Rob Clark
2026-04-22 0:41 ` Dmitry Baryshkov
2026-04-22 14:41 ` Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 02/13] drm/msm/adreno: Sync registers from mesa Rob Clark
2026-04-20 23:50 ` Dmitry Baryshkov
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 03/13] drm/msm/registers: Sync gen_header.py " Rob Clark
2026-04-22 3:39 ` Dmitry Baryshkov
2026-04-22 13:36 ` Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 04/13] drm/msm/registers: Add perfcntr json Rob Clark
2026-04-22 3:34 ` Dmitry Baryshkov
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 05/13] drm/msm: Allow CAP_PERFMON for setting SYSPROF Rob Clark
2026-04-21 1:55 ` Dmitry Baryshkov
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 06/13] drm/msm: Add a6xx+ perfcntr tables Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 07/13] drm/msm: Add sysprof accessors Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 08/13] drm/msm/a6xx: Add yield & flush helper Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 09/13] drm/msm: Add per-context perfcntr state Rob Clark
2026-04-22 3:37 ` Dmitry Baryshkov
2026-04-22 14:13 ` Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 10/13] drm/msm: Add basic perfcntr infrastructure Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 11/13] drm/msm/a6xx+: Add support to configure perfcntrs Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 12/13] drm/msm/a8xx: Add perfcntr flush sequence Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 13/13] drm/msm: Add PERFCNTR_CONFIG ioctl Rob Clark
2026-04-22 3:41 ` Dmitry Baryshkov
2026-04-22 14:20 ` Rob Clark
2026-04-22 17:48 ` Dmitry Baryshkov
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-22 1:54 ` [PATCH 00/13] " Dmitry Baryshkov
2026-04-22 17:29 ` Rob Clark [this message]
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
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='CACSVV02a0tt83+G6svZ_foEuoZ=aag75z7D8TveQnLO74pTMww@mail.gmail.com' \
--to=rob.clark@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=akhilpo@oss.qualcomm.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=justinstitt@google.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=morbo@google.com \
--cc=mripard@kernel.org \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=sean@poorly.run \
--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