From patchwork Fri Jun 17 16:42:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel J Blueman X-Patchwork-Id: 892012 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5HGhFCF021091 for ; Fri, 17 Jun 2011 16:43:36 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 88AE9A09E9 for ; Fri, 17 Jun 2011 09:43:15 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-gy0-f177.google.com (mail-gy0-f177.google.com [209.85.160.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 32974A0963 for ; Fri, 17 Jun 2011 09:42:35 -0700 (PDT) Received: by gyh20 with SMTP id 20so1186175gyh.36 for ; Fri, 17 Jun 2011 09:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=rsIf82dNK++f/oFcICD/Lw8EuJc5vFZZPQdvY2zAWiM=; b=YV+ZmOCaw4ZsAjLN/iDHegt1+EKfYP/agZxpH47wxWTW1VkzJEZLbIaFdHh5IQzO1v RTf2XQnID5TlcvJvOcqs5ILKYYmCeDkkuFhdfap0ZYSo6Y/aE1MprpYcWlf0Tu1VCJHi 053A5YxPu6qy9sx1w6sXxdSWqS1xDsSZ8h3iA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=pFhdTJfQIPAOPYPgSB7j8Vo+i9FcbELyFXHHCdxviuorSmydKcHy3KY46UNJozQAkt qOjAdbSl31SszfV51avot2Q/wNrDRiephvHzoRBSG1lmRgTQoFghgRV3EKDxGWD6dVmW 5JbKUpSY6Htm6Bz6vXH6cFggR+LKn+Epyedto= Received: by 10.236.154.195 with SMTP id h43mr3900931yhk.107.1308328954417; Fri, 17 Jun 2011 09:42:34 -0700 (PDT) Received: from localhost.localdomain (bb116-14-44-68.singnet.com.sg [116.14.44.68]) by mx.google.com with ESMTPS id 1sm1812146yhs.81.2011.06.17.09.42.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 17 Jun 2011 09:42:33 -0700 (PDT) From: Daniel J Blueman To: Eric Anholt , Dave Airlie Date: Sat, 18 Jun 2011 00:42:00 +0800 Message-Id: <1308328920-2068-1-git-send-email-daniel.blueman@gmail.com> X-Mailer: git-send-email 1.7.4.1 Cc: Daniel J Blueman , Robert Hooker , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Mengmeng Meng Subject: [Intel-gfx] [PATCH 3.0-rc3, v2] i915: Fix gen6 (SNB) GPU stalling X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 17 Jun 2011 16:43:36 +0000 (UTC) Workaround Sandy Bridge GPU stalls by allowing the blitter command streamer to write interrupt state to the Hardware Status Page when a MI_USER_INTERRUPT command is decoded. v1->v2: Moved to prior interrupt handler installation and RMW flags as per feedback. Eric, if you're happy, please sign-off and send to Dave for inclusion in -rc4 if possible. Further changes may be needed for -stable. Signed-off-by: Daniel J Blueman --- drivers/gpu/drm/i915/i915_irq.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index b9fafe3..b7f11a5 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1741,6 +1741,13 @@ void ironlake_irq_preinstall(struct drm_device *dev) I915_WRITE(HWSTAM, 0xeffe); + if (IS_GEN6(dev)) + /* workaround stalls observed on Sandy Bridge GPUs by + allowing the blitter command streamer to generate a + write to the Hardware Status Page for MI_USER_INTERRUPT */ + I915_WRITE(GEN6_BLITTER_HWSTAM, I915_READ(GEN6_BLITTER_HWSTAM) + & ~GEN6_BLITTER_USER_INTERRUPT); + /* XXX hotplug from PCH */ I915_WRITE(DEIMR, 0xffffffff);