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

Commit 988a4731 authored by Hyungwon Hwang's avatar Hyungwon Hwang Committed by Inki Dae
Browse files

drm/exynos: gsc: fix wrong bitwise operation for swap detection



The bits for rotation are not used as exclusively. So GSC_IN_ROT_270 can
not be used for swap detection. The definition of it is same with
GSC_IN_ROT_MASK. It is enough to check GSC_IN_ROT_90 bit is set or not to
check whether width / height size swapping is needed.

Signed-off-by: default avatarHyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 8f9cb507
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -593,8 +593,7 @@ static int gsc_src_set_transf(struct device *dev,

	gsc_write(cfg, GSC_IN_CON);

	ctx->rotation = cfg &
		(GSC_IN_ROT_90 | GSC_IN_ROT_270) ? 1 : 0;
	ctx->rotation = (cfg & GSC_IN_ROT_90) ? 1 : 0;
	*swap = ctx->rotation;

	return 0;
@@ -857,8 +856,7 @@ static int gsc_dst_set_transf(struct device *dev,

	gsc_write(cfg, GSC_IN_CON);

	ctx->rotation = cfg &
		(GSC_IN_ROT_90 | GSC_IN_ROT_270) ? 1 : 0;
	ctx->rotation = (cfg & GSC_IN_ROT_90) ? 1 : 0;
	*swap = ctx->rotation;

	return 0;