From: Christian Gmeiner <christian.gmeiner@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: linux+etnaviv@armlinux.org.uk, cphealy@gmail.com
Subject: [PATCH 01/10] drm/etnaviv: add uapi for register read feature
Date: Fri, 9 Dec 2016 12:21:22 +0100 [thread overview]
Message-ID: <20161209112131.3924-2-christian.gmeiner@gmail.com> (raw)
In-Reply-To: <20161209112131.3924-1-christian.gmeiner@gmail.com>
We need to readout some registers _after_ the submited command
buffer got executed in order to support perf counters.
There is no way to read register via command stream - even the
Vivante kernel driver does it via a special ioctl.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
include/uapi/drm/etnaviv_drm.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/uapi/drm/etnaviv_drm.h b/include/uapi/drm/etnaviv_drm.h
index 2584c1c..0d30604 100644
--- a/include/uapi/drm/etnaviv_drm.h
+++ b/include/uapi/drm/etnaviv_drm.h
@@ -150,6 +150,13 @@ struct drm_etnaviv_gem_submit_bo {
__u64 presumed; /* in/out, presumed buffer address */
};
+struct drm_etnaviv_gem_submit_readback {
+ __u32 readback_offset;/* in, offset from readback_bo */
+ __u32 readback_idx; /* in, index of readback_bo buffer */
+ __u32 reg; /* in, register to read */
+ __u32 flags; /* in, needs to be 0 */
+};
+
/* Each cmdstream submit consists of a table of buffers involved, and
* one or more cmdstream buffers. This allows for conditional execution
* (context-restore), and IB buffers needed for per tile/bin draw cmds.
@@ -167,6 +174,9 @@ struct drm_etnaviv_gem_submit {
__u64 bos; /* in, ptr to array of submit_bo's */
__u64 relocs; /* in, ptr to array of submit_reloc's */
__u64 stream; /* in, ptr to cmdstream */
+ __u64 readbacks; /* in, ptr to array of submit_readback's */
+ __u32 nr_readbacks; /* in, number of submit_readback's */
+ __u32 padding;
};
/* The normal way to synchronize with the GPU is just to CPU_PREP on
--
2.9.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-12-09 11:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 11:21 [PATCH 00/10] drm/etnaviv: add readout support Christian Gmeiner
2016-12-09 11:21 ` Christian Gmeiner [this message]
2017-01-30 10:50 ` [PATCH 01/10] drm/etnaviv: add uapi for register read feature Lucas Stach
2017-01-30 20:18 ` Thierry Reding
2017-01-30 23:45 ` Russell King - ARM Linux
2017-01-31 7:40 ` Daniel Vetter
2016-12-09 11:21 ` [PATCH 02/10] drm/etnaviv: add internal representation of readback Christian Gmeiner
2016-12-09 11:21 ` [PATCH 03/10] drm/etnaviv: rework error handling Christian Gmeiner
2016-12-09 11:21 ` [PATCH 04/10] drm/etnaviv: extend etnaviv_gpu_cmdbuf_new(..) with nr_readbacks Christian Gmeiner
2016-12-09 11:21 ` [PATCH 05/10] drm/etnaviv: copy readbacks from userspace Christian Gmeiner
2016-12-09 11:21 ` [PATCH 06/10] drm/etnaviv: store readback data in struct etnaviv_event Christian Gmeiner
2016-12-09 11:21 ` [PATCH 07/10] drm/etnaviv: process readbacks in interrupt handler Christian Gmeiner
2016-12-09 11:21 ` [PATCH 08/10] drm/etnaviv: make it possible to reconfigure perf counter Christian Gmeiner
2016-12-09 15:48 ` Wladimir J. van der Laan
2016-12-09 17:56 ` Christian Gmeiner
2017-01-30 11:01 ` Lucas Stach
2017-01-30 23:40 ` Russell King - ARM Linux
2016-12-09 11:21 ` [PATCH 09/10] drm/etnaviv: validate readback register address Christian Gmeiner
2017-01-30 10:58 ` Lucas Stach
2017-01-30 23:38 ` Russell King - ARM Linux
2016-12-09 11:21 ` [PATCH 10/10] drm/etnaviv: add readout param Christian Gmeiner
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=20161209112131.3924-2-christian.gmeiner@gmail.com \
--to=christian.gmeiner@gmail.com \
--cc=cphealy@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux+etnaviv@armlinux.org.uk \
/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