if (link->panel_cntl)
link->panel_cntl->funcs->destroy(&link->panel_cntl);
- if (link->link_enc)
+ if (link->link_enc) {
+ /* Update link encoder tracking variables. These are used for the dynamic
+ * assignment of link encoders to streams.
+ */
+ link->dc->res_pool->link_encoders[link->link_enc->preferred_engine] = NULL;
+ link->dc->res_pool->dig_link_enc_count--;
link->link_enc->funcs->destroy(&link->link_enc);
+ }
if (link->local_sink)
dc_sink_release(link->local_sink);
DC_LOG_DC("BIOS object table - DP_IS_USB_C: %d", link->link_enc->features.flags.bits.DP_IS_USB_C);
+ /* Update link encoder tracking variables. These are used for the dynamic
+ * assignment of link encoders to streams.
+ */
+ link->dc->res_pool->link_encoders[link->link_enc->preferred_engine] = link->link_enc;
+ link->dc->res_pool->dig_link_enc_count++;
+
link->link_enc_hw_inst = link->link_enc->transmitter;
for (i = 0; i < 4; i++) {
bool lttpr_non_transparent_mode;
bool is_internal_display;
+ /* TODO: Rename. Flag an endpoint as having a programmable mapping to a
+ * DIG encoder. */
+ bool is_dig_mapping_flexible;
+
bool edp_sink_present;
/* caps is the same as reported_link_cap. link_traing use
const struct panel_cntl_init_data *panel_cntl_init_data);
struct link_encoder *(*link_enc_create)(
const struct encoder_init_data *init);
+ /* Create a minimal link encoder object with no dc_link object
+ * associated with it. */
+ struct link_encoder *(*link_enc_create_minimal)(struct dc_context *ctx, enum engine_id eng_id);
+
bool (*validate_bandwidth)(
struct dc *dc,
struct dc_state *context,
unsigned int underlay_pipe_index;
unsigned int stream_enc_count;
+ /* An array for accessing the link encoder objects that have been created.
+ * Index in array corresponds to engine ID - viz. 0: ENGINE_ID_DIGA
+ */
+ struct link_encoder *link_encoders[MAX_DIG_LINK_ENCODERS];
+ /* Number of DIG link encoder objects created - i.e. number of valid
+ * entries in link_encoders array.
+ */
+ unsigned int dig_link_enc_count;
+
#if defined(CONFIG_DRM_AMD_DC_DCN)
struct dc_3dlut *mpc_lut[MAX_PIPES];
struct dc_transfer_func *mpc_shaper[MAX_PIPES];