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

Commit c2c84792 authored by Krishna Manikandan's avatar Krishna Manikandan Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: add null check for current master



Add a null check to make sure that the virtual
encoder has a master before restoring the
encoder configs.

Change-Id: Ic7b2e4850e68a4658cdda25459283737189ddc00
Signed-off-by: default avatarKrishna Manikandan <mkrishn@codeaurora.org>
parent 5ffa8544
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3042,6 +3042,12 @@ void sde_encoder_virt_restore(struct drm_encoder *drm_enc)
		return;
	}
	sde_enc = to_sde_encoder_virt(drm_enc);

	if (!sde_enc->cur_master) {
		SDE_ERROR("virt encoder has no master\n");
		return;
	}

	memset(&sde_enc->cur_master->intf_cfg_v1, 0,
			sizeof(sde_enc->cur_master->intf_cfg_v1));
	sde_enc->idle_pc_restore = true;