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

Commit c72985b2 authored by Tatenda Chipeperekwa's avatar Tatenda Chipeperekwa
Browse files

drm/msm/sde: override kms post open function



Override the kms post open function to add a function call
that triggers an event notification if any of the connector's
state has changed before the client is ready. This allows
the client to appropriately handle the state change once it is
ready.

CRs-Fixed: 2079185
Change-Id: Idc84be9d335d70605ecabb2233de14654623dea3
Signed-off-by: default avatarTatenda Chipeperekwa <tatendac@codeaurora.org>
parent 8e0e97e8
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -1561,6 +1561,28 @@ _sde_kms_get_address_space(struct msm_kms *kms,
		sde_kms->aspace[domain] : NULL;
}

static void _sde_kms_post_open(struct msm_kms *kms, struct drm_file *file)
{
	struct drm_device *dev = NULL;
	struct sde_kms *sde_kms = NULL;

	if (!kms) {
		SDE_ERROR("invalid kms\n");
		return;
	}

	sde_kms = to_sde_kms(kms);
	dev = sde_kms->dev;

	if (!dev) {
		SDE_ERROR("invalid device\n");
		return;
	}

	if (dev->mode_config.funcs->output_poll_changed)
		dev->mode_config.funcs->output_poll_changed(dev);
}

static const struct msm_kms_funcs kms_funcs = {
	.hw_init         = sde_kms_hw_init,
	.postinit        = sde_kms_postinit,
@@ -1584,6 +1606,7 @@ static const struct msm_kms_funcs kms_funcs = {
	.destroy         = sde_kms_destroy,
	.register_events = _sde_kms_register_events,
	.get_address_space = _sde_kms_get_address_space,
	.postopen = _sde_kms_post_open,
};

/* the caller api needs to turn on clock before calling it */