From patchwork Fri Oct 5 02:50:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 10627291 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 323A51515 for ; Fri, 5 Oct 2018 02:58:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 213AC295E9 for ; Fri, 5 Oct 2018 02:58:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12F8429601; Fri, 5 Oct 2018 02:58:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4B0D1295E9 for ; Fri, 5 Oct 2018 02:58:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C36A6E6CE; Fri, 5 Oct 2018 02:58:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 488 seconds by postgrey-1.36 at gabe; Fri, 05 Oct 2018 02:58:37 UTC Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by gabe.freedesktop.org (Postfix) with ESMTPS id 88FFC6E6CE for ; Fri, 5 Oct 2018 02:58:37 +0000 (UTC) Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20181005025027epoutp03b5d9164d73580ba32242d83199dfed10~alp3EdZ9b1216812168epoutp03S; Fri, 5 Oct 2018 02:50:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20181005025027epoutp03b5d9164d73580ba32242d83199dfed10~alp3EdZ9b1216812168epoutp03S Received: from epsmges2p2.samsung.com (unknown [182.195.40.156]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20181005025023epcas1p42faa62c3b8d19dfecf820c7f46638152~alpzpJV-A1207912079epcas1p4k; Fri, 5 Oct 2018 02:50:23 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 56.43.04077.F61D6BB5; Fri, 5 Oct 2018 11:50:23 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20181005025023epcas2p165ff162ffc86c7aaa58a85184e5dee85~alpzWwJJO0505005050epcas2p1X; Fri, 5 Oct 2018 02:50:23 +0000 (GMT) X-AuditID: b6c32a46-45dff70000000fed-42-5bb6d16fa0d5 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 62.68.03633.E61D6BB5; Fri, 5 Oct 2018 11:50:22 +0900 (KST) Received: from localhost.localdomain ([10.113.62.206]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PG3008BGUJYGJA0@mmp1.samsung.com>; Fri, 05 Oct 2018 11:50:22 +0900 (KST) From: Inki Dae To: dri-devel@lists.freedesktop.org Subject: [PATCH] Revert "drm/exynos/decon5433: implement frame counter" Date: Fri, 05 Oct 2018 11:50:20 +0900 Message-id: <1538707820-3103-1-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail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Gj8+b5AKYo7hsUlJzMstSi/TtErgydvbVFpyWr9iyZBtrA2O/ dBcjJ4eEgInEjVuvWLsYuTiEBHYySjxYdp8ZwvnBKDFlwVw2kCo2AVWJiSvug9kiAsoSfyeu YgSxmQXcJBafXs4CYgsLuEscv7kPLM4CVN/8biU7iM0r4CzRe6edEWKbnMTNc53MExi5FjAy rGKUTC0ozk3PLTYqMMpLLdcrTswtLs1L10vOz93ECPTstsNa/TsYHy+JP8QowMGoxMP7Qnlb tBBrYllxZe4hRgkOZiUR3vASoBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXFe/vxjkUIC6Yklqdmp qQWpRTBZJg5OqQbGsOs87H+iFmc/Pfm+2vdtY1TXx60LmOI7rqVUKkccFLCzXRi60C5m+iq/ t6qb5hnxFxyf2Tl/b9qFi5VitzfPufDl09WLB/YIZ+k17s3yjlLIePlg9gRPNkEOsVxvbq0o 5uMCy/8eZTGbnspk+H6Gyirdlb/s/8vnpM9fpqXNuVLOTW3W9b8xSizFGYmGWsxFxYkAWN2z QOgBAAA= X-CMS-MailID: 20181005025023epcas2p165ff162ffc86c7aaa58a85184e5dee85 X-Msg-Generator: CA CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20181005025023epcas2p165ff162ffc86c7aaa58a85184e5dee85 References: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit 0586feba322e1de05075700eb4b835c8b683e62b This patch makes it to need get_vblank_counter callback in crtc to get frame counter from decon driver. However, drm_dev->max_vblank_count is a member unique to vendor's DRM driver but in case of ARM DRM, some CRTC devices don't provide the frame counter value. As a result, this patch made extension and clone mode not working. Instead of this patch, we may need separated max_vblank_count which belongs to each CRTC device, or need to implement frame counter emulation for them who don't support HW frame counter. Signed-off-by: Inki Dae --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 9 --------- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 11 ----------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 - 3 files changed, 21 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 94529aa..aef487d 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -164,13 +164,6 @@ static u32 decon_get_frame_count(struct decon_context *ctx, bool end) return frm; } -static u32 decon_get_vblank_counter(struct exynos_drm_crtc *crtc) -{ - struct decon_context *ctx = crtc->ctx; - - return decon_get_frame_count(ctx, false); -} - static void decon_setup_trigger(struct decon_context *ctx) { if (!ctx->crtc->i80_mode && !(ctx->out_type & I80_HW_TRG)) @@ -536,7 +529,6 @@ static const struct exynos_drm_crtc_ops decon_crtc_ops = { .disable = decon_disable, .enable_vblank = decon_enable_vblank, .disable_vblank = decon_disable_vblank, - .get_vblank_counter = decon_get_vblank_counter, .atomic_begin = decon_atomic_begin, .update_plane = decon_update_plane, .disable_plane = decon_disable_plane, @@ -554,7 +546,6 @@ static int decon_bind(struct device *dev, struct device *master, void *data) int ret; ctx->drm_dev = drm_dev; - drm_dev->max_vblank_count = 0xffffffff; for (win = ctx->first_win; win < WINDOWS_NR; win++) { ctx->configs[win].pixel_formats = decon_formats; diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index eea9025..2696289 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -162,16 +162,6 @@ static void exynos_drm_crtc_disable_vblank(struct drm_crtc *crtc) exynos_crtc->ops->disable_vblank(exynos_crtc); } -static u32 exynos_drm_crtc_get_vblank_counter(struct drm_crtc *crtc) -{ - struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); - - if (exynos_crtc->ops->get_vblank_counter) - return exynos_crtc->ops->get_vblank_counter(exynos_crtc); - - return 0; -} - static const struct drm_crtc_funcs exynos_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, @@ -181,7 +171,6 @@ static const struct drm_crtc_funcs exynos_crtc_funcs = { .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .enable_vblank = exynos_drm_crtc_enable_vblank, .disable_vblank = exynos_drm_crtc_disable_vblank, - .get_vblank_counter = exynos_drm_crtc_get_vblank_counter, }; struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev, diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index ec9604f..5e61e70 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -135,7 +135,6 @@ struct exynos_drm_crtc_ops { void (*disable)(struct exynos_drm_crtc *crtc); int (*enable_vblank)(struct exynos_drm_crtc *crtc); void (*disable_vblank)(struct exynos_drm_crtc *crtc); - u32 (*get_vblank_counter)(struct exynos_drm_crtc *crtc); enum drm_mode_status (*mode_valid)(struct exynos_drm_crtc *crtc, const struct drm_display_mode *mode); bool (*mode_fixup)(struct exynos_drm_crtc *crtc,