From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kenneth Graunke Subject: Re: [PATCH] drm/i915: Add the predicate source registers to the register whitelist Date: Fri, 07 Nov 2014 11:33:17 -0800 Message-ID: <6265573.3luPA4t81X@vakarian> References: <1415374471-29992-1-git-send-email-neil@linux.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1204355694==" Return-path: Received: from smtp137.dfw.emailsrvr.com (smtp137.dfw.emailsrvr.com [67.192.241.137]) by gabe.freedesktop.org (Postfix) with ESMTP id B08D76EEFA for ; Fri, 7 Nov 2014 11:33:20 -0800 (PST) In-Reply-To: <1415374471-29992-1-git-send-email-neil@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1204355694== Content-Type: multipart/signed; boundary="nextPart2800002.3Gd9FZjv3Y"; micalg="pgp-sha1"; protocol="application/pgp-signature" --nextPart2800002.3Gd9FZjv3Y Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 > --- > > 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 --nextPart2800002.3Gd9FZjv3Y Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJUXR59AAoJEFtb2gcdScw4IBYP/infR6ggoWihuDoGZWi68gZ1 Tb3kYN4JkYIjeT25GWGgeKAyPZYVQ+UKin8bdDsFuJmG61RZ1fCcv5aHBWewrYiA 3Mv59bqY1RzX46zNQ+FRLuBp1AVy/AQRmz7xMPHWd1op4gcueRnxpXvzzKO82YsC TINypRp6nx+g4lQakna2sy+nxqoBUxTqtRdFw5wmT6jlntduRJxJjCg9n/+EUKbu fbjvJLxSFh4G+hwisI/0AbswjQh4qQ06II5jzjCPVn0wSCuuKYGsI8trzSluzZOL mRPDMk0F26iDQ70EPGiNOM3B+ladpEc99lRCD3J8bAxlIPV4410rrCpwWvkpTmMC YfFaWTp+QDAFh7JLRfUp9JmqesKiW+i4lMqXh8qXrd3Z68jlB+RBs6B0AGfW+LMJ gjYuSVfHGjJfzs/swx8hN6z/piiJvc6ybo59leUrpumj5umrCGUCBwyoVFk7ggiV Rp0xbyB3bao+UZbS9hd1QVhbuGBMqgsQ3spHH+czfvrA2vTmRGMyRkT517m8kkpH zHVC5tiIoLr6CdLMUoF+CG9R8d+g0KnVU+B88dyq85x8AQMpq01w8rfVhzfGeyDg B3vUQK6WsV7VwkcAWx4Qlq02jJuP8Ilwtap10xTqoHthIeyHVIrx9nkPFcb4Sc/H llmFyxqX7Zf2fKM4DkyG =wveM -----END PGP SIGNATURE----- --nextPart2800002.3Gd9FZjv3Y-- --===============1204355694== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9pbnRlbC1nZngK --===============1204355694==--