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

Commit 036a2d15 authored by Steve Cohen's avatar Steve Cohen Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: clear exclusion rect settings on lastclose



Clear the exclusion rect settings when the default value (NULL)
is passed in as the property value instead of a valid user
pointer.  This occurs when the last DRM client closes the driver.
Doing this ensures that any prior exclusion rect settings do not
get re-applied the next time the driver is opened.

Change-Id: Iefc994299eff526ead767e86b6794b761a2f336f
Signed-off-by: default avatarSteve Cohen <cohens@codeaurora.org>
parent 8986b711
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -4621,13 +4621,14 @@ static void _sde_plane_set_excl_rect_v1(struct sde_plane *psde,
{
	struct drm_clip_rect excl_rect_v1;

	if (!psde) {
		SDE_ERROR("invalid plane\n");
	if (!psde || !pstate) {
		SDE_ERROR("invalid argument(s)\n");
		return;
	}

	if (!usr_ptr) {
		SDE_DEBUG_PLANE(psde, "invalid  excl_rect user data\n");
		memset(&pstate->excl_rect, 0, sizeof(pstate->excl_rect));
		SDE_DEBUG_PLANE(psde, "excl_rect data cleared\n");
		return;
	}