mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 15:41:36 +00:00
7bb3bb4d56
Some of the platform-specific stuff in rockchip_dp_poweron() needs to happen before the generic code. Some needs to happen after. Let's split the callback in two. Specifically we can't start doing PSR work until _after_ the whole controller is up, so don't set the enable until the end. Cc: Kristian H. Kristensen <hoegsberg@chromium.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> [seanpaul added exynos change] Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Escande <thierry.escande@collabora.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-23-enric.balletbo@collabora.com
61 lines
1.8 KiB
C
61 lines
1.8 KiB
C
/*
|
|
* Analogix DP (Display Port) Core interface driver.
|
|
*
|
|
* Copyright (C) 2015 Rockchip Electronics Co., Ltd.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
* option) any later version.
|
|
*/
|
|
#ifndef _ANALOGIX_DP_H_
|
|
#define _ANALOGIX_DP_H_
|
|
|
|
#include <drm/drm_crtc.h>
|
|
|
|
struct analogix_dp_device;
|
|
|
|
enum analogix_dp_devtype {
|
|
EXYNOS_DP,
|
|
RK3288_DP,
|
|
RK3399_EDP,
|
|
};
|
|
|
|
static inline bool is_rockchip(enum analogix_dp_devtype type)
|
|
{
|
|
return type == RK3288_DP || type == RK3399_EDP;
|
|
}
|
|
|
|
struct analogix_dp_plat_data {
|
|
enum analogix_dp_devtype dev_type;
|
|
struct drm_panel *panel;
|
|
struct drm_encoder *encoder;
|
|
struct drm_connector *connector;
|
|
bool skip_connector;
|
|
|
|
int (*power_on_start)(struct analogix_dp_plat_data *);
|
|
int (*power_on_end)(struct analogix_dp_plat_data *);
|
|
int (*power_off)(struct analogix_dp_plat_data *);
|
|
int (*attach)(struct analogix_dp_plat_data *, struct drm_bridge *,
|
|
struct drm_connector *);
|
|
int (*get_modes)(struct analogix_dp_plat_data *,
|
|
struct drm_connector *);
|
|
};
|
|
|
|
int analogix_dp_psr_enabled(struct analogix_dp_device *dp);
|
|
int analogix_dp_enable_psr(struct analogix_dp_device *dp);
|
|
int analogix_dp_disable_psr(struct analogix_dp_device *dp);
|
|
|
|
int analogix_dp_resume(struct analogix_dp_device *dp);
|
|
int analogix_dp_suspend(struct analogix_dp_device *dp);
|
|
|
|
struct analogix_dp_device *
|
|
analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
|
|
struct analogix_dp_plat_data *plat_data);
|
|
void analogix_dp_unbind(struct analogix_dp_device *dp);
|
|
|
|
int analogix_dp_start_crc(struct drm_connector *connector);
|
|
int analogix_dp_stop_crc(struct drm_connector *connector);
|
|
|
|
#endif /* _ANALOGIX_DP_H_ */
|