All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Dave Gordon <david.s.gordon@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: debugfs interface to read module parameters
Date: Fri, 23 Jan 2015 14:35:20 +0200	[thread overview]
Message-ID: <20150123123520.GV19354@intel.com> (raw)
In-Reply-To: <1422015926-10406-1-git-send-email-david.s.gordon@intel.com>

On Fri, Jan 23, 2015 at 12:25:26PM +0000, Dave Gordon wrote:
> 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.

What's wrong with eg. 'grep . /sys/module/i915/parameters/*' ?

> ---
>  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)
>  
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-01-23 12:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 12:25 [PATCH] drm/i915: debugfs interface to read module parameters Dave Gordon
2015-01-23 12:35 ` Ville Syrjälä [this message]
2015-01-23 15:40   ` Daniel Vetter
2015-01-23 21:05   ` Chris Wilson
2015-01-24  5:02 ` shuang.he

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150123123520.GV19354@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=david.s.gordon@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.