forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/gpu/drm/rockchip/cdn-dp-core.h
....@@ -1,24 +1,16 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2016 Chris Zhong <zyw@rock-chips.com>
34 * Copyright (C) 2016 ROCKCHIP, Inc.
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
135 */
146
157 #ifndef _CDN_DP_CORE_H
168 #define _CDN_DP_CORE_H
179
18
-#include <drm/drmP.h>
19
-#include <drm/drm_crtc_helper.h>
2010 #include <drm/drm_dp_helper.h>
2111 #include <drm/drm_panel.h>
12
+#include <drm/drm_probe_helper.h>
13
+
2214 #include "rockchip_drm_drv.h"
2315
2416 #define MAX_PHY 2
....@@ -61,8 +53,6 @@
6153
6254 struct cdn_dp_port {
6355 struct cdn_dp_device *dp;
64
- struct notifier_block event_nb;
65
- struct extcon_dev *extcon;
6656 struct phy *phy;
6757 u8 lanes;
6858 bool phy_enabled;
....@@ -76,16 +66,16 @@
7666 struct drm_encoder encoder;
7767 struct drm_display_mode mode;
7868 struct platform_device *audio_pdev;
79
- struct work_struct event_work;
69
+ struct delayed_work event_work;
8070 struct edid *edid;
8171 struct drm_dp_aux aux;
72
+ struct rockchip_drm_sub_dev sub_dev;
8273
8374 struct mutex lock;
8475 bool connected;
8576 bool active;
8677 bool suspended;
8778 bool use_fw_training;
88
- u8 id;
8979
9080 const struct firmware *fw; /* cdn dp firmware */
9181 unsigned int fw_version; /* cdn fw version */
....@@ -103,9 +93,10 @@
10393 struct reset_control *core_rst;
10494 struct audio_info audio_info;
10595 struct video_info video_info;
106
- struct drm_dp_link link;
10796 struct cdn_dp_port *port[MAX_PHY];
10897 u8 ports;
98
+ u8 max_lanes;
99
+ unsigned int max_rate;
109100 u8 lanes;
110101 int active_port;
111102 u8 train_set[4];