From patchwork Tue Feb 7 09:16:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 9559601 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF27C60434 for ; Tue, 7 Feb 2017 09:20:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7AC4282E2 for ; Tue, 7 Feb 2017 09:20:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB31A2832F; Tue, 7 Feb 2017 09:20:26 +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=-4.2 required=2.0 tests=BAYES_00, 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 4E9DF282E2 for ; Tue, 7 Feb 2017 09:20:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E28C6E62A; Tue, 7 Feb 2017 09:20:25 +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 30BCF6E62A for ; Tue, 7 Feb 2017 09:20:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3BE9E20142; Tue, 7 Feb 2017 09:20:23 +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 38631202FF; Tue, 7 Feb 2017 09:20:09 +0000 (UTC) From: Shawn Guo To: Daniel Vetter Subject: [PATCH v3 15/23] drm: qxl: use vblank hooks in struct drm_crtc_funcs Date: Tue, 7 Feb 2017 17:16:27 +0800 Message-Id: <1486458995-31018-16-git-send-email-shawnguo@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486458995-31018-1-git-send-email-shawnguo@kernel.org> References: <1486458995-31018-1-git-send-email-shawnguo@kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP Cc: Neil Armstrong , Liviu Dudau , Laurent Pinchart , Daniel Vetter , Marek Vasut , Alexey Brodkin , Russell King , Xinliang Liu , Tomi Valkeinen , Mali DP Maintainers , Ben Skeggs , Dave Airlie , Jyri Sarha , dri-devel@lists.freedesktop.org, Maxime Ripard 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" X-Virus-Scanned: ClamAV using ClamSMTP From: Shawn Guo The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by: Shawn Guo Cc: Dave Airlie --- drivers/gpu/drm/qxl/qxl_display.c | 16 ++++++++++++++++ drivers/gpu/drm/qxl/qxl_drv.c | 18 ------------------ 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 1094cd33eb06..2ce805a7ce5e 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -548,6 +548,19 @@ static int qxl_crtc_cursor_move(struct drm_crtc *crtc, return 0; } +static u32 qxl_noop_get_vblank_counter(struct drm_crtc *crtc) +{ + return 0; +} + +static int qxl_noop_enable_vblank(struct drm_crtc *crtc) +{ + return 0; +} + +static void qxl_noop_disable_vblank(struct drm_crtc *crtc) +{ +} static const struct drm_crtc_funcs qxl_crtc_funcs = { .cursor_set2 = qxl_crtc_cursor_set2, @@ -555,6 +568,9 @@ static int qxl_crtc_cursor_move(struct drm_crtc *crtc, .set_config = drm_crtc_helper_set_config, .destroy = qxl_crtc_destroy, .page_flip = qxl_crtc_page_flip, + .get_vblank_counter = qxl_noop_get_vblank_counter, + .enable_vblank = qxl_noop_enable_vblank, + .disable_vblank = qxl_noop_disable_vblank, }; void qxl_user_framebuffer_destroy(struct drm_framebuffer *fb) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 8e17c241e63c..48d51a2f3bd8 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -247,21 +247,6 @@ static int qxl_pm_restore(struct device *dev) return qxl_drm_resume(drm_dev, false); } -static u32 qxl_noop_get_vblank_counter(struct drm_device *dev, - unsigned int pipe) -{ - return 0; -} - -static int qxl_noop_enable_vblank(struct drm_device *dev, unsigned int pipe) -{ - return 0; -} - -static void qxl_noop_disable_vblank(struct drm_device *dev, unsigned int pipe) -{ -} - static const struct dev_pm_ops qxl_pm_ops = { .suspend = qxl_pm_suspend, .resume = qxl_pm_resume, @@ -281,9 +266,6 @@ static void qxl_noop_disable_vblank(struct drm_device *dev, unsigned int pipe) static struct drm_driver qxl_driver = { .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED, - .get_vblank_counter = qxl_noop_get_vblank_counter, - .enable_vblank = qxl_noop_enable_vblank, - .disable_vblank = qxl_noop_disable_vblank, .set_busid = drm_pci_set_busid,