forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-09 244b2c5ca8b14627e4a17755e5922221e121c771
kernel/drivers/gpu/drm/drm_edid_load.c
....@@ -1,30 +1,21 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 drm_edid_load.c: use a built-in EDID data set or load it via the firmware
34 interface
45
56 Copyright (C) 2012 Carsten Emde <C.Emde@osadl.org>
67
7
- This program is free software; you can redistribute it and/or
8
- modify it under the terms of the GNU General Public License
9
- as published by the Free Software Foundation; either version 2
10
- of the License, or (at your option) any later version.
11
-
12
- This program is distributed in the hope that it will be useful,
13
- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- GNU General Public License for more details.
16
-
17
- You should have received a copy of the GNU General Public License
18
- along with this program; if not, write to the Free Software
19
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
208 */
219
22
-#include <linux/module.h>
2310 #include <linux/firmware.h>
24
-#include <drm/drmP.h>
11
+#include <linux/module.h>
12
+#include <linux/platform_device.h>
13
+
2514 #include <drm/drm_crtc.h>
2615 #include <drm/drm_crtc_helper.h>
16
+#include <drm/drm_drv.h>
2717 #include <drm/drm_edid.h>
18
+#include <drm/drm_print.h>
2819
2920 static char edid_firmware[PATH_MAX];
3021 module_param_string(edid_firmware, edid_firmware, sizeof(edid_firmware), 0644);
....@@ -184,7 +175,7 @@
184175 u8 *edid;
185176 int fwsize, builtin;
186177 int i, valid_extensions = 0;
187
- bool print_bad_edid = !connector->bad_edid_counter || (drm_debug & DRM_UT_KMS);
178
+ bool print_bad_edid = !connector->bad_edid_counter || drm_debug_enabled(DRM_UT_KMS);
188179
189180 builtin = match_string(generic_edid_name, GENERIC_EDIDS, name);
190181 if (builtin >= 0) {