[Intel-gfx] [PATCH] add proc structure definitions to header

Ben Gamari bgamari at gmail.com
Thu Jan 15 01:27:33 CET 2009


---
 drivers/gpu/drm/drm_stub.c |    2 +-
 include/drm/drmP.h         |   24 +++++++++++++++++++++++-
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 5ca132a..566847d 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -313,7 +313,7 @@ static int drm_get_minor(struct drm_device *dev, struct drm_minor **minor, int t
 			goto err_mem;
 		}
 	} else
-		new_minor->dev_root = NULL;
+		new_minor->proc_root = NULL;
 
 	ret = drm_sysfs_device_add(new_minor);
 	if (ret) {
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index afb7858..efa7935 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -801,6 +801,25 @@ struct drm_driver {
 #define DRM_MINOR_RENDER 3
 
 /**
+ * proc node list. This structure represents a debugfs file to
+ * be created by the drm core
+ */
+struct drm_proc_list {
+        const char *name; /** file name */
+        int (*show)(struct seq_file*, void*); /** show callback*/
+        u32 driver_features; /**< Required driver features for this entry */
+};
+
+/**
+ * proc node structure. This structure represents a proc file.
+ */
+struct drm_proc_node {
+        struct list_head list;
+        struct drm_minor *minor;
+        struct drm_proc_list *proc_ent;
+};
+
+/**
  * DRM minor structure. This structure represents a drm minor number.
  */
 struct drm_minor {
@@ -809,7 +828,10 @@ struct drm_minor {
 	dev_t device;			/**< Device number for mknod */
 	struct device kdev;		/**< Linux device */
 	struct drm_device *dev;
-	struct proc_dir_entry *dev_root;  /**< proc directory entry */
+
+	struct proc_dir_entry *proc_root;  /**< proc directory entry */
+	struct drm_proc_node proc_nodes;
+
 	struct drm_master *master; /* currently active master for this node */
 	struct list_head master_list;
 	struct drm_mode_group mode_group;
-- 
1.6.0.6




More information about the Intel-gfx mailing list