From patchwork Tue Jul 7 18:26:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 6736871 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 544E9C05AC for ; Tue, 7 Jul 2015 18:27:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7957B205FD for ; Tue, 7 Jul 2015 18:27:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E60CD20693 for ; Tue, 7 Jul 2015 18:27:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 654966EA38; Tue, 7 Jul 2015 11:27:00 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk0-f180.google.com (mail-qk0-f180.google.com [209.85.220.180]) by gabe.freedesktop.org (Postfix) with ESMTPS id 864E76EA38 for ; Tue, 7 Jul 2015 11:26:58 -0700 (PDT) Received: by qkbp125 with SMTP id p125so146087825qkb.2 for ; Tue, 07 Jul 2015 11:26:57 -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=KmLsxFaiKr+62Dbj/kj5Al5xwostzBipF2EUPp4/ppE=; b=ygOYjzVF5nOlMj7SbagKHVnuWGTAW61x9/w/MKp4Q3RPWjFPLgiiILi9CCkpwEb7W4 ZvygkY5cbYzHXlNTkz/oxjfV917geaFJejv5nPPfH1VgNIicarjvNN9yLV2yV0BpcnGa LbvtMdN9ZIbqJbbD7QMH9wvNV5k5pIXg+mMUZWpdnYLwWLcE1ZlR+/fKphuw0Qjv87TU jtvhSA1qdTYKU952g88SLGa543m/DD2kPNvvzV7Ff1lRwMWXKVXI6CZHg4TZ2V79twBV lGOLWNWc8ZTT4oPS8IEseAt5IPaPPtLrGIlnM0AKuiHlTNEjuMtEyt6nEhn2DbQS0WFr wjtA== X-Received: by 10.140.107.180 with SMTP id h49mr9111344qgf.1.1436293617838; Tue, 07 Jul 2015 11:26:57 -0700 (PDT) Received: from localhost.localdomain (r130-pw-tresbarras.ibys.com.br. [189.76.1.243]) by mx.google.com with ESMTPSA id h81sm11588457qkh.34.2015.07.07.11.26.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jul 2015 11:26:57 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 7 Jul 2015 15:26:06 -0300 Message-Id: <1436293568-1674-5-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436293568-1674-1-git-send-email-przanoni@gmail.com> References: <1436293568-1674-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 4/6] drm/i915: add FBC_IN_DBG_MASTER 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.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 The poor in_dbg_master() check was the only one without a reason string. Give it a reason string so it won't feel excluded. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_fbc.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 4ef1764..52d07fb 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -935,6 +935,7 @@ struct i915_fbc { FBC_MODULE_PARAM, FBC_CHIP_DEFAULT, /* disabled by default on this chip */ FBC_ROTATION, /* rotation is not supported */ + FBC_IN_DBG_MASTER, /* kernel debugger is active */ } no_fbc_reason; bool (*fbc_enabled)(struct drm_i915_private *dev_priv); diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 9ef5b6c..8d39893 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -471,6 +471,8 @@ const char *intel_no_fbc_reason_str(enum no_fbc_reason reason) return "disabled per chip default"; case FBC_ROTATION: return "rotation unsupported"; + case FBC_IN_DBG_MASTER: + return "Kernel debugger is active"; default: MISSING_CASE(reason); return "unknown reason"; @@ -755,8 +757,10 @@ static void __intel_fbc_update(struct drm_i915_private *dev_priv) } /* If the kernel debugger is active, always disable compression */ - if (in_dbg_master()) + if (in_dbg_master()) { + set_no_fbc_reason(dev_priv, FBC_IN_DBG_MASTER); goto out_disable; + } if (intel_fbc_setup_cfb(dev_priv, obj->base.size, drm_format_plane_cpp(fb->pixel_format, 0))) {