Skip to content

drm/etnaviv: add readout support

Christian Gmeiner dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10drm/etnaviv: add uapi for register read featureinclude/uapi/drm/etnaviv_drm.h+10 -04 replies
2/10drm/etnaviv: add internal representation of readbackdrivers/gpu/drm/etnaviv/etnaviv_gpu.h+9 -00 replies
3/10drm/etnaviv: rework error handlingdrivers/gpu/drm/etnaviv/etnaviv_gpu.c+8 -50 replies
4/10drm/etnaviv: extend etnaviv_gpu_cmdbuf_new(..) with nr_readbacksdrivers/gpu/drm/etnaviv/etnaviv_gem_submit.c drivers/gpu/drm/etnaviv/etnaviv_gpu.c drivers/gpu/drm/etnaviv/etnaviv_gpu.h+14 -40 replies
5/10drm/etnaviv: copy readbacks from userspacedrivers/gpu/drm/etnaviv/etnaviv_gem_submit.c+51 -20 replies
6/10drm/etnaviv: store readback data in struct etnaviv_eventdrivers/gpu/drm/etnaviv/etnaviv_gpu.c drivers/gpu/drm/etnaviv/etnaviv_gpu.h+5 -00 replies
7/10drm/etnaviv: process readbacks in interrupt handlerdrivers/gpu/drm/etnaviv/etnaviv_gpu.c+17 -00 replies
8/10drm/etnaviv: make it possible to reconfigure perf counterdrivers/gpu/drm/etnaviv/etnaviv_gem_submit.c drivers/gpu/drm/etnaviv/etnaviv_gpu.c drivers/gpu/drm/etnaviv/etnaviv_gpu.h +1 more+16 -34 replies
9/10drm/etnaviv: validate readback register addressdrivers/gpu/drm/etnaviv/etnaviv_gem_submit.c+26 -02 replies
10/10drm/etnaviv: add readout paramdrivers/gpu/drm/etnaviv/etnaviv_gpu.c include/uapi/drm/etnaviv_drm.h+6 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/10] drm/etnaviv: add readout support

In a perfect world we would be able to read GPU registers of interest via the command stream with a 'read-register' command/package. For perf counters it is a must to read them synchronized with the GPU to put the values in relation to a draw command. As Vivante GPUs do not provide this functionality we need to emulate it via software and do the reading of registers in the isr.

With the help of this patch series it is possible to read back register values and store them in a defined bo at defined offsets. As we want to readback such values within the context of the submit the struct drm_etnaviv_gem_submit gets extend with the number of readbacks and a pointer to the readbacks array.

We are also in the lucky situation that we can not write every register via the command stream - perf counter mux configuration - that there is a need for two different types of readbacks:
- normal ones
Only read the defined register and store its value in the bo.

- perf ones
Provide an extra register/value pair to configure the mux before the register gets read. It is possible to reset all perf counters of a mux by selecting the 16 mux input. For this case we need to do a dummy read at the moment.

A very simple usage demo can be found here:
https://github.com/austriancoder/libdrm/tree/readback_v1

I am currently getting the mesa part for hw queries ready for review.

Christian Gmeiner (10):
drm/etnaviv: add uapi for register read feature drm/etnaviv: add internal representation of readback drm/etnaviv: rework error handling
drm/etnaviv: extend etnaviv_gpu_cmdbuf_new(..) with nr_readbacks drm/etnaviv: copy readbacks from userspace drm/etnaviv: store readback data in struct etnaviv_event drm/etnaviv: process readbacks in interrupt handler drm/etnaviv: make it possible to reconfigure perf counter drm/etnaviv: validate readback register address drm/etnaviv: add readout param

 drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 82 +++++++++++++++++++++++++++-
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c        | 54 +++++++++++++++---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.h        | 16 +++++-
 include/uapi/drm/etnaviv_drm.h               | 16 ++++++
 4 files changed, 158 insertions(+), 10 deletions(-)
Signature · 6 lines
2.9.3

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel