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

Commit b5b218c7 authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

drm/msm/sde: update plane scaler configs when disabled



Update the plane state and eventually the pipe hw configs
when user-mode disables the scaler through setproperty.

Change-Id: I87ff3ecebd2e402b7046726fb4c7a392e6350f13
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent e60d32ea
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -4590,7 +4590,8 @@ static inline void _sde_plane_set_scaler_v2(struct sde_plane *psde,
	pstate->scaler_check_state = SDE_PLANE_SCLCHECK_NONE;
	if (!usr) {
		SDE_DEBUG_PLANE(psde, "scale data removed\n");
		return;
		cfg->enable = 0;
		goto end;
	}

	if (copy_from_user(&scale_v2, usr, sizeof(scale_v2))) {
@@ -4601,13 +4602,10 @@ static inline void _sde_plane_set_scaler_v2(struct sde_plane *psde,
	/* detach/ignore user data if 'disabled' */
	if (!scale_v2.enable) {
		SDE_DEBUG_PLANE(psde, "scale data removed\n");
		return;
		cfg->enable = 0;
		goto end;
	}

	/* force property to be dirty, even if the pointer didn't change */
	msm_property_set_dirty(&psde->property_info,
			&pstate->property_state, PLANE_PROP_SCALER_V2);

	/* populate from user space */
	sde_set_scaler_v2(cfg, &scale_v2);

@@ -4629,6 +4627,11 @@ static inline void _sde_plane_set_scaler_v2(struct sde_plane *psde,
	}
	pstate->scaler_check_state = SDE_PLANE_SCLCHECK_SCALER_V2_CHECK;

end:
	/* force property to be dirty, even if the pointer didn't change */
	msm_property_set_dirty(&psde->property_info,
			&pstate->property_state, PLANE_PROP_SCALER_V2);

	SDE_EVT32_VERBOSE(DRMID(&psde->base), cfg->enable, cfg->de.enable,
			cfg->src_width[0], cfg->src_height[0],
			cfg->dst_width, cfg->dst_height);