drm/exynos: gsc: fix wrong bitwise operation for swap detection 47/42547/4
authorHyungwon Hwang <human.hwang@samsung.com>
Mon, 29 Jun 2015 11:42:17 +0000 (20:42 +0900)
committerhyungwon hwang <human.hwang@samsung.com>
Tue, 30 Jun 2015 06:18:13 +0000 (23:18 -0700)
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.

Change-Id: I69a98c170b4d31ee68dfd816dfecfd6045d84a44
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_gsc.c

index e08bc5741ff1b7a61b484b54f134bbaada0a23fa..ed6357022ad13218b10637dde22d54d1133b8e4a 100644 (file)
@@ -693,8 +693,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;
@@ -967,8 +966,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;