2 * Analogix DP (Display Port) Core interface driver.
4 * Copyright (C) 2015 Rockchip Electronics Co., Ltd.
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.
11 #ifndef _ANALOGIX_DP_H_
12 #define _ANALOGIX_DP_H_
14 #include <drm/drm_crtc.h>
16 struct analogix_dp_device;
18 enum analogix_dp_devtype {
24 static inline bool is_rockchip(enum analogix_dp_devtype type)
26 return type == RK3288_DP || type == RK3399_EDP;
29 struct analogix_dp_plat_data {
30 enum analogix_dp_devtype dev_type;
31 struct drm_panel *panel;
32 struct drm_encoder *encoder;
33 struct drm_connector *connector;
36 int (*power_on)(struct analogix_dp_plat_data *);
37 int (*power_off)(struct analogix_dp_plat_data *);
38 int (*attach)(struct analogix_dp_plat_data *, struct drm_bridge *,
39 struct drm_connector *);
40 int (*get_modes)(struct analogix_dp_plat_data *,
41 struct drm_connector *);
44 int analogix_dp_psr_enabled(struct analogix_dp_device *dp);
45 int analogix_dp_enable_psr(struct analogix_dp_device *dp);
46 int analogix_dp_disable_psr(struct analogix_dp_device *dp);
48 int analogix_dp_resume(struct analogix_dp_device *dp);
49 int analogix_dp_suspend(struct analogix_dp_device *dp);
51 struct analogix_dp_device *
52 analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
53 struct analogix_dp_plat_data *plat_data);
54 void analogix_dp_unbind(struct analogix_dp_device *dp);
56 int analogix_dp_start_crc(struct drm_connector *connector);
57 int analogix_dp_stop_crc(struct drm_connector *connector);
59 #endif /* _ANALOGIX_DP_H_ */