From patchwork Wed Apr 27 08:02:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 8953361 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 898B1BF29F for ; Wed, 27 Apr 2016 08:02:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 85603201BB for ; Wed, 27 Apr 2016 08:02:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8C8892014A for ; Wed, 27 Apr 2016 08:02:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1945D6EA15; Wed, 27 Apr 2016 08:02:23 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id A31F46EA15 for ; Wed, 27 Apr 2016 08:02:09 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id n129so1057225wmn.1 for ; Wed, 27 Apr 2016 01:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=YMGmG4A/IsZiQ3EFU+guMTx/nISBFPjIRJk3lAjKm2U=; b=j3j396D+kYX07C5hzg5K4jyOYVHT9g5HMaKwGioM7+jnh8SQ4G+xGjA/w7smjLL8sQ k8hpK3saQM1WjKk52763oK0P9kncQ9NLeiYktmxZIaRtXFcJCekJAin66VG3obx99X4w 4l5iQW3zvMC0LRLCqLQS/DqH0yxwq3s6CxPI/jETi4ezWqNZ23pwsAi8Tghwt1MmV0Zz 9FL1uB4s2yJ3Ns8ZBJwSkd5ysxGcTpOdtMdvXc09nLGiHkRCvwkq57c1Xukpal1gv7vP R45sdJy2av9cr5f5bSRTLk9TlCZi8Nic5C+emr2seNcuKbQkubWBxcQazNqp6xPwEs6q kNDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=YMGmG4A/IsZiQ3EFU+guMTx/nISBFPjIRJk3lAjKm2U=; b=UCWcDMyEfCDILGsrqMokcLpGT1XIkeHLekzVrHmzIygaj8/CzvHglA/GgRmFcO7ufe Xm/gUJC+hLMe0rS84EETl/x4PVus9Tr58OvEWYOWx6sLec3k/X8LLPHP9zmFefVbt0q5 Yl1qirhDNZ3pwXfcbeIVdUN5OS5ZE6V+bnYlO+CMLXJAkygjIQvLJBIfZmbXk54CgZ4p ss+xcyew0APQ77VC5im+Q3+j7QK7S0WYzCJyVt4/4hCRR7nanWpgCLhr+xRQvvRzerWS gBQyQ9zsm9Ug1lOP3JdL5ssTxGFidDaV+n8FiP365cbJiuPhlkaNraHatfqkRFDxnI2v nvNw== X-Gm-Message-State: AOPr4FUymi7s2AvIQLsqezR5+MFFB7xkXJ798IcG2MSYKPsKdAdMLYpLjsyB2/2E9DHJZg== X-Received: by 10.194.248.135 with SMTP id ym7mr7531117wjc.174.1461744127371; Wed, 27 Apr 2016 01:02:07 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id h8sm7105426wmd.2.2016.04.27.01.02.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Apr 2016 01:02:06 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Wed, 27 Apr 2016 09:02:01 +0100 Message-Id: <1461744121-27051-1-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.1 Cc: Mika Kuoppala Subject: [Intel-gfx] [PATCH] drm/i915: Protect gen7 irq_seqno_barrier with uncore lock 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-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 Faced with sporadic machine hangs on gen7, that mimic the issue of concurrent writes to the same cacheline and seem to start with commit 9b9ed309 (drm/i915: Remove forcewake dance from seqno/irq barrier on legacy gen6+), let us restore the spinlock around the mmio read. Fixes: 9b9ed3093613288247a27a55a6dd07f1222150f1 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Tested-by: Mika Kuoppala Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 66f69cdd1d36..ad5bd3808d8b 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -1590,7 +1590,10 @@ gen6_seqno_barrier(struct intel_engine_cs *engine) * interrupt (with the same net latency). */ struct drm_i915_private *dev_priv = engine->dev->dev_private; + + spin_lock_irq(&dev_priv->uncore.lock); POSTING_READ_FW(RING_ACTHD(engine->mmio_base)); + spin_unlock_irq(&dev_priv->uncore.lock); } static u32