Skip to content

Commit

Permalink
drm/exynos: gsc: fix wrong bitwise operation for swap detection
Browse files Browse the repository at this point in the history
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: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Hyungwon Hwang authored and Inki Dae committed Aug 11, 2015
1 parent bdce3e7 commit f2d0160
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/exynos/exynos_drm_gsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f2d0160

Please sign in to comment.