From patchwork Fri Jan 23 12:25:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gordon X-Patchwork-Id: 5693521 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 BEF69C058D for ; Fri, 23 Jan 2015 12:25:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E1F4A20122 for ; Fri, 23 Jan 2015 12:25:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DEF942011E for ; Fri, 23 Jan 2015 12:25:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 65C486E8B7; Fri, 23 Jan 2015 04:25:49 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id CDEFC6E8B7 for ; Fri, 23 Jan 2015 04:25:48 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 23 Jan 2015 04:21:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,453,1418112000"; d="scan'208";a="641559597" Received: from dsgordon-linux.isw.intel.com ([10.102.226.149]) by orsmga001.jf.intel.com with ESMTP; 23 Jan 2015 04:25:44 -0800 From: Dave Gordon To: intel-gfx@lists.freedesktop.org Date: Fri, 23 Jan 2015 12:25:26 +0000 Message-Id: <1422015926-10406-1-git-send-email-david.s.gordon@intel.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Intel-gfx] [PATCH] drm/i915: debugfs interface to read module parameters 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 It can be useful to know what the driver's parameters have ended up set to after sanitisation, so this commit adds a debugfs function to print the current values of all the module parameters. Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com) --- drivers/gpu/drm/i915/i915_debugfs.c | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 2ad4c48..9d75efc 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -2819,6 +2819,50 @@ static int i915_ddb_info(struct seq_file *m, void *unused) return 0; } +static int i915_params(struct seq_file *m, void *unused) +{ + size_t extra; + + seq_printf(m, "i915.%s=%d\n", "modeset", i915.modeset); + seq_printf(m, "i915.%s=%d\n", "panel_ignore_lid", i915.panel_ignore_lid); + seq_printf(m, "i915.%s=%u\n", "powersave", i915.powersave); + seq_printf(m, "i915.%s=%d\n", "semaphores", i915.semaphores); + seq_printf(m, "i915.%s=%u\n", "lvds_downclock", i915.lvds_downclock); + seq_printf(m, "i915.%s=%d\n", "lvds_channel_mode", i915.lvds_channel_mode); + seq_printf(m, "i915.%s=%d\n", "panel_use_ssc", i915.panel_use_ssc); + seq_printf(m, "i915.%s=%d\n", "vbt_sdvo_panel_type", i915.vbt_sdvo_panel_type); + seq_printf(m, "i915.%s=%d\n", "enable_rc6", i915.enable_rc6); + seq_printf(m, "i915.%s=%d\n", "enable_fbc", i915.enable_fbc); + seq_printf(m, "i915.%s=%d\n", "enable_ppgtt", i915.enable_ppgtt); + seq_printf(m, "i915.%s=%d\n", "enable_execlists", i915.enable_execlists); + seq_printf(m, "i915.%s=%d\n", "enable_psr", i915.enable_psr); + seq_printf(m, "i915.%s=%u\n", "preliminary_hw_support", i915.preliminary_hw_support); + seq_printf(m, "i915.%s=%d\n", "disable_power_well", i915.disable_power_well); + seq_printf(m, "i915.%s=%d\n", "enable_ips", i915.enable_ips); + seq_printf(m, "i915.%s=%d\n", "invert_brightness", i915.invert_brightness); + seq_printf(m, "i915.%s=%d\n", "enable_cmd_parser", i915.enable_cmd_parser); + /* leave bools at the end to not create holes */ + seq_printf(m, "i915.%s=%#x\n", "enable_hangcheck", i915.enable_hangcheck); + seq_printf(m, "i915.%s=%#x\n", "fastboot", i915.fastboot); + seq_printf(m, "i915.%s=%#x\n", "prefault_disable", i915.prefault_disable); + seq_printf(m, "i915.%s=%#x\n", "reset", i915.reset); + seq_printf(m, "i915.%s=%#x\n", "disable_display", i915.disable_display); + seq_printf(m, "i915.%s=%#x\n", "disable_vtd_wa", i915.disable_vtd_wa); + seq_printf(m, "i915.%s=%d\n", "use_mmio_flip", i915.use_mmio_flip); + seq_printf(m, "i915.%s=%#x\n", "mmio_debug", i915.mmio_debug); + seq_printf(m, "i915.%s=%#x\n", "verbose_state_checks", i915.verbose_state_checks); + + /* Print a message if new members have been added without this code being updated */ + extra = sizeof(struct i915_params) + - offsetof(struct i915_params, verbose_state_checks) + - sizeof(i915.verbose_state_checks); + if (extra) + seq_printf(m, "Note: %lu bytes of padding or unknown options found after i915.%s\n", + extra, "verbose_state_checks"); + + return 0; +} + struct pipe_crc_info { const char *name; struct drm_device *dev; @@ -4433,6 +4477,7 @@ static const struct drm_info_list i915_debugfs_list[] = { {"i915_dp_mst_info", i915_dp_mst_info, 0}, {"i915_wa_registers", i915_wa_registers, 0}, {"i915_ddb_info", i915_ddb_info, 0}, + {"i915_params", i915_params, 0}, }; #define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list)