From patchwork Thu Dec 6 14:46:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathyush K X-Patchwork-Id: 1844971 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 6980B3FCA5 for ; Thu, 6 Dec 2012 14:30:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C42EE6757 for ; Thu, 6 Dec 2012 06:30:41 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTP id ED463E673D for ; Thu, 6 Dec 2012 06:24:53 -0800 (PST) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MEM00JT55DCO1N0@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 06 Dec 2012 23:24:53 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.123]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 75.C3.01231.5BAA0C05; Thu, 06 Dec 2012 23:24:53 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-0e-50c0aab5319c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 55.C3.01231.4BAA0C05; Thu, 06 Dec 2012 23:24:53 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MEM009QO5AHQGB0@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 06 Dec 2012 23:24:52 +0900 (KST) From: Prathyush K To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/7] drm/exynos: move fimd wait_for_vblank to manager_ops Date: Thu, 06 Dec 2012 20:16:02 +0530 Message-id: <1354805166-29365-4-git-send-email-prathyush.k@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1354805166-29365-1-git-send-email-prathyush.k@samsung.com> References: <1354805166-29365-1-git-send-email-prathyush.k@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsWyRsSkWnfrqgMBBnd381hc+fqezYHR4373 caYAxigum5TUnMyy1CJ9uwSujAlXLrIVXOCrON58m7GBcRJPFyMnh4SAicS73uvMELaYxIV7 69m6GLk4hASWMkpM3NbICFM0eeotqMR0Ron1X/ZDOauZJE41TmIDqWIT0Jb4NecuK4gtIqAs 8XfiKrBuZgEJiSPtZ8FqhAU8JS79n8IOYrMIqEo0tR1hArF5BdwlXv6fxgaxTUGiddkhoBoO Dk4BD4l1/zNBwkJAJbv+tLNCtApIfJt8iAWkREJAVmLTAWaQcyQELrNJrJ5wjB1ijKTEwRU3 WCYwCi9gZFjFKJpakFxQnJSea6hXnJhbXJqXrpecn7uJERiEp/89k9rBuLLB4hCjAAejEg+v ZfX+ACHWxLLiytxDjBIczEoivDEdBwKEeFMSK6tSi/Lji0pzUosPMfoAXTKRWUo0OR8YIXkl 8YbGJuamxqaWRkZmpqY4hJXEeZs9UgKEBNITS1KzU1MLUotgxjFxcEo1MJ4/FyhrmaUXE3z0 1x33Rbs0g98fbH73qP62bffFbboVGgLPGkI9bHaver7v0rn2VetW6HQJSwuKbJ25wtdk7UFG q851Ejc3Nv2pDTqWL5LkW3/UOHbOT4XfKzY9zzylt77r0q+ug6ot23Y9qmMuPs/Af3f1xaef Ip+67lZfPIdvHusfE46kvzVKLMUZiYZazEXFiQCWBPxtbwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e+xoO7WVQcCDOZMZ7W48vU9mwOjx/3u 40wBjFENjDYZqYkpqUUKqXnJ+SmZeem2St7B8c7xpmYGhrqGlhbmSgp5ibmptkouPgG6bpk5 QGOVFMoSc0qBQgGJxcVK+naYJoSGuOlawDRG6PqGBMH1GBmggYQ1jBkTrlxkK7jAV3G8+TZj A+Mkni5GTg4JAROJyVNvsUHYYhIX7q0Hsrk4hASmM0qs/7IfylnNJHGqcRJYFZuAtsSvOXdZ QWwRAWWJvxNXMYLYzAISEkfaz4LVCAt4Slz6P4UdxGYRUJVoajvCBGLzCrhLvPw/DWqbgkTr skNANRwcnAIeEuv+Z4KEhYBKdv1pZ53AyLuAkWEVo2hqQXJBcVJ6rqFecWJucWleul5yfu4m RnCIP5PawbiyweIQowAHoxIPr2X1/gAh1sSy4srcQ4wSHMxKIrwxHQcChHhTEiurUovy44tK c1KLDzH6AB01kVlKNDkfGH95JfGGxibmpsamliYWJmaWOISVxHmbPVIChATSE0tSs1NTC1KL YMYxcXBKNTAeSjPRmT3JZuOMskrRP+1LL9gE9Pjd5ZR4ukYs/9Kcs7yCYYEz3L+GLjUxqLR0 1DcuqpfhLeFVDtKMePH5UUtMB98X3fkFk7a0Bbbs7jST/J+gVHb499aPXJwzg3IurVM6odkU mlFvdHPd6dg12ms+Sa/fb8OpqHD3gtynr45iYW7r5qtnNiuxFGckGmoxFxUnAgAEkRIVngIA AA== X-CFilter-Loop: Reflected 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 The wait for vblank callback is moved from overlay_ops to manager_ops for fimd. Signed-off-by: Prathyush K --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 00bd266..1d46286 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -308,12 +308,24 @@ static void fimd_disable_vblank(struct device *dev) } } +static void fimd_wait_for_vblank(struct device *dev) +{ + struct fimd_context *ctx = get_fimd_context(dev); + int ret; + + ret = wait_for((__raw_readl(ctx->regs + VIDCON1) & + VIDCON1_VSTATUS_VSYNC), 50); + if (ret < 0) + DRM_DEBUG_KMS("vblank wait timed out.\n"); +} + static struct exynos_drm_manager_ops fimd_manager_ops = { .dpms = fimd_dpms, .apply = fimd_apply, .commit = fimd_commit, .enable_vblank = fimd_enable_vblank, .disable_vblank = fimd_disable_vblank, + .wait_for_vblank = fimd_wait_for_vblank, }; static void fimd_win_mode_set(struct device *dev, @@ -593,22 +605,10 @@ static void fimd_win_disable(struct device *dev, int zpos) win_data->enabled = false; } -static void fimd_wait_for_vblank(struct device *dev) -{ - struct fimd_context *ctx = get_fimd_context(dev); - int ret; - - ret = wait_for((__raw_readl(ctx->regs + VIDCON1) & - VIDCON1_VSTATUS_VSYNC), 50); - if (ret < 0) - DRM_DEBUG_KMS("vblank wait timed out.\n"); -} - static struct exynos_drm_overlay_ops fimd_overlay_ops = { .mode_set = fimd_win_mode_set, .commit = fimd_win_commit, .disable = fimd_win_disable, - .wait_for_vblank = fimd_wait_for_vblank, }; static struct exynos_drm_manager fimd_manager = {