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

Commit bc366290 authored by Prabhanjan Kandula's avatar Prabhanjan Kandula Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: back off plane state changes in continuous splash



In current SDE driver, during continuous splash, drm plane state is
updated with crtc object of the corresponding display. Such changes
to drm plane state with in the driver is causing commit failures in
legacy commit path and pm resume case. This change avoids modifying
drm plane state directly in SDE driver.

Change-Id: I8b61d0e754b7eadd1b6371e1d73fb9fe2219a8d1
Signed-off-by: default avatarPrabhanjan Kandula <pkandula@codeaurora.org>
Signed-off-by: default avatarNilaan Gunabalachandran <ngunabal@codeaurora.org>
parent 24529801
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -5744,7 +5744,6 @@ struct drm_crtc *sde_crtc_init(struct drm_device *dev, struct drm_plane *plane)
				NULL);

	drm_crtc_helper_add(crtc, &sde_crtc_helper_funcs);
	plane->crtc = crtc;

	/* save user friendly CRTC name for later */
	snprintf(sde_crtc->name, SDE_CRTC_NAME_SIZE, "crtc%u", crtc->base.id);
+0 −31
Original line number Diff line number Diff line
@@ -1029,9 +1029,6 @@ static void _sde_kms_release_splash_resource(struct sde_kms *sde_kms,
{
	struct msm_drm_private *priv;
	struct sde_splash_display *splash_display;
	struct drm_plane *plane;
	enum sde_sspp plane_id;
	bool is_virtual;
	int i;

	if (!sde_kms || !crtc)
@@ -1054,29 +1051,6 @@ static void _sde_kms_release_splash_resource(struct sde_kms *sde_kms,
	if (i >= MAX_DSI_DISPLAYS)
		return;

	/*
	 * For planes attached in continuous splash, reset the plane state
	 * only if first commit is not using the plane for display.
	 * Valid fb indicates client is using the plane.
	 */
	for (i = 0; i < splash_display->pipe_cnt; i++) {
		drm_for_each_plane(plane, sde_kms->dev) {
			plane_id = sde_plane_pipe(plane);
			is_virtual = is_sde_plane_virtual(plane);

			if ((plane_id != splash_display->pipes[i].sspp) ||
				(splash_display->pipes[i].is_virtual !=
					 is_virtual) || (plane->state->fb))
				continue;

			plane->crtc = NULL;
			plane->state->crtc = NULL;
			SDE_DEBUG("reset crtc plane:%d rect:%d\n",
					plane_id, is_virtual);
			break;
		}
	}

	_sde_kms_splash_mem_put(sde_kms, splash_display->splash);

	if (splash_display->cont_splash_enabled) {
@@ -1958,9 +1932,6 @@ static void _sde_kms_plane_force_remove(struct drm_plane *plane,
	struct drm_plane_state *plane_state;
	int ret = 0;

	if (!plane->crtc)
		return;

	plane_state = drm_atomic_get_plane_state(state, plane);
	if (IS_ERR(plane_state)) {
		ret = PTR_ERR(plane_state);
@@ -2441,8 +2412,6 @@ static int _sde_kms_update_planes_for_cont_splash(struct sde_kms *sde_kms,
						plane_id, crtc->base.id);
			}

			plane->crtc = crtc;
			plane->state->crtc = crtc;
			SDE_DEBUG("set crtc:%d for plane:%d rect:%d\n",
					crtc->base.id, plane_id, is_virtual);
		}