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

Commit 82feaaa3 authored by Kalyan Thota's avatar Kalyan Thota Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: ensure proper cleanup of WB pipeline during disable



Ensure to follow proper cleanup sequence of WB interface even when
some hw blocks are not available for low end targets.

Change-Id: Ia8c0eb033b06d0e522f94971adce7aefaf6b2a7f
Signed-off-by: default avatarKalyan Thota <kalyant@codeaurora.org>
Signed-off-by: default avatarAbhijith Desai <desaia@codeaurora.org>
parent c427d0f5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3232,11 +3232,11 @@ void sde_encoder_helper_phys_disable(struct sde_encoder_phys *phys_enc,
	sde_enc = to_sde_encoder_virt(phys_enc->parent);

	if (phys_enc == sde_enc->cur_master && phys_enc->hw_pp &&
			phys_enc->hw_pp->merge_3d &&
			phys_enc->hw_ctl->ops.reset_post_disable)
		phys_enc->hw_ctl->ops.reset_post_disable(
				phys_enc->hw_ctl, &phys_enc->intf_cfg_v1,
				phys_enc->hw_pp->merge_3d->idx);
				phys_enc->hw_pp->merge_3d ?
				phys_enc->hw_pp->merge_3d->idx : 0);

	phys_enc->hw_ctl->ops.trigger_flush(phys_enc->hw_ctl);
	phys_enc->hw_ctl->ops.trigger_start(phys_enc->hw_ctl);
+8 −6
Original line number Diff line number Diff line
@@ -1054,17 +1054,19 @@ static int sde_hw_ctl_reset_post_disable(struct sde_hw_ctl *ctx,
		}
	}

	if (merge_3d_idx) {
		/* disable and flush merge3d_blk */
		merge_3d_flush = BIT(merge_3d_idx - MERGE_3D_0);
		merge_3d_active &= ~BIT(merge_3d_idx - MERGE_3D_0);

		ctx->flush.pending_merge_3d_flush_mask = merge_3d_flush;
		SDE_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, merge_3d_active);
	}
	sde_hw_ctl_clear_all_blendstages(ctx);

	ctx->flush.pending_merge_3d_flush_mask = merge_3d_flush;
	ctx->flush.pending_intf_flush_mask = intf_flush;
	ctx->flush.pending_wb_flush_mask = wb_flush;

	SDE_REG_WRITE(c, CTL_MERGE_3D_ACTIVE, merge_3d_active);

	SDE_REG_WRITE(c, CTL_INTF_ACTIVE, intf_active);
	SDE_REG_WRITE(c, CTL_WB_ACTIVE, wb_active);