From patchwork Thu Jun 11 19:02:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 6591171 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 69C5D9F1C1 for ; Thu, 11 Jun 2015 19:03:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D1912062C for ; Thu, 11 Jun 2015 19:03:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9E80320616 for ; Thu, 11 Jun 2015 19:03:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2BB86E568; Thu, 11 Jun 2015 12:03:29 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qc0-f194.google.com (mail-qc0-f194.google.com [209.85.216.194]) by gabe.freedesktop.org (Postfix) with ESMTP id 36D076E568 for ; Thu, 11 Jun 2015 12:03:29 -0700 (PDT) Received: by qcvp6 with SMTP id p6so1892568qcv.2 for ; Thu, 11 Jun 2015 12:03:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dnlleyck0jiWSXKCRcjQvuISzyHrTyw7qCay2RHjXOw=; b=NofMQOJFpZHtHIhz61Swn7c53UyyZYuoS1TfOJSpYuI4IE3lfXUaRVu14iASzXY/H5 vYflewRBA6461Cc6d+g//B0TKzBJ1Qn2ICN6bDa3ZtW53f5Ayi0QAFLS3ooOFRnwPI6O O3nUurCFKz1AS889c8kka7zxi5OTX7BqNKte3+HImmR7JBf6Pe9CDlInxSCjai9DV17u YYR8ayek9T5V5bRrhyR2CeqMdaIYTBKQ5tWCxiQ9stOMi7NnJKYWGzxwoQbA6Pv3IV61 Z12sNKQVpx2jYjnh1pb7oJ6CIdXHx4VzGpHWgH5hYwmo9wAOvMcKiLjvaf25zaVxciHb R97A== X-Received: by 10.140.239.136 with SMTP id k130mr14149306qhc.90.1434049408717; Thu, 11 Jun 2015 12:03:28 -0700 (PDT) Received: from localhost.localdomain ([187.95.117.237]) by mx.google.com with ESMTPSA id j143sm626145qhc.32.2015.06.11.12.03.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Jun 2015 12:03:28 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 11 Jun 2015 16:02:24 -0300 Message-Id: <1434049347-2100-2-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1434049347-2100-1-git-send-email-przanoni@gmail.com> References: <1434049347-2100-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 1/4] drm/i915: print FBC compression status on debugfs 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=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Paulo Zanoni We already had a few bugs in the past where FBC was compressing nothing when it was enabled, which makes the feature quite useless. Add this information to debugfs so the test suites can check for regressions in this piece of the code. Our igt/tests/kms_frontbuffer_tracking already has support for this message. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_debugfs.c | 5 +++++ drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 92cf273..7358f6d 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1638,6 +1638,11 @@ static int i915_fbc_status(struct seq_file *m, void *unused) seq_putc(m, '\n'); } + if (INTEL_INFO(dev_priv)->gen >= 7 && !IS_VALLEYVIEW(dev_priv)) + seq_printf(m, "Compressing: %s\n", + yesno(I915_READ(FBC_STATUS2) & + FBC_COMPRESSION_MASK)); + intel_runtime_pm_put(dev_priv); return 0; diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 40a3a64..0c0b12a 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -1951,6 +1951,9 @@ enum skl_disp_power_wells { #define FBC_FENCE_OFF 0x03218 /* BSpec typo has 321Bh */ #define FBC_TAG 0x03300 +#define FBC_STATUS2 0x43214 +#define FBC_COMPRESSION_MASK 0x7ff + #define FBC_LL_SIZE (1536) /* Framebuffer compression for GM45+ */