From patchwork Fri Feb 27 01:31:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 5897361 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 A20F19F38E for ; Fri, 27 Feb 2015 01:31:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CC25B20220 for ; Fri, 27 Feb 2015 01:31:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EDEE42021F for ; Fri, 27 Feb 2015 01:31:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E4836E865; Thu, 26 Feb 2015 17:31:09 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id ABA736E867 for ; Thu, 26 Feb 2015 17:31:06 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 26 Feb 2015 17:22:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,656,1418112000"; d="scan'208";a="657878773" Received: from akacprow-mobl.ger.corp.intel.com (HELO strange.ger.corp.intel.com) ([10.252.19.34]) by orsmga001.jf.intel.com with ESMTP; 26 Feb 2015 17:31:05 -0800 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Fri, 27 Feb 2015 01:31:00 +0000 Message-Id: <1425000660-1487-5-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1425000660-1487-1-git-send-email-damien.lespiau@intel.com> References: <1425000660-1487-1-git-send-email-damien.lespiau@intel.com> Subject: [Intel-gfx] [PATCH 4/4] drm/i915: Rename no_fbc_str to 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 no_fbc_reason was a much better name, and now that we only store the reason as a string, we can reuse that name. Signed-off-by: Damien Lespiau Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com) --- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_fbc.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 9ceae48..4d892a6 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1525,7 +1525,7 @@ static int i915_fbc_status(struct seq_file *m, void *unused) seq_puts(m, "FBC enabled\n"); else { const char unknown_reason[] = "unknown reason"; - const char *reason = dev_priv->fbc.no_fbc_str; + const char *reason = dev_priv->fbc.no_fbc_reason; if (!reason) reason = unknown_reason; diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 7f44ce2..39d0a32 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -813,7 +813,7 @@ struct i915_fbc { struct drm_framebuffer *fb; } *fbc_work; - const char *no_fbc_str; + const char *no_fbc_reason; }; /** diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 0098cdd..0d5364d 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -464,13 +464,13 @@ void intel_fbc_disable(struct drm_device *dev) } static void set_no_fbc_reason(struct drm_i915_private *dev_priv, - const char *reason_str /* a static string */) + const char *reason /* a static string */) { - if (dev_priv->fbc.no_fbc_str == reason_str) + if (dev_priv->fbc.no_fbc_reason == reason) return; - dev_priv->fbc.no_fbc_str = reason_str; - DRM_DEBUG_KMS("Disabling FBC: %s\n", reason_str); + dev_priv->fbc.no_fbc_reason = reason; + DRM_DEBUG_KMS("Disabling FBC: %s\n", reason); } static struct drm_crtc *intel_fbc_find_crtc(struct drm_i915_private *dev_priv) @@ -664,7 +664,7 @@ void intel_fbc_update(struct drm_device *dev) } intel_fbc_enable(crtc); - dev_priv->fbc.no_fbc_str = NULL; + dev_priv->fbc.no_fbc_reason = NULL; return; out_disable: @@ -686,7 +686,7 @@ void intel_fbc_init(struct drm_i915_private *dev_priv) { if (!HAS_FBC(dev_priv)) { dev_priv->fbc.enabled = false; - dev_priv->fbc.no_fbc_str = "unsupported"; + dev_priv->fbc.no_fbc_reason = "unsupported"; return; }