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

Commit 9a5a471f authored by Kalyan Thota's avatar Kalyan Thota
Browse files

disp: msm: sde: use default scale_cfg during plane error



Commit C1 --> plane A with scalar config, encountered an error
	  --> plane A is marked as solidfill.

Commit C2 --> plane A with scale ROI's but no config as it was
	      provided in the earlier commit.

Fix handles the above scenario via allowing fallback onto
default cfg until the next scalar config is provided by usermode.

Plane error can occur too late in the atomic update, hence
atomic duplicate of scalar_cfg might not help in some cases.

Change-Id: I6a75668c285e1dde532ed03f82ddb9be95117977
Signed-off-by: default avatarKalyan Thota <kalyant@codeaurora.org>
parent 700f3cc7
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
/*
 * Copyright (C) 2014-2019 The Linux Foundation. All rights reserved.
 * Copyright (C) 2014-2020 The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -3261,6 +3261,7 @@ static void sde_plane_atomic_update(struct drm_plane *plane,
{
	struct sde_plane *psde;
	struct drm_plane_state *state;
	struct sde_plane_state *pstate;

	if (!plane) {
		SDE_ERROR("invalid plane\n");
@@ -3271,9 +3272,14 @@ static void sde_plane_atomic_update(struct drm_plane *plane,
	}

	psde = to_sde_plane(plane);
	psde->is_error = false;
	state = plane->state;
	pstate = to_sde_plane_state(state);

	if (psde->is_error && !(msm_property_is_dirty(&psde->property_info,
		&pstate->property_state, PLANE_PROP_SCALER_V2)))
		pstate->scaler_check_state = SDE_PLANE_SCLCHECK_INVALID;

	psde->is_error = false;
	SDE_DEBUG_PLANE(psde, "\n");

	if (!sde_plane_enabled(state)) {