forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
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,14 @@
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;
81
- struct drm_dp_aux aux;
71
+ struct rockchip_drm_sub_dev sub_dev;
8272
8373 struct mutex lock;
8474 bool connected;
8575 bool active;
8676 bool suspended;
87
- bool use_fw_training;
88
- u8 id;
8977
9078 const struct firmware *fw; /* cdn dp firmware */
9179 unsigned int fw_version; /* cdn fw version */
....@@ -103,12 +91,12 @@
10391 struct reset_control *core_rst;
10492 struct audio_info audio_info;
10593 struct video_info video_info;
106
- struct drm_dp_link link;
10794 struct cdn_dp_port *port[MAX_PHY];
10895 u8 ports;
96
+ u8 max_lanes;
97
+ unsigned int max_rate;
10998 u8 lanes;
11099 int active_port;
111
- u8 train_set[4];
112100
113101 u8 dpcd[DP_RECEIVER_CAP_SIZE];
114102 bool sink_has_audio;