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@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx