All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/vc4: Expose HW perf counters
@ 2017-12-07 15:43 Boris Brezillon
  2017-12-07 15:43 ` [PATCH 1/2] drm/vc4: Add a mechanism to easily extend CL submissions Boris Brezillon
  2017-12-07 15:43 ` [PATCH 2/2] drm/vc4: Expose performance counters to userspace Boris Brezillon
  0 siblings, 2 replies; 5+ messages in thread
From: Boris Brezillon @ 2017-12-07 15:43 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, dri-devel, Eric Anholt
  Cc: Boris Brezillon, Eben Upton

Hello,

Here is a proposal to expose VC4 HW perf counters to userspace. This
is done through 3 new ioctls which are allowing one to create, destroy
and query the status of a perf monitor object.

A perfmon object does not count things by its own, it has to be
attached to a SUBMIT_CL request to be activated. After the request, the
perfmon object stays around and can be attached to another request if
needed. Everytime the perfmon is attached to a SUBMIT_CL request, its
values are incremented by the HW perf counter values, so that the
counters can count things across GPU jobs. If you want to reset the
values of a perfmon, just destroy it and create a new one.

Note that the first patch is not directly related to perfmon itself,
but will allow us to easily extend what is passed to a SUBMIT_CL
request without having to add new ioctls.

Regards,

Boris
---

Boris Brezillon (2):
  drm/vc4: Add a mechanism to easily extend CL submissions
  drm/vc4: Expose performance counters to userspace

 drivers/gpu/drm/vc4/Makefile      |   1 +
 drivers/gpu/drm/vc4/vc4_drv.c     |  27 ++++++
 drivers/gpu/drm/vc4/vc4_drv.h     |  45 +++++++++
 drivers/gpu/drm/vc4/vc4_gem.c     |  89 ++++++++++++++++-
 drivers/gpu/drm/vc4/vc4_irq.c     |  13 ++-
 drivers/gpu/drm/vc4/vc4_perfmon.c | 195 ++++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/vc4/vc4_regs.h    |  35 +------
 drivers/gpu/drm/vc4/vc4_v3d.c     |  64 ++++++-------
 include/uapi/drm/vc4_drm.h        | 156 ++++++++++++++++++++++++++++--
 9 files changed, 545 insertions(+), 80 deletions(-)
 create mode 100644 drivers/gpu/drm/vc4/vc4_perfmon.c

-- 
2.11.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-12-22 20:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-07 15:43 [PATCH 0/2] drm/vc4: Expose HW perf counters Boris Brezillon
2017-12-07 15:43 ` [PATCH 1/2] drm/vc4: Add a mechanism to easily extend CL submissions Boris Brezillon
2017-12-22 20:53   ` Eric Anholt
2017-12-22 20:59     ` Boris Brezillon
2017-12-07 15:43 ` [PATCH 2/2] drm/vc4: Expose performance counters to userspace Boris Brezillon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.