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

Unverified Commit b0ccde81 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'LA.UM.9.14.r1-23100-LAHAINA.QSSI14.0' of...

Merge tag 'LA.UM.9.14.r1-23100-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers into android13-5.4-lahaina

"LA.UM.9.14.r1-23100-LAHAINA.QSSI14.0"

* tag 'LA.UM.9.14.r1-23100-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers:
  disp: msm: send power_on event in dual display composer kill scenario

Change-Id: I724d0c184dcb34d831bc6f4b1e9d33ed7a03dbca
parents dd18787f 76c9e527
Loading
Loading
Loading
Loading
+21 −3
Original line number Diff line number Diff line
@@ -1042,8 +1042,19 @@ static void msm_lastclose(struct drm_device *dev)
	 * commit then ignore the last close call
	 */
	if (kms->funcs && kms->funcs->check_for_splash
		&& kms->funcs->check_for_splash(kms, NULL))
		&& kms->funcs->check_for_splash(kms, NULL)) {
		msm_wait_event_timeout(priv->pending_crtcs_event, !priv->pending_crtcs,
			LASTCLOSE_TIMEOUT_MS, rc);
		if (!rc)
			DRM_INFO("wait for crtc mask 0x%x failed, commit anyway...\n",
				priv->pending_crtcs);

		rc = kms->funcs->trigger_null_flush(kms);
		if (rc) {
			DRM_ERROR("null flush commit failure during lastclose\n");
			return;
		}
	}

	/*
	 * clean up vblank disable immediately as this is the last close.
@@ -1543,8 +1554,15 @@ static int msm_release(struct inode *inode, struct file *filp)
	 * refcount > 1. This operation is not triggered from upstream
	 * drm as msm_driver does not support DRIVER_LEGACY feature.
	 */
	if (drm_is_current_master(file_priv))
	if (drm_is_current_master(file_priv)) {
		msm_wait_event_timeout(priv->pending_crtcs_event, !priv->pending_crtcs,
			LASTCLOSE_TIMEOUT_MS, ret);
		if (!ret)
			DRM_INFO("wait for crtc mask 0x%x failed, commit anyway...\n",
				priv->pending_crtcs);

		msm_preclose(dev, file_priv);
	}

	ret = drm_release(inode, filp);
	filp->private_data = NULL;
+2 −0
Original line number Diff line number Diff line
@@ -126,6 +126,8 @@ struct msm_kms_funcs {
			struct drm_atomic_state *state);
	/* check for continuous splash status */
	bool (*check_for_splash)(struct msm_kms *kms, struct drm_crtc *crtc);
	/*trigger null flush if stuck in cont splash*/
	int (*trigger_null_flush)(struct msm_kms *kms);
	/* topology lm information */
	int (*get_mixer_count)(const struct msm_kms *kms,
			const struct drm_display_mode *mode,
+35 −1
Original line number Diff line number Diff line
@@ -2482,6 +2482,7 @@ static int sde_kms_set_crtc_for_conn(struct drm_device *dev,
	}

	crtc_state->active = true;
	crtc_state->enable = true;
	ret = drm_atomic_set_crtc_for_connector(conn_state, enc->crtc);
	if (ret)
		SDE_ERROR("error %d setting the crtc\n", ret);
@@ -3716,7 +3717,7 @@ static int sde_kms_get_dsc_count(const struct msm_kms *kms,
	return 0;
}

static void _sde_kms_null_commit(struct drm_device *dev,
static int _sde_kms_null_commit(struct drm_device *dev,
		struct drm_encoder *enc)
{
	struct drm_modeset_acquire_ctx ctx;
@@ -3759,6 +3760,8 @@ static void _sde_kms_null_commit(struct drm_device *dev,

	drm_modeset_drop_locks(&ctx);
	drm_modeset_acquire_fini(&ctx);

	return ret;
}


@@ -3787,6 +3790,36 @@ void sde_kms_display_early_wakeup(struct drm_device *dev,

	drm_connector_list_iter_end(&conn_iter);
}
static int sde_kms_trigger_null_flush(struct msm_kms *kms)
{
	struct sde_kms *sde_kms;
	struct sde_splash_display *splash_display;
	int i, rc = 0;

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

	sde_kms = to_sde_kms(kms);

	if (!sde_kms->splash_data.num_splash_displays ||
		sde_kms->dsi_display_count == sde_kms->splash_data.num_splash_displays)
		return rc;

	for (i = 0; i < MAX_DSI_DISPLAYS; i++) {
		splash_display = &sde_kms->splash_data.splash_display[i];

		if (splash_display->cont_splash_enabled && splash_display->encoder) {
			SDE_DEBUG("triggering null commit on enc:%d\n",
					DRMID(splash_display->encoder));
			SDE_EVT32(DRMID(splash_display->encoder), SDE_EVTLOG_FUNC_ENTRY);
			rc = _sde_kms_null_commit(sde_kms->dev, splash_display->encoder);
		}
	}

	return rc;
}

#ifdef CONFIG_DEEPSLEEP
static int _sde_kms_pm_deepsleep_helper(struct sde_kms *sde_kms, bool enter)
@@ -4142,6 +4175,7 @@ static const struct msm_kms_funcs kms_funcs = {
	.get_address_space_device = _sde_kms_get_address_space_device,
	.postopen = _sde_kms_post_open,
	.check_for_splash = sde_kms_check_for_splash,
	.trigger_null_flush = sde_kms_trigger_null_flush,
	.get_mixer_count = sde_kms_get_mixer_count,
	.get_dsc_count = sde_kms_get_dsc_count,
};