[RFC 2/4] drm: Register drmfs filesystem from drm init
swati.dhingra at intel.com
swati.dhingra at intel.com
Mon Dec 19 10:42:24 UTC 2016
From: Sourab Gupta <sourab.gupta at intel.com>
The drmfs filesystem will not be registered standalone during kernel init time,
instead it is intended to be initialized/registered during drm initialization.
This again is dependent on CONFIG_DRMFS being defined.
Signed-off-by: Sourab Gupta <sourab.gupta at intel.com>
Signed-off-by: Swati Dhingra <swati.dhingra at intel.com>
---
drivers/gpu/drm/drm_drv.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index f74b7d0..298013c 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -34,6 +34,7 @@
#include <linux/slab.h>
#include <drm/drm_drv.h>
+#include <drm/drmfs.h>
#include <drm/drmP.h>
#include "drm_crtc_internal.h"
@@ -828,6 +829,7 @@ static void drm_core_exit(void)
{
unregister_chrdev(DRM_MAJOR, "drm");
debugfs_remove(drm_debugfs_root);
+ drmfs_fini();
drm_sysfs_destroy();
idr_destroy(&drm_minors_idr);
drm_connector_ida_destroy();
@@ -848,6 +850,10 @@ static int __init drm_core_init(void)
goto error;
}
+ ret = drmfs_init();
+ if (ret < 0)
+ DRM_ERROR("Cannot create DRM FS: %d\n", ret);
+
drm_debugfs_root = debugfs_create_dir("dri", NULL);
if (!drm_debugfs_root) {
ret = -ENOMEM;
--
2.7.4
More information about the dri-devel
mailing list