From patchwork Tue Dec 18 17:26:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kuoppala X-Patchwork-Id: 1893021 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 3C2E6DF2F6 for ; Tue, 18 Dec 2012 17:27:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 49960E632D for ; Tue, 18 Dec 2012 09:27:07 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id C2E7EE62E8 for ; Tue, 18 Dec 2012 09:26:27 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 18 Dec 2012 09:25:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,309,1355126400"; d="scan'208";a="259198490" Received: from gaia.fi.intel.com (HELO gaia) ([10.237.72.69]) by orsmga002.jf.intel.com with ESMTP; 18 Dec 2012 09:26:26 -0800 Received: by gaia (Postfix, from userid 1000) id 49D2141109; Tue, 18 Dec 2012 19:26:25 +0200 (EET) From: Mika Kuoppala To: intel-gfx@lists.freedesktop.org Date: Tue, 18 Dec 2012 19:26:19 +0200 Message-Id: <1355851581-16124-2-git-send-email-mika.kuoppala@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1355851581-16124-1-git-send-email-mika.kuoppala@intel.com> References: <1355851581-16124-1-git-send-email-mika.kuoppala@intel.com> Subject: [Intel-gfx] [PATCH v2 2/4] drm/i915: Always clear semaphore mboxes on seqno wrap 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 In preparation for setting the seqno to arbitrary value on init or through debugfs. We need to always clear the semaphores and set the hws page seqno index by calling intel_ring_init_seqno(). v2: rewrote the commit message as suggested by Chris Wilson. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_gem.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 396be20..53442ea 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1932,18 +1932,6 @@ i915_gem_handle_seqno_wrap(struct drm_device *dev) struct intel_ring_buffer *ring; int ret, i, j; - /* The hardware uses various monotonic 32-bit counters, if we - * detect that they will wraparound we need to idle the GPU - * and reset those counters. - */ - ret = 0; - for_each_ring(ring, dev_priv, i) { - for (j = 0; j < ARRAY_SIZE(ring->sync_seqno); j++) - ret |= ring->sync_seqno[j] != 0; - } - if (ret == 0) - return ret; - /* Carefully retire all requests without writing to the rings */ for_each_ring(ring, dev_priv, i) { ret = intel_ring_idle(ring);