xref: /linux/drivers/gpu/drm/tegra/dp.h (revision 27ba465ce3397c4705f87c1f73e6d67c1b48ef0f)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright (C) 2013-2019 NVIDIA Corporation.
4  * Copyright (C) 2015 Rob Clark
5  */
6 
7 #ifndef DRM_TEGRA_DP_H
8 #define DRM_TEGRA_DP_H 1
9 
10 #include <linux/types.h>
11 
12 struct drm_dp_aux;
13 
14 /**
15  * struct drm_dp_link_caps - DP link capabilities
16  */
17 struct drm_dp_link_caps {
18 	/**
19 	 * @enhanced_framing:
20 	 *
21 	 * enhanced framing capability (mandatory as of DP 1.2)
22 	 */
23 	bool enhanced_framing;
24 };
25 
26 void drm_dp_link_caps_copy(struct drm_dp_link_caps *dest,
27 			   const struct drm_dp_link_caps *src);
28 
29 /**
30  * struct drm_dp_link - DP link capabilities and configuration
31  * @revision: DP specification revision supported on the link
32  * @max_rate: maximum clock rate supported on the link
33  * @max_lanes: maximum number of lanes supported on the link
34  * @caps: capabilities supported on the link (see &drm_dp_link_caps)
35  * @rate: currently configured link rate
36  * @lanes: currently configured number of lanes
37  */
38 struct drm_dp_link {
39 	unsigned char revision;
40 	unsigned int max_rate;
41 	unsigned int max_lanes;
42 
43 	struct drm_dp_link_caps caps;
44 
45 	unsigned int rate;
46 	unsigned int lanes;
47 };
48 
49 int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link);
50 int drm_dp_link_power_up(struct drm_dp_aux *aux, struct drm_dp_link *link);
51 int drm_dp_link_power_down(struct drm_dp_aux *aux, struct drm_dp_link *link);
52 int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link);
53 
54 #endif
55