Message ID | 20240807160900.149154-3-mary.guillemard@collabora.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/panfrost: Wire cycle counters and timestamp info to userspace | expand |
On 07/08/2024 17:08, Mary Guillemard wrote: > Extend the uAPI with a new job requirement flag for cycle > counters. This requirement is used by userland to indicate that a job > requires cycle counters or system timestamp to be propagated. (for use > with write value timestamp jobs) > > We cannot enable cycle counters unconditionally as this would result in > an increase of GPU power consumption. As a result, they should be left > off unless required by the application. > > This new uAPI will be used in Mesa to implement timestamp queries and > VK_KHR_shader_clock. > > Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Makes sense, but I'm not sure why this needs to be it's own patch - I'd squash this with the next one where it actually gets used. Steve > --- > include/uapi/drm/panfrost_drm.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/uapi/drm/panfrost_drm.h b/include/uapi/drm/panfrost_drm.h > index 52b050e2b660..568724be6628 100644 > --- a/include/uapi/drm/panfrost_drm.h > +++ b/include/uapi/drm/panfrost_drm.h > @@ -40,6 +40,7 @@ extern "C" { > #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_CYCLE_COUNT (1 << 1) > /** > * struct drm_panfrost_submit - ioctl argument for submitting commands to the 3D > * engine.
diff --git a/include/uapi/drm/panfrost_drm.h b/include/uapi/drm/panfrost_drm.h index 52b050e2b660..568724be6628 100644 --- a/include/uapi/drm/panfrost_drm.h +++ b/include/uapi/drm/panfrost_drm.h @@ -40,6 +40,7 @@ extern "C" { #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_CYCLE_COUNT (1 << 1) /** * struct drm_panfrost_submit - ioctl argument for submitting commands to the 3D * engine.
Extend the uAPI with a new job requirement flag for cycle counters. This requirement is used by userland to indicate that a job requires cycle counters or system timestamp to be propagated. (for use with write value timestamp jobs) We cannot enable cycle counters unconditionally as this would result in an increase of GPU power consumption. As a result, they should be left off unless required by the application. This new uAPI will be used in Mesa to implement timestamp queries and VK_KHR_shader_clock. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> --- include/uapi/drm/panfrost_drm.h | 1 + 1 file changed, 1 insertion(+)