From patchwork Fri Aug 16 00:30:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: James Ausmus X-Patchwork-Id: 2845306 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6763D9F2F5 for ; Fri, 16 Aug 2013 00:34:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4016D202AE for ; Fri, 16 Aug 2013 00:34:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 37A4F202A1 for ; Fri, 16 Aug 2013 00:34:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34EF6E70E6 for ; Thu, 15 Aug 2013 17:34:01 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 80FA9E6025 for ; Thu, 15 Aug 2013 17:31:57 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 15 Aug 2013 17:31:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,889,1367996400"; d="scan'208";a="387901458" Received: from jausmus-gentoo-dev5.jf.intel.com ([10.7.198.60]) by orsmga002.jf.intel.com with ESMTP; 15 Aug 2013 17:31:56 -0700 From: james.ausmus@intel.com To: intel-gfx@lists.freedesktop.org Date: Thu, 15 Aug 2013 17:30:51 -0700 Message-Id: <1376613069-15790-27-git-send-email-james.ausmus@intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1376613069-15790-1-git-send-email-james.ausmus@intel.com> References: <1376613069-15790-1-git-send-email-james.ausmus@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] CHROMIUM: drm/i915: Improve RC6p stability 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: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-7.0 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: Stéphane Marchesin When the CPU is loaded and the GPU tries to switch RC6p modes, the GPU sometimes gets stuck in RC6p mode and doesn't come out of it. I suspect that our voltage rail is too weak and sometimes falls behind. This change throttles down the number of RC6p transitions we do to appease it. The change also disables clock gating which seems to help. Upstream commit which does that is 0f846f81a154cc1818416918d22939bda73da194 (drm/i915: disable RCBP and VDS unit clock gating on SNB and VL) I tested this on multiple Link machines for hours. The number of RC6 problems went down from ~ one every 15 minutes to ~ one every 25 hours. So this is not a complete solution, but I suspect there might be another, more difficult to reproduce, problem. In any case it reduces the issue significantly, to the point where we might be able to forget about it. I measured the power usage on idle before/after this patch and saw no difference. Obviously when the GPU load varies, it will consume more power since it now takes more time to adapt. Also note that not all machines seem to react equally. Some crash fairly often, and some less often. So this will improve the situation to different extents for different people. BUG=chrome-os-partner:16886,chrome-os-partner:11474 TEST=ran the factory stress test (RunIn.Stress) on multiple Link machines for TEST=about 100 hours, saw only 4 RC6 crashes. Change-Id: I1135d90e2a155424388d23c6e0879a210b4a0146 [sonnyrao: 3.8: parts upstream, move RC6p_THRESHOLD change to intel_pm.c] Reviewed-on: https://gerrit.chromium.org/gerrit/42084 Tested-by: Stéphane Marchesin Reviewed-by: Vincent Palatin Reviewed-by: Sameer Nanda Commit-Queue: Stéphane Marchesin --- drivers/gpu/drm/i915/intel_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 7e1c629..c86f432 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -2573,7 +2573,7 @@ static void gen6_enable_rps(struct drm_device *dev) I915_WRITE(GEN6_RC_SLEEP, 0); I915_WRITE(GEN6_RC1e_THRESHOLD, 1000); I915_WRITE(GEN6_RC6_THRESHOLD, 50000); - I915_WRITE(GEN6_RC6p_THRESHOLD, 100000); + I915_WRITE(GEN6_RC6p_THRESHOLD, 150000); I915_WRITE(GEN6_RC6pp_THRESHOLD, 64000); /* unused */ /* Check if we are enabling RC6 */