| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | drm_edid_load.c: use a built-in EDID data set or load it via the firmware |
|---|
| 3 | 4 | interface |
|---|
| 4 | 5 | |
|---|
| 5 | 6 | Copyright (C) 2012 Carsten Emde <C.Emde@osadl.org> |
|---|
| 6 | 7 | |
|---|
| 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. |
|---|
| 20 | 8 | */ |
|---|
| 21 | 9 | |
|---|
| 22 | | -#include <linux/module.h> |
|---|
| 23 | 10 | #include <linux/firmware.h> |
|---|
| 24 | | -#include <drm/drmP.h> |
|---|
| 11 | +#include <linux/module.h> |
|---|
| 12 | +#include <linux/platform_device.h> |
|---|
| 13 | + |
|---|
| 25 | 14 | #include <drm/drm_crtc.h> |
|---|
| 26 | 15 | #include <drm/drm_crtc_helper.h> |
|---|
| 16 | +#include <drm/drm_drv.h> |
|---|
| 27 | 17 | #include <drm/drm_edid.h> |
|---|
| 18 | +#include <drm/drm_print.h> |
|---|
| 28 | 19 | |
|---|
| 29 | 20 | static char edid_firmware[PATH_MAX]; |
|---|
| 30 | 21 | module_param_string(edid_firmware, edid_firmware, sizeof(edid_firmware), 0644); |
|---|
| .. | .. |
|---|
| 184 | 175 | u8 *edid; |
|---|
| 185 | 176 | int fwsize, builtin; |
|---|
| 186 | 177 | 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); |
|---|
| 188 | 179 | |
|---|
| 189 | 180 | builtin = match_string(generic_edid_name, GENERIC_EDIDS, name); |
|---|
| 190 | 181 | if (builtin >= 0) { |
|---|