[Intel-gfx] [PATCH v2 2/2] drm/i915/gt: Move power management debug files into a gt aware debugfs
Chris Wilson
chris at chris-wilson.co.uk
Thu Dec 12 22:08:58 UTC 2019
Quoting Andi Shyti (2019-12-12 22:01:21)
> +static const struct drm_info_list i915_gt_pm_debugfs_list[] = {
> + {"i915_frequency_info", i915_frequency_info, 0},
> + {"i915_ring_freq_table", i915_ring_freq_table, 0},
> + {"i915_rps_boost_info", i915_rps_boost_info, 0},
> + {"i915_forcewake_domains", i915_forcewake_domains, 0},
> + {"i915_drpc_info", i915_drpc_info, 0},
> + {"i915_llc", i915_llc, 0},
One thing as we are moving beneath a directory, we can break the naming
convention as we go. We certainly do not mean to imply these are global
i915 properties anymore, and do not need i915_ to differentiate from
core debugfs either.
> +};
> +
> +int intel_gt_pm_debugfs_register(struct intel_gt *gt)
> +{
> + struct drm_minor *minor = gt->i915->drm.primary;
> +
> + return drm_debugfs_create_files(i915_gt_pm_debugfs_list,
> + ARRAY_SIZE(i915_gt_pm_debugfs_list),
> + gt->debugfs_entry, minor);
There's a patch 3, right? (For the passing of gt as the private, not
using drm_debugfs?)
> +}
> struct dpcd_block {
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.h b/drivers/gpu/drm/i915/i915_debugfs.h
> index c0cd22eb916d..56bd7d14bb22 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.h
> +++ b/drivers/gpu/drm/i915/i915_debugfs.h
> @@ -6,6 +6,10 @@
> #ifndef __I915_DEBUGFS_H__
> #define __I915_DEBUGFS_H__
>
> +#include <drm/drm_debugfs.h>
> +
> +#include "i915_drv.h"
> +
> struct drm_i915_private;
> struct drm_connector;
>
> @@ -17,4 +21,9 @@ static inline int i915_debugfs_register(struct drm_i915_private *dev_priv) { ret
> static inline int i915_debugfs_connector_add(struct drm_connector *connector) { return 0; }
> #endif
>
> +static inline struct drm_i915_private *node_to_i915(struct drm_info_node *node)
> +{
> + return to_i915(node->minor->dev);
> +}
I wouldn't bother exporting this as a common header as it is only
temporary and the privates will depend on how we setup the debugfs --
which will different :-p
-Chris
More information about the Intel-gfx
mailing list