diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 9ac486fd19cc..5328dc17ee60 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1306,6 +1306,38 @@ DEFINE_SIMPLE_ATTRIBUTE(i915_scheduler_file_queue_max_fops, i915_scheduler_file_queue_max_set, "%llu\n"); +static int +i915_scheduler_dump_flags_get(void *data, u64 *val) +{ + struct drm_device *dev = data; + struct drm_i915_private *dev_priv = to_i915(dev); + struct i915_scheduler *scheduler = dev_priv->scheduler; + + *val = scheduler->dump_flags; + + return 0; +} + +static int +i915_scheduler_dump_flags_set(void *data, u64 val) +{ + struct drm_device *dev = data; + struct drm_i915_private *dev_priv = to_i915(dev); + struct i915_scheduler *scheduler = dev_priv->scheduler; + + scheduler->dump_flags = lower_32_bits(val) & I915_SF_DUMP_MASK; + + if (val & 1) + i915_scheduler_dump_all(dev, "DebugFS"); + + return 0; +} + +DEFINE_SIMPLE_ATTRIBUTE(i915_scheduler_dump_flags_fops, + i915_scheduler_dump_flags_get, + i915_scheduler_dump_flags_set, + "0x%llx\n"); + static int i915_frequency_info(struct seq_file *m, void *unused) { struct drm_info_node *node = m->private; @@ -5724,6 +5756,7 @@ static const struct i915_debugfs_files { {"i915_scheduler_priority_preempt", &i915_scheduler_priority_preempt_fops}, {"i915_scheduler_min_flying", &i915_scheduler_min_flying_fops}, {"i915_scheduler_file_queue_max", &i915_scheduler_file_queue_max_fops}, + {"i915_scheduler_dump_flags", &i915_scheduler_dump_flags_fops}, {"i915_display_crc_ctl", &i915_display_crc_ctl_fops}, {"i915_pri_wm_latency", &i915_pri_wm_latency_fops}, {"i915_spr_wm_latency", &i915_spr_wm_latency_fops}, |