From patchwork Thu Nov 24 09:47:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9445071 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DFB6660235 for ; Thu, 24 Nov 2016 09:47:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3241277D9 for ; Thu, 24 Nov 2016 09:47:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D806227C0C; Thu, 24 Nov 2016 09:47:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 68A02277D9 for ; Thu, 24 Nov 2016 09:47:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4DD046E8CD; Thu, 24 Nov 2016 09:47:58 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7CB836E8CD for ; Thu, 24 Nov 2016 09:47:56 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id u144so4446937wmu.0 for ; Thu, 24 Nov 2016 01:47:56 -0800 (PST) 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=WWkCSsfFt2L4i3xQwMdZZKil99WVOcawXMjesNsDyXM=; b=0uN8ivgJ6HHO6VO46QdNGar4bd8gwqM5zFM4dv6sA4muckOZd0lxO4U/u1ghVoAw99 fhucOd3QuAf1m+A+r5fzj+cApdogO9JPiLICA8ChEH8ECy8WO2wcXUnZd2NQirwC27AB ow1BTVRGqMmFGPcK81EE8/ezRppscXBZ8cSjvZ2Wat7gadTvls0RO3lL/suNYTQ84G/e XERCvXzIUphLzUey7lJrlKWjJ6mq396KmHchBzz/bZKu2qibdqkUQiGLZremy6PsJsh6 c65hHqmZnQQYovdbHzMsqcINv53+4dN98f9IyMUMwhYY9YdXAipbbPk8YighhUzV2kHX QpxQ== 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=WWkCSsfFt2L4i3xQwMdZZKil99WVOcawXMjesNsDyXM=; b=YMUemTnZomQSbq7VtawlMZ8PdzUQGTckhBlIQkxjyF8ucMV5FttB3irU7E7oV+IQYn Wm3y4tRNz/OVw5gOUUSXyj9kAvQcsg2s8K0RRkQn5Tg2DjNKQqI4mgHEhqCaWq29g2zA 7HhFmjqLljW3nfquAM5GeZd0wtGQer6G8Ko8NqIySQAS+yNMhXQubhe+TYbyl9st8/UW 46umgh0EJk4mTZ/x75+qtXGrUfQQMb6QCspV5b7wqWEQAiu4AW1/61zfNvF+AnxCixRq VQNoUuBxUuIJsfCG0I8OvenEwQOZpVmUtaMddKLGvhWFcKeshFUK0az7MTk2ROHmSxkG v6JA== X-Gm-Message-State: AKaTC02oWTwojY4aTkdBivtWVcvTBSIPVNfTRcFz1fq9p8XWfJFgDbjlV6qwGM7kz3rr7A== X-Received: by 10.28.57.197 with SMTP id g188mr1457765wma.26.1479980874826; Thu, 24 Nov 2016 01:47:54 -0800 (PST) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id ba10sm40843099wjb.32.2016.11.24.01.47.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 01:47:53 -0800 (PST) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Thu, 24 Nov 2016 09:47:52 +0000 Message-Id: <20161124094752.19129-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.10.2 Subject: [Intel-gfx] [PATCH] drm/i915/debugfs: Increment return value of gt.next_seqno 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-Virus-Scanned: ClamAV using ClamSMTP The i915_next_seqno read value is to be the next seqno used by the kernel. However, in the conversion to atomics ops for gt.next_seqno, in commit 28176ef4cfa5 ("drm/i915: Reserve space in the global seqno during request allocation"), this was changed from a post-increment to a pre-increment. This increment was missed from the value reported by debugfs, so in effect it was reporting the current seqno (last assigned), not the next seqno. Fixes: 28176ef4cfa5 ("drm/i915: Reserve space in the global seqno during request allocation") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81209 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 4cad5bf116b5..7b0fcd7461ea 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1026,7 +1026,7 @@ i915_next_seqno_get(void *data, u64 *val) { struct drm_i915_private *dev_priv = data; - *val = atomic_read(&dev_priv->gt.global_timeline.next_seqno); + *val = 1 + atomic_read(&dev_priv->gt.global_timeline.next_seqno); return 0; }