summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/gvt.h
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@intel.com>2017-09-26 11:19:13 +0300
committerZhenyu Wang <zhenyuw@linux.intel.com>2017-11-16 06:48:20 +0300
commitbc7b0be316aebac42eb9e8e54c984609555944da (patch)
tree4b9f7249d843fe8bf273bf9446d9b856db2a9eba /drivers/gpu/drm/i915/gvt/gvt.h
parent6aa23ced915f94e23cd7bc3c1d005e39ef39bb2b (diff)
downloadlinux-bc7b0be316aebac42eb9e8e54c984609555944da.tar.xz
drm/i915/gvt: Add basic debugfs infrastructure
We need debugfs entry to expose some debug information of gvt and vGPUs. The first tool will be added is mmio-diff, which help to find the difference values of host and vGPU mmio. It's useful for platform enabling. This patch just add a basic debugfs infrastructure, each vGPU has its own sub-folder. Two simple attributes are created as a template. . ├── num_tracked_mmio ├── vgpu1 | └── active └── vgpu2 └── active Signed-off-by: Changbin Du <changbin.du@intel.com> Reviewed-by: Zhi Wang <zhi.a.wang@intel.com> Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/gvt.h')
-rw-r--r--drivers/gpu/drm/i915/gvt/gvt.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/gvt.h b/drivers/gpu/drm/i915/gvt/gvt.h
index 35c8d87151dd..f08d194f639f 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.h
+++ b/drivers/gpu/drm/i915/gvt/gvt.h
@@ -190,6 +190,8 @@ struct intel_vgpu {
struct intel_vgpu_display display;
struct intel_vgpu_submission submission;
+ struct dentry *debugfs;
+
#if IS_ENABLED(CONFIG_DRM_I915_GVT_KVMGT)
struct {
struct mdev_device *mdev;
@@ -253,7 +255,7 @@ struct intel_gvt_mmio {
unsigned int num_mmio_block;
DECLARE_HASHTABLE(mmio_info_table, INTEL_GVT_MMIO_HASH_BITS);
- unsigned int num_tracked_mmio;
+ unsigned long num_tracked_mmio;
};
struct intel_gvt_firmware {
@@ -301,6 +303,8 @@ struct intel_gvt {
struct task_struct *service_thread;
wait_queue_head_t service_thread_wq;
unsigned long service_request;
+
+ struct dentry *debugfs_root;
};
static inline struct intel_gvt *to_gvt(struct drm_i915_private *i915)
@@ -619,6 +623,12 @@ static inline bool intel_gvt_mmio_has_mode_mask(
return gvt->mmio.mmio_attribute[offset >> 2] & F_MODE_MASK;
}
+int intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu);
+void intel_gvt_debugfs_remove_vgpu(struct intel_vgpu *vgpu);
+int intel_gvt_debugfs_init(struct intel_gvt *gvt);
+void intel_gvt_debugfs_clean(struct intel_gvt *gvt);
+
+
#include "trace.h"
#include "mpt.h"