Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18c403be authored by Yashwanth's avatar Yashwanth
Browse files

disp: msm: sde: add check for max encoder limit during allocation



This change checks max limit while allocating encoders
during display init.

Change-Id: I48736667c2b83f916f09f9e81cb1b24a9fef215a
Signed-off-by: default avatarYashwanth <yvulapu@codeaurora.org>
parent d92ce846
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1621,7 +1621,8 @@ 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;
		sde_kms->dp_stream_count = dp_display_get_num_of_streams();
		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)) {