forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c
....@@ -1,22 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2014 Red Hat
34 * Author: Rob Clark <robdclark@gmail.com>
45 * Author: Vinay Simha <vinaysimha@inforcecomputing.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License version 2 as published by
8
- * the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
14
- *
15
- * You should have received a copy of the GNU General Public License along with
16
- * this program. If not, see <http://www.gnu.org/licenses/>.
176 */
18
-
19
-#include <linux/gpio.h>
207
218 #include "mdp4_kms.h"
229
....@@ -63,19 +50,15 @@
6350 struct drm_panel *panel = mdp4_lvds_connector->panel;
6451 int ret = 0;
6552
66
- if (panel) {
67
- drm_panel_attach(panel, connector);
68
-
69
- ret = panel->funcs->get_modes(panel);
70
-
71
- drm_panel_detach(panel);
72
- }
53
+ if (panel)
54
+ ret = drm_panel_get_modes(panel, connector);
7355
7456 return ret;
7557 }
7658
77
-static int mdp4_lvds_connector_mode_valid(struct drm_connector *connector,
78
- struct drm_display_mode *mode)
59
+static enum drm_mode_status
60
+mdp4_lvds_connector_mode_valid(struct drm_connector *connector,
61
+ struct drm_display_mode *mode)
7962 {
8063 struct mdp4_lvds_connector *mdp4_lvds_connector =
8164 to_mdp4_lvds_connector(connector);