|
@@ -1489,7 +1489,9 @@ static int _sde_kms_setup_displays(struct drm_device *dev,
|
|
|
|
|
|
/* update display cap to MST_MODE for DP MST encoders */
|
|
|
info.capabilities |= MSM_DISPLAY_CAP_MST_MODE;
|
|
|
- for (idx = 0; idx < sde_kms->dp_stream_count; idx++) {
|
|
|
+
|
|
|
+ for (idx = 0; idx < sde_kms->dp_stream_count &&
|
|
|
+ priv->num_encoders < max_encoders; idx++) {
|
|
|
info.h_tile_instance[0] = idx;
|
|
|
encoder = sde_encoder_init(dev, &info);
|
|
|
if (IS_ERR_OR_NULL(encoder)) {
|