From patchwork Mon Dec 19 10:42:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: swati.dhingra@intel.com X-Patchwork-Id: 9480905 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9760F607FF for ; Tue, 20 Dec 2016 00:50:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CB20283E5 for ; Tue, 20 Dec 2016 00:50:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FA51284CA; Tue, 20 Dec 2016 00:50:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 14D6A2849D for ; Tue, 20 Dec 2016 00:50:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF7DA6E828; Tue, 20 Dec 2016 00:50:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29CA56E5AA; Mon, 19 Dec 2016 10:36:04 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 19 Dec 2016 02:36:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,373,1477983600"; d="scan'208";a="204458243" Received: from swati-desktop.iind.intel.com ([10.223.82.38]) by fmsmga004.fm.intel.com with ESMTP; 19 Dec 2016 02:36:01 -0800 From: swati.dhingra@intel.com To: intel-gfx@lists.freedesktop.org Subject: [RFC 2/4] drm: Register drmfs filesystem from drm init Date: Mon, 19 Dec 2016 16:12:24 +0530 Message-Id: <1482144146-31605-3-git-send-email-swati.dhingra@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482144146-31605-1-git-send-email-swati.dhingra@intel.com> References: <1482144146-31605-1-git-send-email-swati.dhingra@intel.com> X-Mailman-Approved-At: Tue, 20 Dec 2016 00:50:01 +0000 Cc: Daniel Vetter , Swati Dhingra , dri-devel@lists.freedesktop.org, Sourab Gupta , Jon Bloomfield , Akash Goel X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sourab Gupta 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 Signed-off-by: Swati Dhingra --- 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 #include +#include #include #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;