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

Commit 709150cb authored by Alan Kwong's avatar Alan Kwong
Browse files

drm/msm/sde: add support for ROTATE_0 to plane



Plane rotate angle of zero can be specified with 0
or ROTATE_0 in plane rotation property. 0 is already
supported by plane driver. Add support for ROTATE_0
to plane driver. Without this support, ROTATE_0 will
generate incorrectly flipped image.

CRs-Fixed: 2009714
Change-Id: Ic6c6a0a2a24bb7c544c191c26dace788d30cc69d
Signed-off-by: default avatarAlan Kwong <akwong@codeaurora.org>
parent 1a915805
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1920,7 +1920,8 @@ static int sde_plane_rot_atomic_check(struct drm_plane *plane,

	rstate->in_rotation = drm_rotation_simplify(
			sde_plane_get_property(pstate, PLANE_PROP_ROTATION),
			DRM_ROTATE_90 | DRM_REFLECT_X | DRM_REFLECT_Y);
			DRM_ROTATE_0 | DRM_ROTATE_90 |
			DRM_REFLECT_X | DRM_REFLECT_Y);
	rstate->rot90 = rstate->in_rotation & DRM_ROTATE_90 ? true : false;
	rstate->hflip = rstate->in_rotation & DRM_REFLECT_X ? true : false;
	rstate->vflip = rstate->in_rotation & DRM_REFLECT_Y ? true : false;
@@ -2164,7 +2165,8 @@ static void sde_plane_rot_install_properties(struct drm_plane *plane,
	struct sde_mdss_cfg *catalog)
{
	struct sde_plane *psde = to_sde_plane(plane);
	unsigned long supported_rotations = DRM_REFLECT_X | DRM_REFLECT_Y;
	unsigned long supported_rotations = DRM_ROTATE_0 | DRM_REFLECT_X |
			DRM_REFLECT_Y;

	if (!plane || !psde) {
		SDE_ERROR("invalid plane\n");