return 0;
}
-
-static void mdp5_kms_debugfs_cleanup(struct msm_kms *kms, struct drm_minor *minor)
-{
- drm_debugfs_remove_files(mdp5_debugfs_list,
- ARRAY_SIZE(mdp5_debugfs_list), minor);
-}
#endif
static const struct mdp_kms_funcs kms_funcs = {
.destroy = mdp5_kms_destroy,
#ifdef CONFIG_DEBUG_FS
.debugfs_init = mdp5_kms_debugfs_init,
- .debugfs_cleanup = mdp5_kms_debugfs_cleanup,
#endif
},
.set_irqmask = mdp5_set_irqmask,
struct drm_device *dev = minor->dev;
struct msm_drm_private *priv = dev->dev_private;
- drm_debugfs_remove_files(msm_debugfs_list,
- ARRAY_SIZE(msm_debugfs_list), minor);
if (!priv)
return;
int buftot, bufpos;
unsigned long next_jiffies;
-
- struct dentry *ent;
- struct drm_info_node *node;
};
#define SAMPLE_TIME (HZ/4)
{
struct msm_drm_private *priv = minor->dev->dev_private;
struct msm_perf_state *perf;
+ struct dentry *ent;
/* only create on first minor: */
if (priv->perf)
mutex_init(&perf->read_lock);
priv->perf = perf;
- perf->node = kzalloc(sizeof(*perf->node), GFP_KERNEL);
- if (!perf->node)
- goto fail;
-
- perf->ent = debugfs_create_file("perf", S_IFREG | S_IRUGO,
+ ent = debugfs_create_file("perf", S_IFREG | S_IRUGO,
minor->debugfs_root, perf, &perf_debugfs_fops);
- if (!perf->ent) {
+ if (!ent) {
DRM_ERROR("Cannot create /sys/kernel/debug/dri/%pd/perf\n",
minor->debugfs_root);
goto fail;
}
- perf->node->minor = minor;
- perf->node->dent = perf->ent;
- perf->node->info_ent = NULL;
-
- mutex_lock(&minor->debugfs_lock);
- list_add(&perf->node->list, &minor->debugfs_list);
- mutex_unlock(&minor->debugfs_lock);
-
return 0;
fail:
priv->perf = NULL;
- debugfs_remove(perf->ent);
-
- if (perf->node) {
- mutex_lock(&minor->debugfs_lock);
- list_del(&perf->node->list);
- mutex_unlock(&minor->debugfs_lock);
- kfree(perf->node);
- }
-
mutex_destroy(&perf->read_lock);
kfree(perf);
bool open;
- struct dentry *ent;
- struct drm_info_node *node;
-
/* current submit to read out: */
struct msm_gem_submit *submit;
{
struct msm_drm_private *priv = minor->dev->dev_private;
struct msm_rd_state *rd;
+ struct dentry *ent;
/* only create on first minor: */
if (priv->rd)
init_waitqueue_head(&rd->fifo_event);
- rd->node = kzalloc(sizeof(*rd->node), GFP_KERNEL);
- if (!rd->node)
- goto fail;
-
- rd->ent = debugfs_create_file("rd", S_IFREG | S_IRUGO,
+ ent = debugfs_create_file("rd", S_IFREG | S_IRUGO,
minor->debugfs_root, rd, &rd_debugfs_fops);
- if (!rd->ent) {
+ if (!ent) {
DRM_ERROR("Cannot create /sys/kernel/debug/dri/%pd/rd\n",
minor->debugfs_root);
goto fail;
}
- rd->node->minor = minor;
- rd->node->dent = rd->ent;
- rd->node->info_ent = NULL;
-
- mutex_lock(&minor->debugfs_lock);
- list_add(&rd->node->list, &minor->debugfs_list);
- mutex_unlock(&minor->debugfs_lock);
-
return 0;
fail:
return;
priv->rd = NULL;
-
- debugfs_remove(rd->ent);
-
- if (rd->node) {
- mutex_lock(&minor->debugfs_lock);
- list_del(&rd->node->list);
- mutex_unlock(&minor->debugfs_lock);
- kfree(rd->node);
- }
-
mutex_destroy(&rd->read_lock);
-
kfree(rd);
}