From patchwork Fri Jun 10 13:36:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: akash.goel@intel.com X-Patchwork-Id: 9169795 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BABB560573 for ; Fri, 10 Jun 2016 13:23:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB90F28319 for ; Fri, 10 Jun 2016 13:23:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A08872835E; Fri, 10 Jun 2016 13:23:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E14D28319 for ; Fri, 10 Jun 2016 13:23:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A03C6ED3D; Fri, 10 Jun 2016 13:23:50 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 21F956ED3D for ; Fri, 10 Jun 2016 13:23:35 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 10 Jun 2016 06:23:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,449,1459839600"; d="scan'208";a="825507065" Received: from akashgoe-desktop.iind.intel.com ([10.223.82.36]) by orsmga003.jf.intel.com with ESMTP; 10 Jun 2016 06:23:34 -0700 From: akash.goel@intel.com To: intel-gfx@lists.freedesktop.org Date: Fri, 10 Jun 2016 19:06:27 +0530 Message-Id: <1465565789-30570-10-git-send-email-akash.goel@intel.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1465565789-30570-1-git-send-email-akash.goel@intel.com> References: <1465565789-30570-1-git-send-email-akash.goel@intel.com> Cc: sourab.gupta@intel.com, Akash Goel Subject: [Intel-gfx] [PATCH 09/11] drm/i915: New module param to control the size of buffer used for storing GuC firmware logs 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-Virus-Scanned: ClamAV using ClamSMTP From: Akash Goel On recieving the log buffer flush interrupt from GuC firmware, Driver stores the snapshot of the log buffer in a local buffer, from which Userspace can pull the logs. By default Driver store, up to, 4 snapshots of the log buffer in a local buffer (managed by relay). Added a new module (read only) param, 'guc_log_size', through which User can specify the number of snapshots of log buffer to be stored in local buffer. This can be used to ensure capturing of all boot time logs even with high verbosity level. Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- drivers/gpu/drm/i915/i915_params.c | 5 +++++ drivers/gpu/drm/i915/i915_params.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c index 53a9ff99..cf72482 100644 --- a/drivers/gpu/drm/i915/i915_guc_submission.c +++ b/drivers/gpu/drm/i915/i915_guc_submission.c @@ -950,7 +950,7 @@ static void guc_create_log_relay_file(struct intel_guc *guc) /* Keep the size of sub buffers same as shared log buffer */ subbuf_size = guc->log_obj->base.size; /* TODO: Decide based on the User's input */ - n_subbufs = 4; + n_subbufs = i915.guc_log_size; guc_log_relay_chan = relay_open("guc_log", log_dir, subbuf_size, n_subbufs, &relay_callbacks, dev); diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c index 5e18cf9..f8ddec8 100644 --- a/drivers/gpu/drm/i915/i915_params.c +++ b/drivers/gpu/drm/i915/i915_params.c @@ -57,6 +57,7 @@ struct i915_params i915 __read_mostly = { .enable_guc_loading = 0, .enable_guc_submission = 0, .guc_log_level = -1, + .guc_log_size = 4, .enable_dp_mst = true, .inject_load_failure = 0, .enable_dpcd_backlight = false, @@ -213,6 +214,10 @@ module_param_named(guc_log_level, i915.guc_log_level, int, 0400); MODULE_PARM_DESC(guc_log_level, "GuC firmware logging level (-1:disabled (default), 0-3:enabled)"); +module_param_named(guc_log_size, i915.guc_log_size, int, 0400); +MODULE_PARM_DESC(guc_log_size, + "Number of sub buffers to store GuC firmware logs (default: 4)"); + module_param_named_unsafe(enable_dp_mst, i915.enable_dp_mst, bool, 0600); MODULE_PARM_DESC(enable_dp_mst, "Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)"); diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h index 1323261..cbd649e 100644 --- a/drivers/gpu/drm/i915/i915_params.h +++ b/drivers/gpu/drm/i915/i915_params.h @@ -48,6 +48,7 @@ struct i915_params { int enable_guc_loading; int enable_guc_submission; int guc_log_level; + int guc_log_size; int use_mmio_flip; int mmio_debug; int edp_vswing;