.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2014 Red Hat |
---|
3 | 4 | * Author: Rob Clark <robdclark@gmail.com> |
---|
4 | 5 | * 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/>. |
---|
17 | 6 | */ |
---|
18 | | - |
---|
19 | | -#include <linux/gpio.h> |
---|
20 | 7 | |
---|
21 | 8 | #include "mdp4_kms.h" |
---|
22 | 9 | |
---|
.. | .. |
---|
63 | 50 | struct drm_panel *panel = mdp4_lvds_connector->panel; |
---|
64 | 51 | int ret = 0; |
---|
65 | 52 | |
---|
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); |
---|
73 | 55 | |
---|
74 | 56 | return ret; |
---|
75 | 57 | } |
---|
76 | 58 | |
---|
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) |
---|
79 | 62 | { |
---|
80 | 63 | struct mdp4_lvds_connector *mdp4_lvds_connector = |
---|
81 | 64 | to_mdp4_lvds_connector(connector); |
---|