1 /*
2 * Copyright (c) 2015-2023, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23 #include <linux/module.h>
24
25 #include "nvidia-drm-os-interface.h"
26 #include "nvidia-drm.h"
27
28 #include "nvidia-drm-conftest.h"
29
30 #if defined(NV_DRM_AVAILABLE)
31
32 MODULE_PARM_DESC(
33 modeset,
34 "Enable atomic kernel modesetting (1 = enable, 0 = disable (default))");
35 module_param_named(modeset, nv_drm_modeset_module_param, bool, 0400);
36
37 #if defined(NV_DRM_FBDEV_GENERIC_AVAILABLE)
38 MODULE_PARM_DESC(
39 fbdev,
40 "Create a framebuffer device (1 = enable, 0 = disable (default)) (EXPERIMENTAL)");
41 module_param_named(fbdev, nv_drm_fbdev_module_param, bool, 0400);
42 #endif
43
44 #endif /* NV_DRM_AVAILABLE */
45
46 /*************************************************************************
47 * Linux loading support code.
48 *************************************************************************/
49
nv_linux_drm_init(void)50 static int __init nv_linux_drm_init(void)
51 {
52 return nv_drm_init();
53 }
54
nv_linux_drm_exit(void)55 static void __exit nv_linux_drm_exit(void)
56 {
57 nv_drm_exit();
58 }
59
60 module_init(nv_linux_drm_init);
61 module_exit(nv_linux_drm_exit);
62
63 MODULE_LICENSE("Dual MIT/GPL");
64
65 MODULE_INFO(supported, "external");
66 MODULE_VERSION(NV_VERSION_STRING);
67