From patchwork Mon Aug 7 16:48:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9885837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 987FD60363 for ; Mon, 7 Aug 2017 16:49:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AB58286B6 for ; Mon, 7 Aug 2017 16:49:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F5C4286BA; Mon, 7 Aug 2017 16:49:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1EC85286B6 for ; Mon, 7 Aug 2017 16:49:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 394596E527; Mon, 7 Aug 2017 16:49:02 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6717E6E527 for ; Mon, 7 Aug 2017 16:49:00 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 8152129-1500050 for multiple; Mon, 07 Aug 2017 17:48:42 +0100 Received: by haswell.alporthouse.com (sSMTP sendmail emulation); Mon, 07 Aug 2017 17:48:43 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Mon, 7 Aug 2017 17:48:42 +0100 Message-Id: <20170807164842.26802-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.13.3 X-Originating-IP: 78.156.65.138 X-Country: code=GB country="United Kingdom" ip=78.156.65.138 Subject: [Intel-gfx] [PATCH] drm/i915/renderstate: Sandybridge golden renderstate is b0rked 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-Virus-Scanned: ClamAV using ClamSMTP In the null state batch, we try to load the CC_STATE_POINTERS, but pass in a pointer to invalid state for the color-calc and depth-stencil state. In the rendercopy batch this was imported from, the 1024 offset used is known to be 64bytes of zeroes. Tweaking the gen6_null_state_batch to point those two offset at known zeroes however was not sufficient. The effect of loading depth-stencil and color-calc causes the golden renderstate batch to take 10s (yes, ten seconds) on my snb gt1 (i5-2500). It would be nice if we could drop this incomplete "golden render state" entirely. Signed-off-by: Chris Wilson Cc: Mika Kuoppala --- drivers/gpu/drm/i915/intel_renderstate_gen6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_renderstate_gen6.c b/drivers/gpu/drm/i915/intel_renderstate_gen6.c index 11c8e7b3dd7c..46cfc405ca30 100644 --- a/drivers/gpu/drm/i915/intel_renderstate_gen6.c +++ b/drivers/gpu/drm/i915/intel_renderstate_gen6.c @@ -107,8 +107,8 @@ static const u32 gen6_null_state_batch[] = { 0x00000000, 0x780e0002, 0x00000441, - 0x00000401, - 0x00000401, + 0x00000400, + 0x00000400, 0x78021002, 0x00000000, 0x00000000,