From: Johnny Liu <johnliu@nvidia.com>
To: <krzk@kernel.org>
Cc: <airlied@gmail.com>, <conor+dt@kernel.org>,
<devicetree@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
<johnliu@nvidia.com>, <jonathanh@nvidia.com>,
<krzk+dt@kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-media@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
<luca.ceresoli@bootlin.com>, <maarten.lankhorst@linux.intel.com>,
<mperttunen@nvidia.com>, <mripard@kernel.org>, <robh@kernel.org>,
<simona@ffwll.ch>, <skomatineni@nvidia.com>,
<thierry.reding@gmail.com>, <tzimmermann@suse.de>
Subject: Re: [PATCH v1 3/5] gpu: host1x: Support device monitoring with actmon
Date: Thu, 19 Dec 2024 12:29:50 -0800 [thread overview]
Message-ID: <20241219202950.15277-1-johnliu@nvidia.com> (raw)
In-Reply-To: <b7bd87f8-d651-4d27-bfc7-040a5192f285@kernel.org>
> On 10/12/2024 18:45, Johnny Liu wrote:
>
> > +
> > +static int host1x_actmon_sample_period_set(void *data, u64 val)
> > +{
> > + struct host1x_actmon *actmon = (struct host1x_actmon *)data;
> > +
> > + actmon->usecs_per_sample = (u32)val;
> > + host1x_actmon_update_sample_period(actmon);
> > +
> > + return 0;
> > +}
> > +
> > +DEFINE_SIMPLE_ATTRIBUTE(host1x_actmon_sample_period_fops,
> > + host1x_actmon_sample_period_get,
> > + host1x_actmon_sample_period_set,
> > + "%lld\n");
> > +
> > +/**
> > + * host1x_actmon_debug_init - Initialize actmon debugfs
>
>
> No, debugfs is only for debugging, not for usual interfaces. You now
> added several driver knobs bypassing any ABI documentation.
Thank you for pointing out the issue. I will expose these control
interfaces under sysfs, probably hwmon, in the next patch series.
> > + * @actmon: the actmon instance being configured
> > + * @name: an unique name of the actmon
> > + *
> > + * There are multiple modules available inside the actmon, and they perform the
> > + * signal sampling at the same rate. The debugfs of an actmon will expose this
> > + * shared configuration, sample_period, via a debugfs node:
> > + * - sample_period:
> > + * Sampling period in micro-second of modules inside the actmon
> > + */
> > +static void host1x_actmon_debug_init(struct host1x_actmon *actmon, const char *name)
> > +{
> > + struct host1x *host = dev_get_drvdata(actmon->client->host->parent);
> > +
> > + if (!host->debugfs) {
> > + dev_warn(host->dev, "debugfs is unavailable\n");
> > + return;
> > + }
> > +
> > + if (!host->actmon_debugfs)
> > + host->actmon_debugfs = debugfs_create_dir("actmon", host->debugfs);
> > +
> > + actmon->debugfs = debugfs_create_dir(name, host->actmon_debugfs);
> > +
> > + /* R/W files */
> > + debugfs_create_file("sample_period", 0644, actmon->debugfs, actmon,
> > + &host1x_actmon_sample_period_fops);
> > +}
> > +
Thanks,
Johnny
next prev parent reply other threads:[~2024-12-19 20:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 17:45 [PATCH v1 0/5] Support host1x actmon Johnny Liu
2024-12-10 17:45 ` [PATCH v1 1/5] dt-bindings: display: tegra: Add actmon information Johnny Liu
2024-12-13 10:44 ` Krzysztof Kozlowski
2024-12-13 23:29 ` Johnny Liu
2024-12-16 7:26 ` Krzysztof Kozlowski
2024-12-17 1:08 ` Johnny Liu
2024-12-17 5:36 ` Krzysztof Kozlowski
2024-12-10 17:45 ` [PATCH v1 2/5] arm64: " Johnny Liu
2024-12-10 17:45 ` [PATCH v1 3/5] gpu: host1x: Support device monitoring with actmon Johnny Liu
2024-12-17 5:39 ` Krzysztof Kozlowski
2024-12-19 20:29 ` Johnny Liu [this message]
2024-12-10 17:45 ` [PATCH v1 4/5] drm/tegra: nvdec: Register the device " Johnny Liu
2024-12-10 17:45 ` [PATCH v1 5/5] drm/tegra: vic: " Johnny Liu
2024-12-13 10:42 ` [PATCH v1 0/5] Support host1x actmon Krzysztof Kozlowski
2024-12-13 23:17 ` Johnny Liu
2024-12-16 7:27 ` Krzysztof Kozlowski
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=20241219202950.15277-1-johnliu@nvidia.com \
--to=johnliu@nvidia.com \
--cc=airlied@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mperttunen@nvidia.com \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=skomatineni@nvidia.com \
--cc=thierry.reding@gmail.com \
--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