From patchwork Wed Aug 12 11:26:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: arun.siluvery@linux.intel.com X-Patchwork-Id: 7000501 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 672E19F39D for ; Wed, 12 Aug 2015 11:26:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D576206A5 for ; Wed, 12 Aug 2015 11:26:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4C0CB2067D for ; Wed, 12 Aug 2015 11:26:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA2A06EB11; Wed, 12 Aug 2015 04:26:05 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 8777F6EB11 for ; Wed, 12 Aug 2015 04:26:04 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 12 Aug 2015 04:26:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,660,1432623600"; d="scan'208,223";a="540395823" Received: from asiluver-linux.isw.intel.com ([10.102.226.117]) by FMSMGA003.fm.intel.com with ESMTP; 12 Aug 2015 04:26:02 -0700 From: Arun Siluvery To: intel-gfx@lists.freedesktop.org Date: Wed, 12 Aug 2015 12:26:01 +0100 Message-Id: <1439378761-9625-1-git-send-email-arun.siluvery@linux.intel.com> X-Mailer: git-send-email 1.9.1 Cc: Mika Kuoppala , Ben Widawsky Subject: [Intel-gfx] [PATCH] lib/rendercopy_gen9: Setup Push constant pointer before sending BTP commands X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From Gen9, by default push constant command is not committed to the shader unit untill the corresponding shader's BTP_* command is parsed. This is the behaviour when set shader is enabled. This patch updates the batch to follow this requirement otherwise it results in gpu hang. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89959 Set shader need to be disabled if legacy behaviour is required. Cc: Ben Widawsky Cc: Joonas Lahtinen Cc: Mika Kuoppala Signed-off-by: Arun Siluvery Reviewed-by: Joonas Lahtinen Tested-by: Mika Kuoppala Reviewed-by: Ben Widawsky --- If this patch is applied then we don't need to disable set shader bit in kernel and the following can be discarded. http://lists.freedesktop.org/archives/intel-gfx/2015-August/073425.html lib/rendercopy_gen9.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c index 4a4a604..9537480 100644 --- a/lib/rendercopy_gen9.c +++ b/lib/rendercopy_gen9.c @@ -590,13 +590,9 @@ gen8_emit_multisample(struct intel_batchbuffer *batch) { static void gen8_emit_vs(struct intel_batchbuffer *batch) { - OUT_BATCH(GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS); + OUT_BATCH(GEN6_3DSTATE_CONSTANT_VS | (11-2)); OUT_BATCH(0); - - OUT_BATCH(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS); OUT_BATCH(0); - - OUT_BATCH(GEN6_3DSTATE_CONSTANT_VS | (11-2)); OUT_BATCH(0); OUT_BATCH(0); OUT_BATCH(0); @@ -605,7 +601,11 @@ gen8_emit_vs(struct intel_batchbuffer *batch) { OUT_BATCH(0); OUT_BATCH(0); OUT_BATCH(0); + + OUT_BATCH(GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS); OUT_BATCH(0); + + OUT_BATCH(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS); OUT_BATCH(0); OUT_BATCH(GEN6_3DSTATE_VS | (9-2)); @@ -998,14 +998,14 @@ void gen9_render_copyfunc(struct intel_batchbuffer *batch, gen8_emit_sf(batch); + gen8_emit_ps(batch, ps_kernel_off); + OUT_BATCH(GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS); OUT_BATCH(ps_binding_table); OUT_BATCH(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS); OUT_BATCH(ps_sampler_state); - gen8_emit_ps(batch, ps_kernel_off); - OUT_BATCH(GEN6_3DSTATE_SCISSOR_STATE_POINTERS); OUT_BATCH(scissor_state);