From patchwork Sat Dec 22 08:49:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eunchul Kim X-Patchwork-Id: 1905571 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 31A5EDFB79 for ; Sat, 22 Dec 2012 08:52:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2435CE6099 for ; Sat, 22 Dec 2012 00:52:51 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTP id 29C1AE5C8C for ; Sat, 22 Dec 2012 00:49:39 -0800 (PST) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MFF0003BCINHOB0@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Sat, 22 Dec 2012 17:49:35 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.45]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id D4.5D.12699.F1475D05; Sat, 22 Dec 2012 17:49:35 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-ba-50d5741fde03 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id D3.5D.12699.F1475D05; Sat, 22 Dec 2012 17:49:35 +0900 (KST) Received: from localhost.localdomain ([10.90.54.32]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MFF00JZNCIJQC10@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Sat, 22 Dec 2012 17:49:35 +0900 (KST) From: Eunchul Kim To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v3 3/8] drm/exynos: consider both case of vflip and hflip. Date: Sat, 22 Dec 2012 17:49:24 +0900 Message-id: <1356166169-3400-4-git-send-email-chulspro.kim@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1356166169-3400-1-git-send-email-chulspro.kim@samsung.com> References: <1356166169-3400-1-git-send-email-chulspro.kim@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsVy+t8zXV35kqsBBndfqFtc+fqezYHR4373 caYAxigum5TUnMyy1CJ9uwSujC3f5zIV9IpWNHeeYW9gbBbqYuTkkBAwkWhbfowVwhaTuHBv PVsXIxeHkMAyRonnnzezwBR1dh9lBLGFBKYzSrxtj4YoWsEk8ffTL3aQBJuAjsSRW83MILaI gKXEg62/mUGKmAV+Mkqse3IWbIWwgJfEmctvwYpYBFQlrhxYBTaVV8Bd4ujDV+wQ2xQkWpcd ArM5BTwkOpctZYXY7C7Rv7yZBaJXQOLb5ENANgdQvazEpgPMEK3X2SQOXFWFsCUlDq64wTKB UXgBI8MqRtHUguSC4qT0XCO94sTc4tK8dL3k/NxNjJAglN7BuKrB4hCjAAejEg/vxaYrAUKs iWXFlbmHGCU4mJVEeLcYXA0Q4k1JrKxKLcqPLyrNSS0+xOgDdMhEZinR5HxghOSVxBsaGxgb GloamplamhrgEFYS5232SAkQEkhPLEnNTk0tSC2CGcfEwSnVwDjz9+zebZktrofOML6NyC6y NS5J+r//2vIDxy2a5MwPFm2ss2ET0J4j6Hqrl+f+upPqC987ZJb+Oj3ruoPNcpanOacMV5+/ Geh51uWdpqT7/R9pH3L4XZfwvOYKvBgjmKPWuSK76lzPDGnGPU5x3D+11NLfTV+014FRqPuH xDuX/xfdoyQ+vFFiKc5INNRiLipOBAAvsra5bwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42I5/e+xoK58ydUAgyO7lCyufH3P5sDocb/7 OFMAY1QDo01GamJKapFCal5yfkpmXrqtkndwvHO8qZmBoa6hpYW5kkJeYm6qrZKLT4CuW2YO 0FglhbLEnFKgUEBicbGSvh2mCaEhbroWMI0Rur4hQXA9RgZoIGEdY8aW73OZCnpFK5o7z7A3 MDYLdTFyckgImEh0dh9lhLDFJC7cW88GYgsJTGeUeNse3cXIBWSvYJL4++kXO0iCTUBH4sit ZmYQW0TAUuLB1t/MIEXMAj8ZJdY9OcsKkhAW8JI4c/ktWBGLgKrElQOrwDbwCrhLHH34ih1i m4JE67JDYDangIdE57KlrBCb3SX6lzezTGDkXcDIsIpRNLUguaA4KT3XSK84Mbe4NC9dLzk/ dxMjOMifSe9gXNVgcYhRgINRiYf3YtOVACHWxLLiytxDjBIczEoivFsMrgYI8aYkVlalFuXH F5XmpBYfYvQBumois5Rocj4wAvNK4g2NTcyMLI3MjE3MjY1xCCuJ8zZ7pAQICaQnlqRmp6YW pBbBjGPi4JRqYLS69NqKNd9wZcPKt/tvPFR8Y7CKc0LgP/dJR64IOCRxMXioFwkKHVw0x9Vd yY67ZxXH41nXXy766/Zy29atLsfFFnyXkTms6OIcrqb02r1a9OHC66cVbpg7evh+fKzRb/tf lc979mu/8x29c3LuX/1xN2+zp2Yp29kn2Ydz0h1fXruuXKbo0KjEUpyRaKjFXFScCAAwrJak nwIAAA== X-CFilter-Loop: Reflected Cc: jy0.jeon@samsung.com, sw0312.kim@samsung.com, jaejoon.seo@samsung.com, kyungmin.park@samsung.com, jmock.shin@samsung.com, lsmin.lee@samsung.com, th908.kim@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org This patch considers both case of vflip and hflip. If we want that the contents in buffer to be rotated to 180 degree, then we can use h,vflip or 180 degree. Changelog v2: - added EXYNOS_DRM_FLIP_BOTH enum value to avoid build warnning. Signed-off-by: Eunchul Kim --- 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 --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 {