From patchwork Tue Dec 23 12:35:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 5533121 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A2133BEEA8 for ; Tue, 23 Dec 2014 12:36:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DEEFA201BB for ; Tue, 23 Dec 2014 12:36:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 05CCE2011D for ; Tue, 23 Dec 2014 12:36:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 86B1E6E48E; Tue, 23 Dec 2014 04:36:47 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by gabe.freedesktop.org (Postfix) with ESMTP id B34B16E48E for ; Tue, 23 Dec 2014 04:36:46 -0800 (PST) Received: by mail-vc0-f171.google.com with SMTP id hy4so2266531vcb.16 for ; Tue, 23 Dec 2014 04:36:46 -0800 (PST) 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=bN56ZvwHPx1H3A+QA72ZBPBUOodN0HHGdDiZ7vdTDsY=; b=I/xbuS4qMlcjjY61vPm8Uy8MJgjtlkZmYkbc7s2de44YJrp+h3ohe0dbhHxcyG1QsM 1KOGoJVyVeUJHccqFv3JVQhC+6bHyGCYxLUW2raTTaoyC2kzoOO7DoGdWabK+dBpAPdm xRNnk5aCivtI5j3QbG4ipQA2HUgTuUrBlqYiNYEOgOStk1dYU2yNVkf9AxGtnHXt6dnj YVYZDooYuHsQqqYfmGwAWnV/Z3BtyAHrn9dEjvLIMK2meOlMiZRAJlxkV+8+hcj2g77H 51aUInaq/V/vQWXY2Y+9Qm9NJK7abde+KgkIIZutj8M8P6bfWn0E2VSx5dMxdFf0sts8 oJ6Q== X-Received: by 10.52.54.98 with SMTP id i2mr7129657vdp.55.1419338206344; Tue, 23 Dec 2014 04:36:46 -0800 (PST) Received: from localhost.localdomain ([177.92.19.202]) by mx.google.com with ESMTPSA id at12sm4915045vdc.15.2014.12.23.04.36.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Dec 2014 04:36:45 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 23 Dec 2014 10:35:44 -0200 Message-Id: <1419338145-1912-9-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1419338145-1912-1-git-send-email-przanoni@gmail.com> References: <1419338145-1912-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 8/9] 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 on debugfs so the test suites can check for regressions in this piece of the code. 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 e515aad..e34e021 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1510,6 +1510,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 40ca873..b6db966 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -1600,6 +1600,9 @@ enum punit_power_well { #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+ */