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

Commit 3b1e2c6a authored by Clarence Ip's avatar Clarence Ip
Browse files

drm/msm/sde: don't dirty scaler properties if null



Avoid always flagging scaler configuration properties if
the user space keeps setting it to a null value. These
properties are meant to support incoming user pointers
rather than traditional drm blob properties, so avoid
recalculating the plane programming if they are set to
a null value more than once.

CRs-Fixed: 2062083
Change-Id: I88b7a3065670e7fa8827c91dbe856b428127de1b
Signed-off-by: default avatarClarence Ip <cip@codeaurora.org>
parent 96b5b27b
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -2861,7 +2861,7 @@ static int _sde_plane_validate_scaler_v2(struct sde_plane *psde,
					"req %d/%d, fetch %d/%d, src %dx%d\n",
					hor_req_pixels, vert_req_pixels,
					hor_fetch_pixels, vert_fetch_pixels,
					src_w, src_h);
					img_w, img_h);
			return -EINVAL;
		}

@@ -3566,7 +3566,7 @@ static void _sde_plane_install_properties(struct drm_plane *plane,
		}

		if (psde->features & BIT(SDE_SSPP_SCALER_QSEED3)) {
			msm_property_install_volatile_range(
			msm_property_install_range(
					&psde->property_info, "scaler_v2",
					0x0, 0, ~0, 0, PLANE_PROP_SCALER_V2);
			msm_property_install_blob(&psde->property_info,
@@ -3578,7 +3578,7 @@ static void _sde_plane_install_properties(struct drm_plane *plane,
					"lut_sep", 0,
					PLANE_PROP_SCALER_LUT_SEP);
		} else if (psde->features & SDE_SSPP_SCALER) {
			msm_property_install_volatile_range(
			msm_property_install_range(
					&psde->property_info, "scaler_v1", 0x0,
					0, ~0, 0, PLANE_PROP_SCALER_V1);
		}
@@ -3783,6 +3783,9 @@ static inline void _sde_plane_set_scaler_v1(struct sde_plane *psde, void *usr)
		return;
	}

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

	/* populate from user space */
	pe = &(psde->pixel_ext);
	memset(pe, 0, sizeof(struct sde_hw_pixel_ext));
@@ -3846,6 +3849,9 @@ static inline void _sde_plane_set_scaler_v2(struct sde_plane *psde,
		return;
	}

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

	/* populate from user space */
	pe = &(psde->pixel_ext);
	memset(pe, 0, sizeof(struct sde_hw_pixel_ext));