From patchwork Mon Feb 12 08:52:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Andrushchenko X-Patchwork-Id: 10211981 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 5E68660467 for ; Mon, 12 Feb 2018 08:53:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 506D9289FB for ; Mon, 12 Feb 2018 08:53:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4509F28C16; Mon, 12 Feb 2018 08:53:16 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 D86BF289FB for ; Mon, 12 Feb 2018 08:53:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A3DAD6E102; Mon, 12 Feb 2018 08:53:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 586CA6E0E9 for ; Mon, 12 Feb 2018 08:53:07 +0000 (UTC) Received: by mail-lf0-x242.google.com with SMTP id a204so19373858lfa.2 for ; Mon, 12 Feb 2018 00:53:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=s8Z9h8Jn7j3rS7kPMWLpKOKIdHF/iNhkslWXs+48sOg=; b=jZH9SbRrhDB7HQodT2B0A5jrJ6VXB8r2pE01h6Y3bp/4dyVUGy5jtjYCJs5u7+JPrh u2Q5yqSRtxHQntpDENc7C3dZUVsqwJPTwgeYIw+m4L7QUaXXWKL8dXRiiavCHHHScaUg D5XLHTNaSRvglSctT+TJ4YAlxnXKoW1fE+fH1aS7mYVchys/Mq8gS4oaLJpZv4OG3FIo c9kQLuIOOnBfZFdLSXlSqAVqhCjxT40jz/OQNbsgS5Ex0Bgk+jos/2LR9gqc4ZMBmCye qqCVqnogvdp6ut6aLQSKwXmMeoplDiFTuC8Rt4HtPSZUEpDT+N7w5dCVLEDkAA4fACtv 2yJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=s8Z9h8Jn7j3rS7kPMWLpKOKIdHF/iNhkslWXs+48sOg=; b=UUNOoHSHCElgxbqMxYMu12LqSPiFQglQZBhfwAh+ODwGnB1RVnCzO8NEhbXnwDVeQt NIi9k8ZEhusYQGAbSmrTV6sYI7Z5gz55CnsreAkbJJVhna6w0OMj2CJCucJmxESsd2/Q vjYgyDzBxnKFStOOI+4nGcrQ6flr2fuJwHU2L2tnoioXgBR93a8e+Bi44uq8NolFTeMq X7BAifFvAGs55jqunCx6se/apQjUsruIEybEcEJVWDkYXg/f3BtUozuq8yRLA2mWO0Uy 4kNm4fO5jn89yQsQOXAg9UaVOvjy4lKChs320wsKueANBzjqcU5YEjIb5lF1fIT5Vhd1 Su4g== X-Gm-Message-State: APf1xPC7NaVC3WolGC3xP/4vi7adMrha5VR7tvpN7L5BJOnwrxSpdp7A 6kfmPVXC++hGNgRQhNe8H53QMw== X-Google-Smtp-Source: AH8x224JnnFgVdGG3qeom4YqUEuQUx40EI96aUhD0goYOg3umEhH4nXzz8qoDM9+z1hrFeC82r4pRg== X-Received: by 10.25.227.1 with SMTP id a1mr5765036lfh.54.1518425585438; Mon, 12 Feb 2018 00:53:05 -0800 (PST) Received: from a2k-HP-ProDesk-600-G2-SFF.kyiv.epam.com (ll-55.209.223.85.sovam.net.ua. [85.223.209.55]) by smtp.gmail.com with ESMTPSA id q77sm897403lfd.23.2018.02.12.00.53.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Feb 2018 00:53:04 -0800 (PST) From: Oleksandr Andrushchenko To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] drm/tve200: Do not use deprecated drm_driver.{enable|disable)_vblank Date: Mon, 12 Feb 2018 10:52:53 +0200 Message-Id: <1518425574-32671-4-git-send-email-andr2000@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518425574-32671-1-git-send-email-andr2000@gmail.com> References: <1518425574-32671-1-git-send-email-andr2000@gmail.com> 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: Oleksandr Andrushchenko , airlied@linux.ie, daniel.vetter@intel.com MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Oleksandr Andrushchenko Do not use deprecated drm_driver.{enable|disable)_vblank callbacks, but use drm_simple_kms_helpe's pipe callbacks instead. Signed-off-by: Oleksandr Andrushchenko Cc: Linus Walleij Reviewed-by: Linus Walleij --- drivers/gpu/drm/tve200/tve200_display.c | 10 ++++++++-- drivers/gpu/drm/tve200/tve200_drm.h | 2 -- drivers/gpu/drm/tve200/tve200_drv.c | 3 --- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/tve200/tve200_display.c b/drivers/gpu/drm/tve200/tve200_display.c index 2c668bd6d997..db397fcb345a 100644 --- a/drivers/gpu/drm/tve200/tve200_display.c +++ b/drivers/gpu/drm/tve200/tve200_display.c @@ -273,16 +273,20 @@ static void tve200_display_update(struct drm_simple_display_pipe *pipe, } } -int tve200_enable_vblank(struct drm_device *drm, unsigned int crtc) +static int tve200_display_enable_vblank(struct drm_simple_display_pipe *pipe) { + struct drm_crtc *crtc = &pipe->crtc; + struct drm_device *drm = crtc->dev; struct tve200_drm_dev_private *priv = drm->dev_private; writel(TVE200_INT_V_STATUS, priv->regs + TVE200_INT_EN); return 0; } -void tve200_disable_vblank(struct drm_device *drm, unsigned int crtc) +static void tve200_display_disable_vblank(struct drm_simple_display_pipe *pipe) { + struct drm_crtc *crtc = &pipe->crtc; + struct drm_device *drm = crtc->dev; struct tve200_drm_dev_private *priv = drm->dev_private; writel(0, priv->regs + TVE200_INT_EN); @@ -300,6 +304,8 @@ static const struct drm_simple_display_pipe_funcs tve200_display_funcs = { .disable = tve200_display_disable, .update = tve200_display_update, .prepare_fb = tve200_display_prepare_fb, + .enable_vblank = tve200_display_enable_vblank, + .disable_vblank = tve200_display_disable_vblank, }; int tve200_display_init(struct drm_device *drm) diff --git a/drivers/gpu/drm/tve200/tve200_drm.h b/drivers/gpu/drm/tve200/tve200_drm.h index 5c270055bd58..1ba4380f489b 100644 --- a/drivers/gpu/drm/tve200/tve200_drm.h +++ b/drivers/gpu/drm/tve200/tve200_drm.h @@ -113,8 +113,6 @@ struct tve200_drm_dev_private { container_of(x, struct tve200_drm_connector, connector) int tve200_display_init(struct drm_device *dev); -int tve200_enable_vblank(struct drm_device *drm, unsigned int crtc); -void tve200_disable_vblank(struct drm_device *drm, unsigned int crtc); irqreturn_t tve200_irq(int irq, void *data); int tve200_connector_init(struct drm_device *dev); int tve200_encoder_init(struct drm_device *dev); diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index 44911d921864..ac344ddb23bc 100644 --- a/drivers/gpu/drm/tve200/tve200_drv.c +++ b/drivers/gpu/drm/tve200/tve200_drv.c @@ -162,9 +162,6 @@ static struct drm_driver tve200_drm_driver = { .gem_free_object_unlocked = drm_gem_cma_free_object, .gem_vm_ops = &drm_gem_cma_vm_ops, - .enable_vblank = tve200_enable_vblank, - .disable_vblank = tve200_disable_vblank, - .prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_fd_to_handle = drm_gem_prime_fd_to_handle, .gem_prime_import = drm_gem_prime_import,