From patchwork Mon Oct 15 08:11:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1592581 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 68DAC3FD86 for ; Mon, 15 Oct 2012 08:10:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 21B119F383 for ; Mon, 15 Oct 2012 01:10:48 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 0EC8D9E78F for ; Mon, 15 Oct 2012 01:10:29 -0700 (PDT) Received: by mail-wi0-f171.google.com with SMTP id hj13so1347247wib.12 for ; Mon, 15 Oct 2012 01:10:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer; bh=XYiYiTFveJ3lJ3uxo31EgieYoP8Df+CKq34TmCJ9lFM=; b=XmQ1A3q01MrP8P2emQ7IOW6ZJvQHFB0GytiaDl/ERzTUtd5AMqMXtvGOrXWIIW6gar EGg9uDkEnMoGyUrOHi8DM0RsNHgn90votT5D+2vyyzP3618Ax3XuzinLGPgsjgLlUk/i bW3tNl5NhIcoJJKBTwRvxlXE+QkNkv5g1c+cA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=XYiYiTFveJ3lJ3uxo31EgieYoP8Df+CKq34TmCJ9lFM=; b=fXJUb5OpmAg7j/9IyCwaMdhfptY3v398hCvzNwLPiTETDBNrNyyUZufS6KBXQ9BcSy HZq5LfZSN7WBfouZvpl4D2vwsHY54wlylTWJCc5KgPPJW6loIHLN4DU2UO8N7hEGeFp9 tBo5XjuJYWLkQa82VgNTba56Pfv85Et76AFobc0swwf4hMNKodv6Ho3SK4k0uDyAbmL7 wNkP/66wTtF7DLogEuiaAdH2EglgZCdnlFIuW9WtOQCqCwhXFdjtAkR8KyUldNlVxP1v 2TV6UWodKzHnchAIHxQG1k/93xy/RsJ9c/TaUTwO6iBV4qFDo587CZ6o19WSbVGVMzn4 7ylQ== Received: by 10.180.77.38 with SMTP id p6mr21939892wiw.1.1350288628670; Mon, 15 Oct 2012 01:10:28 -0700 (PDT) Received: from phenom.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id ei1sm14564259wid.7.2012.10.15.01.10.27 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Oct 2012 01:10:28 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development , greg@kroah.com Date: Mon, 15 Oct 2012 10:11:22 +0200 Message-Id: <1350288682-6236-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQmQaJyhCqoFpOEXlS1iZyYvQRicjR0oKGT4OmsQPs5/LmRaVBLlIXOPmVjiekrDT4ZaARhW Cc: Daniel Vetter , LKML , stable@vger.kernel.org Subject: [Intel-gfx] [PATCH] drm/i915: disable cpu relocs on ilk and earlier 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+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Hi Greg&stable-team, The below patch papers over a graphics corruption issue in 3.5/3.6. The regression happened due to pwrite tunings in 3.5, which made cpu relocations much more likely. The issue seems to have disappeared in 3.7-rc1, but it takes a few days to test a patch, so we haven't figured out what exactly fixed things. Now users are taking out their pitchforks already, so instead of wasting more days (maybe weeks?) to fully understand the bug before backporting the fix, we've opted for the below disable patch, which should have minimal impact (at most it undoes the tuning improvements in 3.5). Patch is tested by reporters & acked by all relevant ppl, please apply to 3.5/3.6 series kernels. Thanks, Daniel Tested-by: Dave Airlie --- They seem to be implicated in render corruptions. And up to now no one really seems to understand the issue, so let's just disable them for now. Most of the machines exhibiting this issue have only a 128 gtt mmio window, so increased pressure on the mappable part (and so higher chance for cpu relocs) seems to be the key. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=852210 Tested-by: Dave Airlie Cc: stable@vger.kernel.org Cc: Greg Kroah-Hartman Acked-by: Chris Wilson Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index ff2819e..682156a 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -268,6 +268,12 @@ eb_destroy(struct eb_objects *eb) static inline int use_cpu_reloc(struct drm_i915_gem_object *obj) { + /* cpu relocs are implicated in some not-yet-understood render + * corruptions on at least ilk, but probably also gm45. Until we know + * what's going on, just disable them. */ + if (INTEL_INFO(obj->base.dev)->gen < 6) + return false; + return (obj->base.write_domain == I915_GEM_DOMAIN_CPU || obj->cache_level != I915_CACHE_NONE); }