From patchwork Fri Jun 12 17:36:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 6599991 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 37D05C0020 for ; Fri, 12 Jun 2015 17:37:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 54D87205EB for ; Fri, 12 Jun 2015 17:37:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 37FBA205CA for ; Fri, 12 Jun 2015 17:37:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B01996EB2D; Fri, 12 Jun 2015 10:37:09 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk0-f177.google.com (mail-qk0-f177.google.com [209.85.220.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 61E6E6EB31 for ; Fri, 12 Jun 2015 10:37:08 -0700 (PDT) Received: by qkhq76 with SMTP id q76so20230478qkh.2 for ; Fri, 12 Jun 2015 10:37:08 -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=NGcY2zNpfJpn4IlxfE5/16XhICI1cn/Cxfe8XYDV14w=; b=Jj3pcxMj8Am9tXAG+4n7tFyBmiFTrd36bj031CRM4dSRkMD+qDcEPhGFLTdvLpuxe9 CAi15dDxuFe6WTuGZMVPnCpXWaflIWZmGA/eiCu1upVcohuiXPW1E1fXPuMD/qTsXJ00 RDwLnX/uVNI5duMSmY85bJe+m+RiA3kO3bzy2flmIou6elAnp+Y4bBxoYqsNA/kS61ur u8JEyRYgjOVBP7V/aE07QJI3DNBMxReOqFexgjzebEXqES1BMe3xOnPurwMKpN8PkYPt QNduJ3PKDWPw/hg+kSnSN1jGaWbw8bGhvcpVdLcZD65mNgoKvBQuBoZlX18N5MJdc2x9 JBNw== X-Received: by 10.141.23.80 with SMTP id z77mr20892056qhd.3.1434130627994; Fri, 12 Jun 2015 10:37:07 -0700 (PDT) Received: from localhost.localdomain ([187.95.117.237]) by mx.google.com with ESMTPSA id n4sm1935669qha.19.2015.06.12.10.37.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jun 2015 10:37:07 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Fri, 12 Jun 2015 14:36:19 -0300 Message-Id: <1434130581-3864-3-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1434130581-3864-1-git-send-email-przanoni@gmail.com> References: <1434049347-2100-1-git-send-email-przanoni@gmail.com> <1434130581-3864-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 2/4] drm/i915: add FBC_ROTATION to enum no_fbc_reason 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 Because we're currently using FBC_UNSUPPORTED_MODE for two different cases. This commit will also allow us to write the next one without hiding information from the user. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_debugfs.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_fbc.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index b3f42ec..f039b18 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1632,6 +1632,9 @@ static int i915_fbc_status(struct seq_file *m, void *unused) case FBC_CHIP_DEFAULT: seq_puts(m, "disabled per chip default"); break; + case FBC_ROTATION: + seq_puts(m, "rotation not supported"); + break; default: seq_puts(m, "unknown reason"); } diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 611fbd8..f9ff452 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -926,6 +926,7 @@ struct i915_fbc { FBC_MULTIPLE_PIPES, /* more than one pipe active */ FBC_MODULE_PARAM, FBC_CHIP_DEFAULT, /* disabled by default on this chip */ + FBC_ROTATION, /* rotation is not supported */ } no_fbc_reason; }; diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 6abb834..43704a4 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -587,7 +587,7 @@ void intel_fbc_update(struct drm_device *dev) } if (INTEL_INFO(dev)->gen <= 4 && !IS_G4X(dev) && crtc->primary->state->rotation != BIT(DRM_ROTATE_0)) { - if (set_no_fbc_reason(dev_priv, FBC_UNSUPPORTED_MODE)) + if (set_no_fbc_reason(dev_priv, FBC_ROTATION)) DRM_DEBUG_KMS("Rotation unsupported, disabling\n"); goto out_disable; }