1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28#include <linux/module.h>
29#include <drm/drmP.h>
30
31#include "drm_crtc_helper_internal.h"
32
33MODULE_AUTHOR("David Airlie, Jesse Barnes");
34MODULE_DESCRIPTION("DRM KMS helper");
35MODULE_LICENSE("GPL and additional rights");
36
37#if IS_ENABLED(CONFIG_DRM_LOAD_EDID_FIRMWARE)
38
39
40static int edid_firmware_set(const char *val, const struct kernel_param *kp)
41{
42 DRM_NOTE("drm_kms_firmware.edid_firmware is deprecated, please use drm.edid_firmware intead.\n");
43
44 return __drm_set_edid_firmware_path(val);
45}
46
47static int edid_firmware_get(char *buffer, const struct kernel_param *kp)
48{
49 return __drm_get_edid_firmware_path(buffer, PAGE_SIZE);
50}
51
52static const struct kernel_param_ops edid_firmware_ops = {
53 .set = edid_firmware_set,
54 .get = edid_firmware_get,
55};
56
57module_param_cb(edid_firmware, &edid_firmware_ops, NULL, 0644);
58__MODULE_PARM_TYPE(edid_firmware, "charp");
59MODULE_PARM_DESC(edid_firmware,
60 "DEPRECATED. Use drm.edid_firmware module parameter instead.");
61
62#endif
63
64static int __init drm_kms_helper_init(void)
65{
66 int ret;
67
68
69 ret = drm_fb_helper_modinit();
70 if (ret < 0)
71 goto out;
72
73 ret = drm_dp_aux_dev_init();
74 if (ret < 0)
75 goto out;
76
77out:
78 return ret;
79}
80
81static void __exit drm_kms_helper_exit(void)
82{
83
84 drm_dp_aux_dev_exit();
85}
86
87module_init(drm_kms_helper_init);
88module_exit(drm_kms_helper_exit);
89