From patchwork Tue Feb 19 07:18:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 2161951 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id CB0D3DF24C for ; Tue, 19 Feb 2013 07:17:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B41D8E606C for ; Mon, 18 Feb 2013 23:17:59 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 0658AE5F28 for ; Mon, 18 Feb 2013 23:17:49 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 18 Feb 2013 23:17:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,692,1355126400"; d="scan'208";a="287513657" Received: from jnikula-mobl1.fi.intel.com (HELO localhost) ([10.237.72.185]) by orsmga002.jf.intel.com with ESMTP; 18 Feb 2013 23:17:45 -0800 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Date: Tue, 19 Feb 2013 09:18:20 +0200 Message-Id: <1361258300-2347-1-git-send-email-jani.nikula@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <20130214120810.GB2127@cantiga.alporthouse.com> References: <20130214120810.GB2127@cantiga.alporthouse.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Cc: jani.nikula@intel.com Subject: [Intel-gfx] [PATCH v2] drm/i915: clarify logging about reasons for disabling FBC X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Previously FBC disabling due to per-chip default was logged as being disabled per module parameter. Distinguish between the two. v2: Don't even squawk in the debug log if FBC is explicitly disabled (Chris Wilson). Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/i915_debugfs.c | 5 ++++- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 15 ++++++++------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 0911fcd..275954c 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1294,7 +1294,10 @@ static int i915_fbc_status(struct seq_file *m, void *unused) seq_printf(m, "multiple pipes are enabled"); break; case FBC_MODULE_PARAM: - seq_printf(m, "disabled per module param (default off)"); + seq_printf(m, "disabled per module param"); + break; + case FBC_PER_CHIP_DEFAULT: + seq_printf(m, "per chip default is disabled"); break; default: seq_printf(m, "unknown reason"); diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index b1f6a09..1d552df 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -453,6 +453,7 @@ enum no_fbc_reason { FBC_NOT_TILED, /* buffer not tiled */ FBC_MULTIPLE_PIPES, /* more than one pipe active */ FBC_MODULE_PARAM, + FBC_PER_CHIP_DEFAULT, }; enum intel_pch { diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 61fee7f..9b2d7dd 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -437,13 +437,14 @@ void intel_update_fbc(struct drm_device *dev) enable_fbc = i915_enable_fbc; if (enable_fbc < 0) { - DRM_DEBUG_KMS("fbc set to per-chip default\n"); - enable_fbc = 1; - if (INTEL_INFO(dev)->gen <= 6) - enable_fbc = 0; - } - if (!enable_fbc) { - DRM_DEBUG_KMS("fbc disabled per module param\n"); + enable_fbc = INTEL_INFO(dev)->gen > 6; + DRM_DEBUG_KMS("fbc set to per-chip default: %s\n", + enable_fbc ? "enabled" : "disabled"); + if (!enable_fbc) { + dev_priv->no_fbc_reason = FBC_PER_CHIP_DEFAULT; + goto out_disable; + } + } else if (!enable_fbc) { dev_priv->no_fbc_reason = FBC_MODULE_PARAM; goto out_disable; }