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