forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/include/drm/bridge/analogix_dp.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Analogix DP (Display Port) Core interface driver.
34 *
45 * Copyright (C) 2015 Rockchip Electronics Co., Ltd.
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 as published by the
8
- * Free Software Foundation; either version 2 of the License, or (at your
9
- * option) any later version.
106 */
117 #ifndef _ANALOGIX_DP_H_
128 #define _ANALOGIX_DP_H_
....@@ -19,64 +15,64 @@
1915 enum analogix_dp_devtype {
2016 EXYNOS_DP,
2117 RK3288_DP,
22
- RK3368_EDP,
2318 RK3399_EDP,
2419 RK3568_EDP,
20
+ RK3588_EDP,
2521 };
2622
2723 static inline bool is_rockchip(enum analogix_dp_devtype type)
2824 {
2925 switch (type) {
3026 case RK3288_DP:
31
- case RK3368_EDP:
3227 case RK3399_EDP:
3328 case RK3568_EDP:
29
+ case RK3588_EDP:
3430 return true;
3531 default:
3632 return false;
3733 }
3834 }
3935
40
-struct analogix_dp_plat_data;
41
-struct analogix_dp_property_ops {
42
- int (*attach_properties)(struct drm_connector *connector);
43
- int (*get_property)(struct drm_connector *connector,
44
- const struct drm_connector_state *state,
45
- struct drm_property *property,
46
- u64 *val,
47
- struct analogix_dp_plat_data *data);
48
-};
49
-
5036 struct analogix_dp_plat_data {
5137 enum analogix_dp_devtype dev_type;
5238 struct drm_panel *panel;
39
+ struct drm_bridge *bridge;
5340 struct drm_encoder *encoder;
5441 struct drm_connector *connector;
5542 bool skip_connector;
5643 bool ssc;
44
+
45
+ bool split_mode;
46
+
47
+ /* split with other display interface */
48
+ bool dual_connector_split;
49
+ bool left_display;
50
+
51
+ struct analogix_dp_device *left;
52
+ struct analogix_dp_device *right;
5753
5854 int (*power_on_start)(struct analogix_dp_plat_data *);
5955 int (*power_on_end)(struct analogix_dp_plat_data *);
6056 int (*power_off)(struct analogix_dp_plat_data *);
6157 int (*attach)(struct analogix_dp_plat_data *, struct drm_bridge *,
6258 struct drm_connector *);
59
+ void (*detach)(struct analogix_dp_plat_data *, struct drm_bridge *);
6360 int (*get_modes)(struct analogix_dp_plat_data *,
6461 struct drm_connector *);
65
- /* Vendor Property support */
66
- const struct analogix_dp_property_ops *property_ops;
62
+ void (*convert_to_split_mode)(struct drm_display_mode *);
63
+ void (*convert_to_origin_mode)(struct drm_display_mode *);
6764 };
68
-
69
-int analogix_dp_psr_enabled(struct analogix_dp_device *dp);
70
-int analogix_dp_enable_psr(struct analogix_dp_device *dp);
71
-int analogix_dp_disable_psr(struct analogix_dp_device *dp);
7265
7366 int analogix_dp_resume(struct analogix_dp_device *dp);
7467 int analogix_dp_suspend(struct analogix_dp_device *dp);
68
+int analogix_dp_runtime_resume(struct analogix_dp_device *dp);
69
+int analogix_dp_runtime_suspend(struct analogix_dp_device *dp);
7570
7671 struct analogix_dp_device *
77
-analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
78
- struct analogix_dp_plat_data *plat_data);
72
+analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data);
73
+int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev);
7974 void analogix_dp_unbind(struct analogix_dp_device *dp);
75
+void analogix_dp_remove(struct analogix_dp_device *dp);
8076
8177 int analogix_dp_start_crc(struct drm_connector *connector);
8278 int analogix_dp_stop_crc(struct drm_connector *connector);
....@@ -88,5 +84,7 @@
8884 int analogix_dp_audio_startup(struct analogix_dp_device *dp);
8985 int analogix_dp_audio_get_eld(struct analogix_dp_device *dp,
9086 u8 *buf, size_t len);
87
+int analogix_dp_loader_protect(struct analogix_dp_device *dp);
88
+void analogix_dp_disable(struct analogix_dp_device *dp);
9189
9290 #endif /* _ANALOGIX_DP_H_ */