From patchwork Sun Jan 22 06:09:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 92134 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp714387qgi; Sat, 21 Jan 2017 22:10:03 -0800 (PST) X-Received: by 10.99.175.69 with SMTP id s5mr25767276pgo.6.1485065403381; Sat, 21 Jan 2017 22:10:03 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id c184si11755795pfg.185.2017.01.21.22.10.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Jan 2017 22:10:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C1336E307; Sun, 22 Jan 2017 06:09:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 23F6F6E307 for ; Sun, 22 Jan 2017 06:09:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2DDD6201B4; Sun, 22 Jan 2017 06:09:30 +0000 (UTC) Received: from localhost.localdomain (li411-102.members.linode.com [106.187.91.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E4D772012D; Sun, 22 Jan 2017 06:09:25 +0000 (UTC) From: Shawn Guo To: dri-devel@lists.freedesktop.org Subject: [RFC PATCH v2 0/5] Add vblank hooks to struct drm_crtc_funcs Date: Sun, 22 Jan 2017 14:09:01 +0800 Message-Id: <1485065346-11578-1-git-send-email-shawnguo@kernel.org> X-Mailer: git-send-email 1.9.1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cc: Daniel Vetter , Liviu Dudau , Laurent Pinchart X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Shawn Guo The vblank is mostly CRTC specific and implemented as part of CRTC driver. The first patch adds 3 vblank core-driver hooks into struct drm_crtc_funcs, and wraps around core vblank handling code to use the new hooks for modern MODESET drivers and the ones in struct drm_driver as fallback for legacy drivers. The other patches in the series are to demonstrate how the new hooks are going to influence the driver code. There are more drivers than the ones included here can be converted. But before doing that, I would like to get some feedbacks first, expecially on how .get_vblank_counter should be converted when it's being drm_vblank_no_hw_counter(). .get_vblank_counter = drm_vblank_no_hw_counter The series is generated against branch drm-misc-next. Changes for v2: - Wrap around core vblank handling code to save drm_crtc_enable[disable]_vblank() helpers - Add .get_vblank_counter to struct drm_crtc_funcs - Add some comments to link between two sets of hooks - Add one hdlcd driver patch for example Shawn Guo (5): drm: add vblank hooks to struct drm_crtc_funcs drm: hdlcd: use vblank hooks in struct drm_crtc_funcs drm: zte: zx_vou_enable[disable]_vblank can be static drm: rockchip: remove struct rockchip_crtc_funcs drm: imx: remove struct imx_drm_crtc and imx_drm_crtc_helper_funcs drivers/gpu/drm/arm/hdlcd_crtc.c | 20 ++++++ drivers/gpu/drm/arm/hdlcd_drv.c | 20 ------ drivers/gpu/drm/drm_irq.c | 53 +++++++++++++-- drivers/gpu/drm/imx/imx-drm-core.c | 101 ---------------------------- drivers/gpu/drm/imx/imx-drm.h | 13 ---- drivers/gpu/drm/imx/ipuv3-crtc.c | 58 ++++++---------- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 51 -------------- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 14 ---- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 9 +-- drivers/gpu/drm/zte/zx_drm_drv.c | 2 - drivers/gpu/drm/zte/zx_vou.c | 61 +++++++---------- drivers/gpu/drm/zte/zx_vou.h | 3 - include/drm/drm_crtc.h | 34 ++++++++++ include/drm/drm_drv.h | 9 +++ 14 files changed, 157 insertions(+), 291 deletions(-)