From: Kenneth Graunke <kenneth@whitecape.org>
To: bradley.d.volkin@intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Add more registers to the whitelist for mesa
Date: Wed, 09 Apr 2014 09:22:19 -0700 [thread overview]
Message-ID: <534573BB.2090009@whitecape.org> (raw)
In-Reply-To: <1396991938-6673-1-git-send-email-bradley.d.volkin@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 2831 bytes --]
On 04/08/2014 02:18 PM, bradley.d.volkin@intel.com wrote:
> From: Brad Volkin <bradley.d.volkin@intel.com>
>
> These are additional registers needed for performance monitoring and
> ARB_draw_indirect extensions in mesa.
Whoops...I totally missed this. Thanks!
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76719
> Cc: Kenneth Graunke <kenneth@whitecape.org>
> Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
> ---
> drivers/gpu/drm/i915/i915_cmd_parser.c | 9 +++++++++
> drivers/gpu/drm/i915/i915_reg.h | 8 ++++++++
> 2 files changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
> index 29184d6..3486ef7 100644
> --- a/drivers/gpu/drm/i915/i915_cmd_parser.c
> +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
> @@ -408,10 +408,19 @@ static const u32 gen7_render_regs[] = {
> REG64(PS_INVOCATION_COUNT),
> REG64(PS_DEPTH_COUNT),
> OACONTROL, /* Only allowed for LRI and SRM. See below. */
It would be great to add:
GEN7_3DPRIM_END_OFFSET,
which is the other ARB_draw_indirect register. I have no idea why we
don't use it - sure seems like we should...
> + GEN7_3DPRIM_START_VERTEX,
> + GEN7_3DPRIM_VERTEX_COUNT,
> + GEN7_3DPRIM_INSTANCE_COUNT,
> + GEN7_3DPRIM_START_INSTANCE,
> + GEN7_3DPRIM_BASE_VERTEX,
> REG64(GEN7_SO_NUM_PRIMS_WRITTEN(0)),
> REG64(GEN7_SO_NUM_PRIMS_WRITTEN(1)),
> REG64(GEN7_SO_NUM_PRIMS_WRITTEN(2)),
> REG64(GEN7_SO_NUM_PRIMS_WRITTEN(3)),
> + REG64(GEN7_SO_PRIM_STORAGE_NEEDED(0)),
> + REG64(GEN7_SO_PRIM_STORAGE_NEEDED(1)),
> + REG64(GEN7_SO_PRIM_STORAGE_NEEDED(2)),
> + REG64(GEN7_SO_PRIM_STORAGE_NEEDED(3)),
FWIW, I don't think we actually need to write these...we just read them.
Though, there's not much harm in it.
> GEN7_SO_WRITE_OFFSET(0),
> GEN7_SO_WRITE_OFFSET(1),
> GEN7_SO_WRITE_OFFSET(2),
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 8e60737..533ec0a 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -427,6 +427,14 @@
> /* There are the 4 64-bit counter registers, one for each stream output */
> #define GEN7_SO_NUM_PRIMS_WRITTEN(n) (0x5200 + (n) * 8)
>
> +#define GEN7_SO_PRIM_STORAGE_NEEDED(n) (0x5240 + (n) * 8)
> +
#define GEN7_3DPRIM_END_OFFSET 0x2420
> +#define GEN7_3DPRIM_START_VERTEX 0x2430
> +#define GEN7_3DPRIM_VERTEX_COUNT 0x2434
> +#define GEN7_3DPRIM_INSTANCE_COUNT 0x2438
> +#define GEN7_3DPRIM_START_INSTANCE 0x243C
> +#define GEN7_3DPRIM_BASE_VERTEX 0x2440
> +
> #define OACONTROL 0x2360
>
> #define _GEN7_PIPEA_DE_LOAD_SL 0x70068
With END_OFFSET added, this would get a:
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-04-09 16:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 21:18 [PATCH] drm/i915: Add more registers to the whitelist for mesa bradley.d.volkin
2014-04-09 13:34 ` Daniel Vetter
2014-04-09 16:22 ` Kenneth Graunke [this message]
2014-04-09 16:46 ` Daniel Vetter
2014-04-09 17:12 ` [PATCH] SQUASH: drm/i915: One more register " bradley.d.volkin
2014-04-09 19:54 ` Daniel Vetter
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=534573BB.2090009@whitecape.org \
--to=kenneth@whitecape.org \
--cc=bradley.d.volkin@intel.com \
--cc=intel-gfx@lists.freedesktop.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