mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 15:34:48 +08:00
drm/exynos: gsc: Handles the combination of rotation and flip
The unique results of all the combination of rotation and flip can be represented by just 8 states. This patch handles all the combination correctly. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
parent
7b5102da0a
commit
5149705dac
@ -582,9 +582,17 @@ static int gsc_src_set_transf(struct device *dev,
|
||||
break;
|
||||
case EXYNOS_DRM_DEGREE_180:
|
||||
cfg |= GSC_IN_ROT_180;
|
||||
if (flip & EXYNOS_DRM_FLIP_VERTICAL)
|
||||
cfg &= ~GSC_IN_ROT_XFLIP;
|
||||
if (flip & EXYNOS_DRM_FLIP_HORIZONTAL)
|
||||
cfg &= ~GSC_IN_ROT_YFLIP;
|
||||
break;
|
||||
case EXYNOS_DRM_DEGREE_270:
|
||||
cfg |= GSC_IN_ROT_270;
|
||||
if (flip & EXYNOS_DRM_FLIP_VERTICAL)
|
||||
cfg &= ~GSC_IN_ROT_XFLIP;
|
||||
if (flip & EXYNOS_DRM_FLIP_HORIZONTAL)
|
||||
cfg &= ~GSC_IN_ROT_YFLIP;
|
||||
break;
|
||||
default:
|
||||
dev_err(ippdrv->dev, "inavlid degree value %d.\n", degree);
|
||||
@ -845,9 +853,17 @@ static int gsc_dst_set_transf(struct device *dev,
|
||||
break;
|
||||
case EXYNOS_DRM_DEGREE_180:
|
||||
cfg |= GSC_IN_ROT_180;
|
||||
if (flip & EXYNOS_DRM_FLIP_VERTICAL)
|
||||
cfg &= ~GSC_IN_ROT_XFLIP;
|
||||
if (flip & EXYNOS_DRM_FLIP_HORIZONTAL)
|
||||
cfg &= ~GSC_IN_ROT_YFLIP;
|
||||
break;
|
||||
case EXYNOS_DRM_DEGREE_270:
|
||||
cfg |= GSC_IN_ROT_270;
|
||||
if (flip & EXYNOS_DRM_FLIP_VERTICAL)
|
||||
cfg &= ~GSC_IN_ROT_XFLIP;
|
||||
if (flip & EXYNOS_DRM_FLIP_HORIZONTAL)
|
||||
cfg &= ~GSC_IN_ROT_YFLIP;
|
||||
break;
|
||||
default:
|
||||
dev_err(ippdrv->dev, "inavlid degree value %d.\n", degree);
|
||||
|
Loading…
Reference in New Issue
Block a user