On 27/05/2021 21:38, alyssa.rosenzweig@xxxxxxxxxxxxx wrote: > From: Alyssa Rosenzweig <alyssa.rosenzweig@xxxxxxxxxxxxx> > > 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@xxxxxxxxxxxxx> > --- > 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. >