From: Daniel Vetter <daniel@ffwll.ch>
To: Kenneth Graunke <kenneth@whitecape.org>,
Brad Volkin <bradley.d.volkin@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Add OACONTROL to the command parser register whitelist.
Date: Wed, 26 Mar 2014 07:21:23 +0100 [thread overview]
Message-ID: <20140326062123.GO26878@phenom.ffwll.local> (raw)
In-Reply-To: <1395813123-2027-1-git-send-email-kenneth@whitecape.org>
On Tue, Mar 25, 2014 at 10:52:03PM -0700, Kenneth Graunke wrote:
> Mesa needs to be able to write OACONTROL in order to expose the
> Observability Architecture's performance counters via OpenGL.
>
> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Thanks a lot for quickly tracking this down. Now when we've talked about
OA a little while ago we concluded that mesa should clear OACONTROL again
before the batch ends to make sure that userspace can't unduly observe
other processes. So I think it'd be worth to keep track of this with a
flag (set when OACONTROL is != 0 and reset when the batch loads 0). Also
we need to make sure that userspace sets the right OACONTROL modes (not
the one which streams into a global gtt buffer essentially). So some
additional work required.
I've added a FIXME comment to the code.
Brad, can you please look into this, including the corresponding i-g-t
which tries to enable OA but doesn't disable it and one which tries to
enable it in the continuous mode (which writes to gtt)? Ken's previous
mails has the cmds mesa emits.
Thanks, Daniel
> ---
> drivers/gpu/drm/i915/i915_cmd_parser.c | 1 +
> drivers/gpu/drm/i915/i915_reg.h | 2 ++
> 2 files changed, 3 insertions(+)
>
> This patch needs to go before
>
> commit 6d42f94084b8c69813d7ecd0466c33fe561bf127
> Author: Brad Volkin <bradley.d.volkin@intel.com>
> Date: Tue Feb 18 10:15:57 2014 -0800
>
> drm/i915: Enable command parsing by default
>
> in whatever branch gets submitted to Dave Airlie. Or, that commit needs
> to be reverted. Otherwise, every OpenGL program will abort. Examples
> of programs that abort include GNOME, KDE, Firefox, and glxgears.
>
> diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
> index bae7c2f..d4a50b9 100644
> --- a/drivers/gpu/drm/i915/i915_cmd_parser.c
> +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
> @@ -415,6 +415,7 @@ static const u32 gen7_render_regs[] = {
> GEN7_SO_WRITE_OFFSET(1),
> GEN7_SO_WRITE_OFFSET(2),
> GEN7_SO_WRITE_OFFSET(3),
> + OACONTROL,
> };
>
> static const u32 gen7_blt_regs[] = {
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 9f9e2b7..0ebc20d 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -427,6 +427,8 @@
> /* There are the 4 64-bit counter registers, one for each stream output */
> #define GEN7_SO_NUM_PRIMS_WRITTEN(n) (0x5200 + (n) * 8)
>
> +#define OACONTROL 0x2360
> +
> #define _GEN7_PIPEA_DE_LOAD_SL 0x70068
> #define _GEN7_PIPEB_DE_LOAD_SL 0x71068
> #define GEN7_PIPE_DE_LOAD_SL(pipe) _PIPE(pipe, \
> --
> 1.9.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-03-26 6:21 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 5:52 [PATCH] drm/i915: Add OACONTROL to the command parser register whitelist Kenneth Graunke
2014-03-26 6:21 ` Daniel Vetter [this message]
2014-03-26 16:03 ` Volkin, Bradley D
2014-03-26 16:38 ` Daniel Vetter
2014-03-26 17:37 ` Kenneth Graunke
2014-03-26 18:26 ` Volkin, Bradley D
2014-03-26 21:48 ` Daniel Vetter
2014-03-26 22:34 ` Kenneth Graunke
2014-03-27 7:57 ` Daniel Vetter
2014-03-27 15:57 ` Volkin, Bradley D
2014-03-27 20:16 ` Daniel Vetter
2014-03-27 21:34 ` Kenneth Graunke
2014-03-27 22:44 ` Daniel Vetter
2014-03-27 23:22 ` Kenneth Graunke
2014-05-16 19:05 ` Jesse Barnes
2014-05-16 19:20 ` Chris Wilson
2014-05-16 19:34 ` Jesse Barnes
2014-05-16 19:49 ` Chris Wilson
2014-05-16 20:12 ` Jesse Barnes
2014-05-16 19:53 ` Jesse Barnes
2014-05-16 20:12 ` Volkin, Bradley D
2014-05-16 20:14 ` Jesse Barnes
2014-03-27 23:42 ` Volkin, Bradley D
2014-03-28 7:36 ` Chris Wilson
2014-03-26 9:57 ` Jani Nikula
2014-03-26 10:41 ` [PATCH v2] " Kenneth Graunke
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=20140326062123.GO26878@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=bradley.d.volkin@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kenneth@whitecape.org \
/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