From: Steven Price <steven.price@arm.com>
To: alyssa.rosenzweig@collabora.com, dri-devel@lists.freedesktop.org
Cc: airlied@linux.ie, tomeu.vizoso@collabora.com
Subject: Re: [PATCH 1/4] drm/panfrost: Add cycle counter job requirement
Date: Wed, 2 Jun 2021 12:50:22 +0100 [thread overview]
Message-ID: <04e194a4-529a-720d-d414-c9df7e5686a0@arm.com> (raw)
In-Reply-To: <20210527203804.12914-2-alyssa.rosenzweig@collabora.com>
On 27/05/2021 21:38, alyssa.rosenzweig@collabora.com wrote:
> From: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
>
> Extend the Panfrost UABI with a new job requirement for cycle counters
> (and GPU timestamps, by extension). This requirement is used in
> userspace to implement ARB_shader_clock, an OpenGL extension reporting
> the GPU cycle count within a shader. The same mechanism will be required
> to implement timestamp queries as a "write value - timestamp" job.
>
> We cannot enable cycle counters unconditionally, as enabling them
> increases GPU power consumption. They should be left off unless actually
> required by the application for profiling purposes.
>
> Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
> ---
> include/uapi/drm/panfrost_drm.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/drm/panfrost_drm.h b/include/uapi/drm/panfrost_drm.h
> index ec19db1ee..27e6cb941 100644
> --- a/include/uapi/drm/panfrost_drm.h
> +++ b/include/uapi/drm/panfrost_drm.h
> @@ -39,7 +39,8 @@ extern "C" {
> #define DRM_IOCTL_PANFROST_PERFCNT_ENABLE DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_PERFCNT_ENABLE, struct drm_panfrost_perfcnt_enable)
> #define DRM_IOCTL_PANFROST_PERFCNT_DUMP DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_PERFCNT_DUMP, struct drm_panfrost_perfcnt_dump)
>
> -#define PANFROST_JD_REQ_FS (1 << 0)
> +#define PANFROST_JD_REQ_FS (1 << 0)
> +#define PANFROST_JD_REQ_PERMON (1 << 1)
As noted PERMON is a bit jargony but matches kbase. Another option to
aid with the bike shedding could be _REQ_CYCLE_COUNT as this is
requesting cycle counters (and timestamp propagation). But I don't mind
the colour of the shed as long as it doesn't leak... ;)
Thanks,
Steve
> /**
> * struct drm_panfrost_submit - ioctl argument for submitting commands to the 3D
> * engine.
>
next prev parent reply other threads:[~2021-06-02 11:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-27 20:38 [PATCH 0/4] drm/panfrost: Plumb cycle counters to userspace alyssa.rosenzweig
2021-05-27 20:38 ` [PATCH 1/4] drm/panfrost: Add cycle counter job requirement alyssa.rosenzweig
2021-06-02 11:50 ` Steven Price [this message]
2021-05-27 20:38 ` [PATCH 2/4] drm/panfrost: Add CYCLE_COUNT_START/STOP commands alyssa.rosenzweig
2021-06-02 11:50 ` Steven Price
2021-05-27 20:38 ` [PATCH 3/4] drm/panfrost: Add permon acquire/release helpers alyssa.rosenzweig
2021-06-02 11:50 ` Steven Price
2021-05-27 20:38 ` [PATCH 4/4] drm/panfrost: Handle PANFROST_JD_REQ_PERMON alyssa.rosenzweig
2021-06-02 11:50 ` Steven Price
2021-05-27 21:14 ` [PATCH 0/4] drm/panfrost: Plumb cycle counters to userspace Alyssa Rosenzweig
2021-05-28 6:07 ` Tomeu Vizoso
2021-05-28 13:31 ` Alyssa Rosenzweig
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=04e194a4-529a-720d-d414-c9df7e5686a0@arm.com \
--to=steven.price@arm.com \
--cc=airlied@linux.ie \
--cc=alyssa.rosenzweig@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=tomeu.vizoso@collabora.com \
/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