All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kenneth Graunke <kenneth@whitecape.org>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Add the predicate source registers to the register whitelist
Date: Fri, 07 Nov 2014 11:33:17 -0800	[thread overview]
Message-ID: <6265573.3luPA4t81X@vakarian> (raw)
In-Reply-To: <1415374471-29992-1-git-send-email-neil@linux.intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 2119 bytes --]

On Friday, November 07, 2014 03:34:31 PM Neil Roberts wrote:
> The predicate source registers are needed to implement conditional
> rendering without stalling. The two source registers are used to load
> the previous values of the PS_DEPTH_COUNT register saved from
> PIPE_CONTROL commands. These can then be compared and used to set the
> predicate enable bit via the MI_PREDICATE command.
> 
> Signed-off-by: Neil Roberts <neil@linux.intel.com>
> ---
> 
> There is a corresponding patch for Mesa which is using these registers
> on the mailing list here:
> 
> http://lists.freedesktop.org/archives/mesa-dev/2014-November/070347.html
> 
> There are some other registers such as MI_PREDICATE_DATA which can be
> used for more advanced predicate checking but I haven't added them to
> the list because they aren't needed to implement
> GL_NV_conditional_render.
> 
>  drivers/gpu/drm/i915/i915_cmd_parser.c | 2 ++
>  drivers/gpu/drm/i915/i915_reg.h        | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c 
b/drivers/gpu/drm/i915/i915_cmd_parser.c
> index 4c35e2a..9732155 100644
> --- a/drivers/gpu/drm/i915/i915_cmd_parser.c
> +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
> @@ -408,6 +408,8 @@ static const u32 gen7_render_regs[] = {
>  	REG64(PS_INVOCATION_COUNT),
>  	REG64(PS_DEPTH_COUNT),
>  	OACONTROL, /* Only allowed for LRI and SRM. See below. */
> +	REG64(MI_PREDICATE_SRC0),
> +	REG64(MI_PREDICATE_SRC1),
>  	GEN7_3DPRIM_END_OFFSET,
>  	GEN7_3DPRIM_START_VERTEX,
>  	GEN7_3DPRIM_VERTEX_COUNT,
> diff --git a/drivers/gpu/drm/i915/i915_reg.h 
b/drivers/gpu/drm/i915/i915_reg.h
> index ea84e1e..9275d41 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -314,6 +314,8 @@
>  #define   MI_BATCH_GTT		    (2<<6) /* aliased with (1<<7) on gen4 */
>  #define MI_BATCH_BUFFER_START_GEN8	MI_INSTR(0x31, 1)
>  
> +#define MI_PREDICATE_SRC0	(0x2400)
> +#define MI_PREDICATE_SRC1	(0x2408)
>  
>  #define MI_PREDICATE_RESULT_2	(0x2214)
>  #define  LOWER_SLICE_ENABLED	(1<<0)
> 

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 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

      parent reply	other threads:[~2014-11-07 19:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 15:34 [PATCH] drm/i915: Add the predicate source registers to the register whitelist Neil Roberts
2014-11-07 16:34 ` Volkin, Bradley D
2014-11-07 19:00 ` [PATCH v2] " Neil Roberts
2014-11-11 15:26   ` Daniel Vetter
2015-01-09 16:41     ` Neil Roberts
2015-01-12 23:00       ` Daniel Vetter
2014-11-07 19:33 ` Kenneth Graunke [this message]

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=6265573.3luPA4t81X@vakarian \
    --to=kenneth@whitecape.org \
    --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 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.