2019-05-27 09:55:01 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2016-03-29 04:57:03 +03:00
|
|
|
/*
|
|
|
|
* Analogix DP (Display Port) Core interface driver.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2015 Rockchip Electronics Co., Ltd.
|
|
|
|
*/
|
|
|
|
#ifndef _ANALOGIX_DP_H_
|
|
|
|
#define _ANALOGIX_DP_H_
|
|
|
|
|
|
|
|
#include <drm/drm_crtc.h>
|
|
|
|
|
2018-01-10 19:23:41 +03:00
|
|
|
struct analogix_dp_device;
|
|
|
|
|
2016-03-29 04:57:03 +03:00
|
|
|
enum analogix_dp_devtype {
|
|
|
|
EXYNOS_DP,
|
2016-03-29 04:57:30 +03:00
|
|
|
RK3288_DP,
|
2016-06-29 12:15:26 +03:00
|
|
|
RK3399_EDP,
|
2016-03-29 04:57:03 +03:00
|
|
|
};
|
|
|
|
|
2016-06-29 12:15:18 +03:00
|
|
|
static inline bool is_rockchip(enum analogix_dp_devtype type)
|
|
|
|
{
|
2016-06-29 12:15:26 +03:00
|
|
|
return type == RK3288_DP || type == RK3399_EDP;
|
2016-06-29 12:15:18 +03:00
|
|
|
}
|
|
|
|
|
2016-03-29 04:57:03 +03:00
|
|
|
struct analogix_dp_plat_data {
|
|
|
|
enum analogix_dp_devtype dev_type;
|
|
|
|
struct drm_panel *panel;
|
|
|
|
struct drm_encoder *encoder;
|
|
|
|
struct drm_connector *connector;
|
2018-03-05 11:57:41 +03:00
|
|
|
bool skip_connector;
|
2016-03-29 04:57:03 +03:00
|
|
|
|
2018-04-23 13:49:58 +03:00
|
|
|
int (*power_on_start)(struct analogix_dp_plat_data *);
|
|
|
|
int (*power_on_end)(struct analogix_dp_plat_data *);
|
2016-03-29 04:57:03 +03:00
|
|
|
int (*power_off)(struct analogix_dp_plat_data *);
|
|
|
|
int (*attach)(struct analogix_dp_plat_data *, struct drm_bridge *,
|
|
|
|
struct drm_connector *);
|
2016-06-29 12:15:35 +03:00
|
|
|
int (*get_modes)(struct analogix_dp_plat_data *,
|
|
|
|
struct drm_connector *);
|
2016-03-29 04:57:03 +03:00
|
|
|
};
|
|
|
|
|
2018-01-10 19:23:41 +03:00
|
|
|
int analogix_dp_resume(struct analogix_dp_device *dp);
|
|
|
|
int analogix_dp_suspend(struct analogix_dp_device *dp);
|
2016-03-29 04:57:03 +03:00
|
|
|
|
2018-01-10 19:23:41 +03:00
|
|
|
struct analogix_dp_device *
|
2020-03-10 13:34:27 +03:00
|
|
|
analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data);
|
|
|
|
int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev);
|
2018-01-10 19:23:41 +03:00
|
|
|
void analogix_dp_unbind(struct analogix_dp_device *dp);
|
2020-03-10 13:34:27 +03:00
|
|
|
void analogix_dp_remove(struct analogix_dp_device *dp);
|
2016-03-29 04:57:03 +03:00
|
|
|
|
2017-03-03 16:39:35 +03:00
|
|
|
int analogix_dp_start_crc(struct drm_connector *connector);
|
|
|
|
int analogix_dp_stop_crc(struct drm_connector *connector);
|
|
|
|
|
2016-03-29 04:57:03 +03:00
|
|
|
#endif /* _ANALOGIX_DP_H_ */
|