From patchwork Tue Jan 28 05:29:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chia-I Wu X-Patchwork-Id: 3545111 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B3290C02DC for ; Tue, 28 Jan 2014 05:29:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB56E20123 for ; Tue, 28 Jan 2014 05:29:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B89F62011E for ; Tue, 28 Jan 2014 05:29:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A8E811D847; Mon, 27 Jan 2014 21:29:51 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ie0-f174.google.com (mail-ie0-f174.google.com [209.85.223.174]) by gabe.freedesktop.org (Postfix) with ESMTP id 4568B11D84A for ; Mon, 27 Jan 2014 21:29:45 -0800 (PST) Received: by mail-ie0-f174.google.com with SMTP id tp5so7094134ieb.33 for ; Mon, 27 Jan 2014 21:29:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=iG/h4VXbaNRDf0OcoZGVoE7poMF6CMR5nzU6/c/mGPw=; b=hgzlFIfs9MXWHXCYT4OJsYzKy3PDKrp5nv+HPDHVX5c+MB12E8ZLCBV5bxB/ZKgHeh E9UanOcs0YRmp6SKKY7OEGApcSY1Qx25Plb2MDeQmtknbPcy2v5Bph+nZ48taYd7AX3F zoUVrxZng4qzOxU4gm6b07qCbl8O+KWmWXfDWHb1B4kA9MWqsYgkVG8F9MYzkHnhEWbq ZBQUTVs3QrzohC2NwL6DZJZrkiau70H/DYQslMbl8nBMHFiR3132dWldsygZGz2y8a6H Rn3QYG8ASEQUB/z5ZiGJSjw0vxYdxBhGQvz4GuRRQzWb43EOIT19menheZfgAv5nQskk yRkQ== X-Received: by 10.50.102.99 with SMTP id fn3mr21007580igb.5.1390886984448; Mon, 27 Jan 2014 21:29:44 -0800 (PST) Received: from localhost.localdomain (122-116-175-74.HINET-IP.hinet.net. [122.116.175.74]) by mx.google.com with ESMTPSA id d18sm52821643igz.0.2014.01.27.21.29.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jan 2014 21:29:43 -0800 (PST) From: Chia-I Wu To: intel-gfx@lists.freedesktop.org Date: Tue, 28 Jan 2014 13:29:33 +0800 Message-Id: <1390886974-2530-1-git-send-email-olvaffe@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1390810716-13510-1-git-send-email-olvaffe@gmail.com> References: <1390810716-13510-1-git-send-email-olvaffe@gmail.com> Subject: [Intel-gfx] [PATCH 1/2] drm/i915: enable HiZ Raw Stall Optimization on HSW X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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: Chia-I Wu The optimization is available on Ivy Bridge and later, and is disabled by default. Enabling it helps certain workloads such as GLBenchmark TRex test. No piglit regression. v2 - no need to save the register before suspend as init_clock_gating can correctly program it after resume - split IVB change to another commit Signed-off-by: Chia-I Wu --- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 76126e0..c74bc28 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -934,6 +934,8 @@ #define ECO_GATING_CX_ONLY (1<<3) #define ECO_FLIP_DONE (1<<0) +#define CACHE_MODE_0_GEN7 0x7000 /* IVB+ */ +#define HIZ_RAW_STALL_OPT_DISABLE (1<<2) #define CACHE_MODE_1 0x7004 /* IVB+ */ #define PIXEL_SUBSPAN_COLLECT_OPT_DISABLE (1<<6) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index d77cc81..c535e5c 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -4789,6 +4789,10 @@ static void haswell_init_clock_gating(struct drm_device *dev) /* WaVSRefCountFullforceMissDisable:hsw */ gen7_setup_fixed_func_scheduler(dev_priv); + /* enable HiZ Raw Stall Optimization */ + I915_WRITE(CACHE_MODE_0_GEN7, + _MASKED_BIT_DISABLE(HIZ_RAW_STALL_OPT_DISABLE)); + /* WaDisable4x2SubspanOptimization:hsw */ I915_WRITE(CACHE_MODE_1, _MASKED_BIT_ENABLE(PIXEL_SUBSPAN_COLLECT_OPT_DISABLE));