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

Commit 5792eb97 authored by Yashwanth's avatar Yashwanth Committed by santosh
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 45e57a9f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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)) {