@@ -1650,13 +1650,30 @@ static const struct i915_debugfs_files {
#endif
};
+static int dither_state_show(struct seq_file *m, void *data)
+{
+ struct intel_crtc *crtc = to_intel_crtc(m->private);
+ struct intel_crtc_state *crtc_state = to_intel_crtc_state(crtc->base.state);
+
+ seq_printf(m, "Dither: %u\n", crtc_state->dither);
+
+ return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(dither_state);
+
void i915_debugfs_register(struct drm_i915_private *dev_priv)
{
struct drm_minor *minor = dev_priv->drm.primary;
+ struct drm_device *dev = &dev_priv->drm;
+ struct drm_crtc *crtc;
int i;
i915_debugfs_params(dev_priv);
+ drm_for_each_crtc(crtc, dev)
+ debugfs_create_file("dither", S_IRUGO, crtc->debugfs_entry, crtc,
+ &dither_state_fops);
+
debugfs_create_file("i915_forcewake_user", S_IRUSR, minor->debugfs_root,
to_i915(minor->dev), &i915_forcewake_fops);
for (i = 0; i < ARRAY_SIZE(i915_debugfs_files); i++) {
[Why] It's useful to know the dithering state for IGT testing. [How] Expose the dithering state for the crtc via a debugfs file "dither". Example usage: cat /sys/kernel/debug/dri/0/crtc-0/dither Cc: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> --- drivers/gpu/drm/i915/i915_debugfs.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)