This source file includes following definitions.
- virtual_link_encoder_validate_output_with_stream
- virtual_link_encoder_hw_init
- virtual_link_encoder_setup
- virtual_link_encoder_enable_tmds_output
- virtual_link_encoder_enable_dp_output
- virtual_link_encoder_enable_dp_mst_output
- virtual_link_encoder_disable_output
- virtual_link_encoder_dp_set_lane_settings
- virtual_link_encoder_dp_set_phy_pattern
- virtual_link_encoder_update_mst_stream_allocation_table
- virtual_link_encoder_connect_dig_be_to_fe
- virtual_link_encoder_destroy
- virtual_link_encoder_construct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 #include <linux/slab.h>
27
28 #include "dm_services.h"
29 #include "dm_services_types.h"
30
31 #include "virtual_link_encoder.h"
32
33 static bool virtual_link_encoder_validate_output_with_stream(
34 struct link_encoder *enc,
35 const struct dc_stream_state *stream) { return true; }
36
37 static void virtual_link_encoder_hw_init(struct link_encoder *enc) {}
38
39 static void virtual_link_encoder_setup(
40 struct link_encoder *enc,
41 enum signal_type signal) {}
42
43 static void virtual_link_encoder_enable_tmds_output(
44 struct link_encoder *enc,
45 enum clock_source_id clock_source,
46 enum dc_color_depth color_depth,
47 enum signal_type signal,
48 uint32_t pixel_clock) {}
49
50 static void virtual_link_encoder_enable_dp_output(
51 struct link_encoder *enc,
52 const struct dc_link_settings *link_settings,
53 enum clock_source_id clock_source) {}
54
55 static void virtual_link_encoder_enable_dp_mst_output(
56 struct link_encoder *enc,
57 const struct dc_link_settings *link_settings,
58 enum clock_source_id clock_source) {}
59
60 static void virtual_link_encoder_disable_output(
61 struct link_encoder *link_enc,
62 enum signal_type signal) {}
63
64 static void virtual_link_encoder_dp_set_lane_settings(
65 struct link_encoder *enc,
66 const struct link_training_settings *link_settings) {}
67
68 static void virtual_link_encoder_dp_set_phy_pattern(
69 struct link_encoder *enc,
70 const struct encoder_set_dp_phy_pattern_param *param) {}
71
72 static void virtual_link_encoder_update_mst_stream_allocation_table(
73 struct link_encoder *enc,
74 const struct link_mst_stream_allocation_table *table) {}
75
76 static void virtual_link_encoder_connect_dig_be_to_fe(
77 struct link_encoder *enc,
78 enum engine_id engine,
79 bool connect) {}
80
81 static void virtual_link_encoder_destroy(struct link_encoder **enc)
82 {
83 kfree(*enc);
84 *enc = NULL;
85 }
86
87
88 static const struct link_encoder_funcs virtual_lnk_enc_funcs = {
89 .validate_output_with_stream =
90 virtual_link_encoder_validate_output_with_stream,
91 .hw_init = virtual_link_encoder_hw_init,
92 .setup = virtual_link_encoder_setup,
93 .enable_tmds_output = virtual_link_encoder_enable_tmds_output,
94 .enable_dp_output = virtual_link_encoder_enable_dp_output,
95 .enable_dp_mst_output = virtual_link_encoder_enable_dp_mst_output,
96 .disable_output = virtual_link_encoder_disable_output,
97 .dp_set_lane_settings = virtual_link_encoder_dp_set_lane_settings,
98 .dp_set_phy_pattern = virtual_link_encoder_dp_set_phy_pattern,
99 .update_mst_stream_allocation_table =
100 virtual_link_encoder_update_mst_stream_allocation_table,
101 .connect_dig_be_to_fe = virtual_link_encoder_connect_dig_be_to_fe,
102 .destroy = virtual_link_encoder_destroy
103 };
104
105 bool virtual_link_encoder_construct(
106 struct link_encoder *enc, const struct encoder_init_data *init_data)
107 {
108 enc->funcs = &virtual_lnk_enc_funcs;
109 enc->ctx = init_data->ctx;
110 enc->id = init_data->encoder;
111
112 enc->hpd_source = init_data->hpd_source;
113 enc->connector = init_data->connector;
114
115 enc->transmitter = init_data->transmitter;
116
117 enc->output_signals = SIGNAL_TYPE_VIRTUAL;
118
119 enc->preferred_engine = ENGINE_ID_VIRTUAL;
120
121 return true;
122 }
123
124