From patchwork Fri Dec 21 04:20:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eunchul Kim X-Patchwork-Id: 1902061 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 B94D9DFAC4 for ; Fri, 21 Dec 2012 04:27:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE0984369D for ; Thu, 20 Dec 2012 20:27:12 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id EC0F9E608E for ; Thu, 20 Dec 2012 20:20:33 -0800 (PST) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MFD005ML5DYWAF0@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 21 Dec 2012 13:20:29 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.46]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 7F.ED.01231.D83E3D05; Fri, 21 Dec 2012 13:20:29 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-0b-50d3e38d4a89 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 6D.ED.01231.D83E3D05; Fri, 21 Dec 2012 13:20:29 +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 <0MFD009P95E1VT50@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 21 Dec 2012 13:20:29 +0900 (KST) From: Eunchul Kim To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH v2 3/8] drm/exynos: fixed vflip, hflip case at the same time. Date: Fri, 21 Dec 2012 13:20:43 +0900 Message-id: <1356063648-12447-4-git-send-email-chulspro.kim@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1356063648-12447-1-git-send-email-chulspro.kim@samsung.com> References: <1356063648-12447-1-git-send-email-chulspro.kim@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsVy+t8zPd3ex5cDDHZdE7e48vU9mwOjx/3u 40wBjFFcNimpOZllqUX6dglcGTNbf7MX3BOt+H19E2MD4zGhLkZODgkBE4ljv36zQthiEhfu rWfrYuTiEBJYxiix4cBXdpiid2sfMYHYQgLTGSUenuOAsFcwSbScVQWx2QR0JI7camYGsUUE LCUebP3NDDKIWeAno8S6J2fBNggL+Eo8n/wWzGYRUJV4tnwm2AJeAQ+J1+8nM0IsU5BoXXYI LM4p4CnRtO0LK8QyD4nzPb/ZIHoFJL5NPsTSxcgBVC8rsekA2C4JgctsEjtuPoQ6WlLi4Iob LBMYhRcwMqxiFE0tSC4oTkrPNdQrTswtLs1L10vOz93ECAlCqR2MKxssDjEKcDAq8fAyml0O EGJNLCuuzD3EKMHBrCTC+3wJUIg3JbGyKrUoP76oNCe1+BCjD9AlE5mlRJPzgRGSVxJvaGxg bGhoaWhmamlqgENYSZy32SMlQEggPbEkNTs1tSC1CGYcEwenVAOjVPEmA+8v3xPjHkRNNzkn dr1H8tTs42n5y5ptZ159kuQvuH/N4ao3m9Q+frhkqV+hFZvULJ1zb03oQ9/NZ0N+Z+yxkm77 4sdWFVtdlb7wkb110pw3GdMyYq/stduwO7JG7lqGtPfyOLPVc+9FTHu5d130RBEG6UWNBnvm z4qZnMpwpsa1VFpOiaU4I9FQi7moOBEAz1vQrG8CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e+xoG7v48sBBle3C1lc+fqezYHR4373 caYAxqgGRpuM1MSU1CKF1Lzk/JTMvHRbJe/geOd4UzMDQ11DSwtzJYW8xNxUWyUXnwBdt8wc oLFKCmWJOaVAoYDE4mIlfTtME0JD3HQtYBojdH1DguB6jAzQQMI6xoyZrb/ZC+6JVvy+vomx gfGYUBcjJ4eEgInEu7WPmCBsMYkL99azgdhCAtMZJR6e44CwVzBJtJxVBbHZBHQkjtxqZgax RQQsJR5s/Q1kc3EwC/xklFj35CwrSEJYwFfi+eS3YDaLgKrEs+Uz2UFsXgEPidfvJzNCLFOQ aF12CCzOKeAp0bTtCyvEMg+J8z2/2SYw8i5gZFjFKJpakFxQnJSea6hXnJhbXJqXrpecn7uJ ERziz6R2MK5ssDjEKMDBqMTDy2h2OUCINbGsuDL3EKMEB7OSCO/zJUAh3pTEyqrUovz4otKc 1OJDjD5AV01klhJNzgfGX15JvKGxiZmRpZGZsYm5sTEOYSVx3maPlAAhgfTEktTs1NSC1CKY cUwcnFINjPmSK7ikJbwrY7Zyup7/vl84y8bT+1TIz/SHVV+W5++Kvlb/atq6PztvXudfvrUr bL0Aq3xOieCPbQdkHq9dbezMFrRUzL9KIOCZkfoJD5d7aysf6W/vMFwyNeVkyMe5/aln/ji9 23i03e1q+ZId031MMpdMu2H5KWzD7Vkdp4Ot268e3x53Z7sSS3FGoqEWc1FxIgCRjF49ngIA AA== 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 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 --- 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 {