]> asedeno.scripts.mit.edu Git - linux.git/blob - drivers/gpu/drm/tegra/dp.h
drm/tegra: dp: Read alternate scrambler reset capability from sink
[linux.git] / drivers / gpu / drm / tegra / dp.h
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          * tps3_supported:
27          *
28          * training pattern sequence 3 supported for equalization
29          */
30         bool tps3_supported;
31
32         /**
33          * @fast_training:
34          *
35          * AUX CH handshake not required for link training
36          */
37         bool fast_training;
38
39         /**
40          * @channel_coding:
41          *
42          * ANSI 8B/10B channel coding capability
43          */
44         bool channel_coding;
45
46         /**
47          * @alternate_scrambler_reset:
48          *
49          * eDP alternate scrambler reset capability
50          */
51         bool alternate_scrambler_reset;
52 };
53
54 void drm_dp_link_caps_copy(struct drm_dp_link_caps *dest,
55                            const struct drm_dp_link_caps *src);
56
57 /**
58  * struct drm_dp_link - DP link capabilities and configuration
59  * @revision: DP specification revision supported on the link
60  * @max_rate: maximum clock rate supported on the link
61  * @max_lanes: maximum number of lanes supported on the link
62  * @caps: capabilities supported on the link (see &drm_dp_link_caps)
63  * @rate: currently configured link rate
64  * @lanes: currently configured number of lanes
65  */
66 struct drm_dp_link {
67         unsigned char revision;
68         unsigned int max_rate;
69         unsigned int max_lanes;
70
71         struct drm_dp_link_caps caps;
72
73         unsigned int rate;
74         unsigned int lanes;
75 };
76
77 int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link);
78 int drm_dp_link_power_up(struct drm_dp_aux *aux, struct drm_dp_link *link);
79 int drm_dp_link_power_down(struct drm_dp_aux *aux, struct drm_dp_link *link);
80 int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link);
81
82 #endif