2019-10-21 22:34:37 +08:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2013-2019 NVIDIA Corporation.
|
|
|
|
* Copyright (C) 2015 Rob Clark
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DRM_TEGRA_DP_H
|
|
|
|
#define DRM_TEGRA_DP_H 1
|
|
|
|
|
2015-12-03 19:45:45 +08:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
2019-10-21 22:34:37 +08:00
|
|
|
struct drm_dp_aux;
|
|
|
|
|
2015-12-03 19:45:45 +08:00
|
|
|
/**
|
|
|
|
* struct drm_dp_link_caps - DP link capabilities
|
|
|
|
*/
|
|
|
|
struct drm_dp_link_caps {
|
|
|
|
/**
|
|
|
|
* @enhanced_framing:
|
|
|
|
*
|
|
|
|
* enhanced framing capability (mandatory as of DP 1.2)
|
|
|
|
*/
|
|
|
|
bool enhanced_framing;
|
2015-12-03 20:07:43 +08:00
|
|
|
|
2015-07-08 02:52:07 +08:00
|
|
|
/**
|
|
|
|
* tps3_supported:
|
|
|
|
*
|
|
|
|
* training pattern sequence 3 supported for equalization
|
|
|
|
*/
|
|
|
|
bool tps3_supported;
|
|
|
|
|
2015-12-03 20:07:43 +08:00
|
|
|
/**
|
|
|
|
* @fast_training:
|
|
|
|
*
|
|
|
|
* AUX CH handshake not required for link training
|
|
|
|
*/
|
|
|
|
bool fast_training;
|
2018-02-05 21:07:57 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @channel_coding:
|
|
|
|
*
|
|
|
|
* ANSI 8B/10B channel coding capability
|
|
|
|
*/
|
|
|
|
bool channel_coding;
|
2015-12-03 19:45:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
void drm_dp_link_caps_copy(struct drm_dp_link_caps *dest,
|
|
|
|
const struct drm_dp_link_caps *src);
|
2019-10-21 22:34:37 +08:00
|
|
|
|
2018-02-05 21:31:27 +08:00
|
|
|
/**
|
2015-07-21 22:33:48 +08:00
|
|
|
* struct drm_dp_link - DP link capabilities and configuration
|
2018-02-05 21:31:27 +08:00
|
|
|
* @revision: DP specification revision supported on the link
|
2015-07-21 22:33:48 +08:00
|
|
|
* @max_rate: maximum clock rate supported on the link
|
|
|
|
* @max_lanes: maximum number of lanes supported on the link
|
2015-12-03 19:45:45 +08:00
|
|
|
* @caps: capabilities supported on the link (see &drm_dp_link_caps)
|
2015-07-21 22:33:48 +08:00
|
|
|
* @rate: currently configured link rate
|
|
|
|
* @lanes: currently configured number of lanes
|
2018-02-05 21:31:27 +08:00
|
|
|
*/
|
2019-10-21 22:34:37 +08:00
|
|
|
struct drm_dp_link {
|
|
|
|
unsigned char revision;
|
2015-07-21 22:33:48 +08:00
|
|
|
unsigned int max_rate;
|
|
|
|
unsigned int max_lanes;
|
2015-12-03 19:45:45 +08:00
|
|
|
|
|
|
|
struct drm_dp_link_caps caps;
|
2015-07-21 22:33:48 +08:00
|
|
|
|
|
|
|
unsigned int rate;
|
|
|
|
unsigned int lanes;
|
2019-10-21 22:34:37 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link);
|
|
|
|
int drm_dp_link_power_up(struct drm_dp_aux *aux, struct drm_dp_link *link);
|
|
|
|
int drm_dp_link_power_down(struct drm_dp_aux *aux, struct drm_dp_link *link);
|
|
|
|
int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link);
|
|
|
|
|
|
|
|
#endif
|