hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
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,59 @@
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
+ struct analogix_dp_device *left;
47
+ struct analogix_dp_device *right;
5748
5849 int (*power_on_start)(struct analogix_dp_plat_data *);
5950 int (*power_on_end)(struct analogix_dp_plat_data *);
6051 int (*power_off)(struct analogix_dp_plat_data *);
6152 int (*attach)(struct analogix_dp_plat_data *, struct drm_bridge *,
6253 struct drm_connector *);
54
+ void (*detach)(struct analogix_dp_plat_data *, struct drm_bridge *);
6355 int (*get_modes)(struct analogix_dp_plat_data *,
6456 struct drm_connector *);
65
- /* Vendor Property support */
66
- const struct analogix_dp_property_ops *property_ops;
57
+ void (*convert_to_split_mode)(struct drm_display_mode *);
58
+ void (*convert_to_origin_mode)(struct drm_display_mode *);
6759 };
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);
7260
7361 int analogix_dp_resume(struct analogix_dp_device *dp);
7462 int analogix_dp_suspend(struct analogix_dp_device *dp);
63
+int analogix_dp_runtime_resume(struct analogix_dp_device *dp);
64
+int analogix_dp_runtime_suspend(struct analogix_dp_device *dp);
7565
7666 struct analogix_dp_device *
77
-analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
78
- struct analogix_dp_plat_data *plat_data);
67
+analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data);
68
+int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev);
7969 void analogix_dp_unbind(struct analogix_dp_device *dp);
70
+void analogix_dp_remove(struct analogix_dp_device *dp);
8071
8172 int analogix_dp_start_crc(struct drm_connector *connector);
8273 int analogix_dp_stop_crc(struct drm_connector *connector);
....@@ -88,5 +79,7 @@
8879 int analogix_dp_audio_startup(struct analogix_dp_device *dp);
8980 int analogix_dp_audio_get_eld(struct analogix_dp_device *dp,
9081 u8 *buf, size_t len);
82
+int analogix_dp_loader_protect(struct analogix_dp_device *dp);
83
+void analogix_dp_disable(struct analogix_dp_device *dp);
9184
9285 #endif /* _ANALOGIX_DP_H_ */