diff mbox

[v2,3/8] drm/exynos: fixed vflip, hflip case at the same time.

Message ID 1356063648-12447-4-git-send-email-chulspro.kim@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eunchul Kim Dec. 21, 2012, 4:20 a.m. UTC
Changelog v2:
This patch added EXYNOS_DRM_FLIP_BOTH enum value for warnning.

Changelog v1:
This patch fixed vflip, hflip at the same time. If we want to change 180 degree about buffer,
then we can use h,vflip or 180 degree. we supports 180 degree using h,vflip.
but we make error handling in this case. so, fixed it.

Signed-off-by: Eunchul Kim <chulspro.kim@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c    |    1 +
 drivers/gpu/drm/exynos/exynos_drm_gsc.c     |    2 +-
 drivers/gpu/drm/exynos/exynos_drm_rotator.c |    1 +
 include/uapi/drm/exynos_drm.h               |    2 ++
 4 files changed, 5 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index 5dc0251..abfff9e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -1387,6 +1387,7 @@  static inline bool fimc_check_drm_flip(enum drm_exynos_flip flip)
 	case EXYNOS_DRM_FLIP_NONE:
 	case EXYNOS_DRM_FLIP_VERTICAL:
 	case EXYNOS_DRM_FLIP_HORIZONTAL:
+	case EXYNOS_DRM_FLIP_BOTH:
 		return true;
 	default:
 		DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index ba5fefd..3e5b456 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -1391,7 +1391,7 @@  static inline bool gsc_check_drm_flip(enum drm_exynos_flip flip)
 	case EXYNOS_DRM_FLIP_NONE:
 	case EXYNOS_DRM_FLIP_VERTICAL:
 	case EXYNOS_DRM_FLIP_HORIZONTAL:
-	case EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL:
+	case EXYNOS_DRM_FLIP_BOTH:
 		return true;
 	default:
 		DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index 17e4474..8bf9c50 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -513,6 +513,7 @@  static inline bool rotator_check_drm_flip(enum drm_exynos_flip flip)
 	case EXYNOS_DRM_FLIP_NONE:
 	case EXYNOS_DRM_FLIP_VERTICAL:
 	case EXYNOS_DRM_FLIP_HORIZONTAL:
+	case EXYNOS_DRM_FLIP_BOTH:
 		return true;
 	default:
 		DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
diff --git a/include/uapi/drm/exynos_drm.h b/include/uapi/drm/exynos_drm.h
index e7f52c3..7ed11b2 100644
--- a/include/uapi/drm/exynos_drm.h
+++ b/include/uapi/drm/exynos_drm.h
@@ -185,6 +185,8 @@  enum drm_exynos_flip {
 	EXYNOS_DRM_FLIP_NONE = (0 << 0),
 	EXYNOS_DRM_FLIP_VERTICAL = (1 << 0),
 	EXYNOS_DRM_FLIP_HORIZONTAL = (1 << 1),
+	EXYNOS_DRM_FLIP_BOTH = EXYNOS_DRM_FLIP_VERTICAL |
+			EXYNOS_DRM_FLIP_HORIZONTAL,
 };
 
 enum drm_exynos_degree {