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

Commit 120b1647 authored by Alan Kwong's avatar Alan Kwong
Browse files

drm/msm/sde: update inline rotator to use ccw rotation



DRM rotation property specifies rotation in counter
clockwise direction whereas rotator driver uses clockwise
direction as in hardware. Update inline rotator driver
to convert DRM CCW direction to rotator driver CW direction.

CRs-Fixed: 2041083
Change-Id: Ie5f7d81d0c05da7fe3e26d4f530e43f88447053b
Signed-off-by: default avatarAlan Kwong <akwong@codeaurora.org>
parent c6d522c5
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -574,9 +574,16 @@ static int sde_hw_rot_commit(struct sde_hw_rot *hw, struct sde_hw_rot_cmd *data,

	rot_cmd.video_mode = data->video_mode;
	rot_cmd.fps = data->fps;

	/*
	 * DRM rotation property is specified in counter clockwise direction
	 * whereas rotator h/w rotates in clockwise direction.
	 * Convert rotation property to clockwise 90 by toggling h/v flip
	 */
	rot_cmd.rot90 = data->rot90;
	rot_cmd.hflip = data->hflip;
	rot_cmd.vflip = data->vflip;
	rot_cmd.hflip = data->rot90 ? !data->hflip : data->hflip;
	rot_cmd.vflip = data->rot90 ? !data->vflip : data->vflip;

	rot_cmd.secure = data->secure;
	rot_cmd.clkrate = data->clkrate;
	rot_cmd.data_bw = 0;