From patchwork Mon Feb 12 08:52:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Andrushchenko X-Patchwork-Id: 10211979 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 06F7860467 for ; Mon, 12 Feb 2018 08:53:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED309289FB for ; Mon, 12 Feb 2018 08:53:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1CD728C16; Mon, 12 Feb 2018 08:53:13 +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 669C0289FB for ; Mon, 12 Feb 2018 08:53:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 769B36E0F6; Mon, 12 Feb 2018 08:53:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id D9EF36E0F2 for ; Mon, 12 Feb 2018 08:53:08 +0000 (UTC) Received: by mail-lf0-x244.google.com with SMTP id k19so19407840lfj.1 for ; Mon, 12 Feb 2018 00:53:08 -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=waZTEsQxySd0K0XNcinkRNiTfDn5wupO15kmwfJgZv8=; b=VJ1JzO2la9Uu+6ndaBfQkhMLH3Usqb/1yDYGZc+D0Qx0d36OaY1pPnCbcB1p6YDgd8 MOmCWJOd8/ZtJZiTLnuqfDzSBy4LtCpY1D8uveNU7uRC7GMGUNbV3C7A4suBUqyBUp1c XCzRMmY9h1tOh+TpWxuDfLJ3sFgEmhrD4QjQG63Bp8R+AiKZmalS7sInvqROEy/Rz8pp 85MmpfeF1pxIqPhsfLNIBdJmswIU9SZ7jZAxVVHdgxYObZIkCQHHW1MbxFZ5gptOo/6X lUxXYh2dQ3TdHgJcoATho7znv1auW7RZcaoay5vFR0hV4ABX+mJR6ZbxDuJvkbxh+R3Y SwsA== 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=waZTEsQxySd0K0XNcinkRNiTfDn5wupO15kmwfJgZv8=; b=i06v5bj9uK1IEXd1ErWQCk2xZXpz/gRrfB4f0ah4XTX/VrzufZUa8GVngAVYtW6Ltj xsASmcs3Y+uYMlgIT/Iou+ToXwJDn9ReDPqFULtjHeUlbql6ooCcHHoFCjGtlmU57Wgl v0numjApRiD8BDW+2aDRbtXETBsK2b+rgOsIEUp9JCi6FOE/d7XNRTn6l0vu7+WzLx4i wQw+8iNTsv9SwNCHYCd+pLA6sPkOdy8LkNcMAmLhYUPqwP7tirtBUU00H75X6IeihIVi Z+hDhtGZYeqY04mg4CFdu1DAiB6fjpe9XVsOGCeIPAe9mE56vnMmKathiS6Z8JQ2L6Qx depg== X-Gm-Message-State: APf1xPCGjVEOMbstM5soR5C5C7WgX8uGGOyr6Kkkm9/eO4TkK3jsXMmo 6J4tFb3RVg6jpyh+Jw5x9LbX0w== X-Google-Smtp-Source: AH8x226S4HMtGKX7L/GqrV184bu9JaxEElG13mPZ+pouIF895TXDLIheH/mwiCdKylp2Yn5hIhLXPQ== X-Received: by 10.25.21.101 with SMTP id l98mr4755144lfi.139.1518425586997; Mon, 12 Feb 2018 00:53:06 -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.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Feb 2018 00:53:06 -0800 (PST) From: Oleksandr Andrushchenko To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] drm/pl111: Do not use deprecated drm_driver.{enable|disable)_vblank Date: Mon, 12 Feb 2018 10:52:54 +0200 Message-Id: <1518425574-32671-5-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: Eric Anholt Reviewed-by: Eric Anholt Tested-by: Eric Anholt --- drivers/gpu/drm/pl111/pl111_display.c | 15 ++++++++++++--- drivers/gpu/drm/pl111/pl111_drm.h | 2 -- drivers/gpu/drm/pl111/pl111_drv.c | 5 ----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c index d75923896609..5b8368c76734 100644 --- a/drivers/gpu/drm/pl111/pl111_display.c +++ b/drivers/gpu/drm/pl111/pl111_display.c @@ -321,8 +321,10 @@ static void pl111_display_update(struct drm_simple_display_pipe *pipe, } } -int pl111_enable_vblank(struct drm_device *drm, unsigned int crtc) +static int pl111_display_enable_vblank(struct drm_simple_display_pipe *pipe) { + struct drm_crtc *crtc = &pipe->crtc; + struct drm_device *drm = crtc->dev; struct pl111_drm_dev_private *priv = drm->dev_private; writel(CLCD_IRQ_NEXTBASE_UPDATE, priv->regs + priv->ienb); @@ -330,8 +332,10 @@ int pl111_enable_vblank(struct drm_device *drm, unsigned int crtc) return 0; } -void pl111_disable_vblank(struct drm_device *drm, unsigned int crtc) +static void pl111_display_disable_vblank(struct drm_simple_display_pipe *pipe) { + struct drm_crtc *crtc = &pipe->crtc; + struct drm_device *drm = crtc->dev; struct pl111_drm_dev_private *priv = drm->dev_private; writel(0, priv->regs + priv->ienb); @@ -343,7 +347,7 @@ static int pl111_display_prepare_fb(struct drm_simple_display_pipe *pipe, return drm_gem_fb_prepare_fb(&pipe->plane, plane_state); } -static const struct drm_simple_display_pipe_funcs pl111_display_funcs = { +static struct drm_simple_display_pipe_funcs pl111_display_funcs = { .check = pl111_display_check, .enable = pl111_display_enable, .disable = pl111_display_disable, @@ -502,6 +506,11 @@ int pl111_display_init(struct drm_device *drm) if (ret) return ret; + if (!priv->variant->broken_vblank) { + pl111_display_funcs.enable_vblank = pl111_display_enable_vblank; + pl111_display_funcs.disable_vblank = pl111_display_disable_vblank; + } + ret = drm_simple_display_pipe_init(drm, &priv->pipe, &pl111_display_funcs, priv->variant->formats, diff --git a/drivers/gpu/drm/pl111/pl111_drm.h b/drivers/gpu/drm/pl111/pl111_drm.h index 6d0e450e51b1..8e252b561e2c 100644 --- a/drivers/gpu/drm/pl111/pl111_drm.h +++ b/drivers/gpu/drm/pl111/pl111_drm.h @@ -79,8 +79,6 @@ struct pl111_drm_dev_private { }; int pl111_display_init(struct drm_device *dev); -int pl111_enable_vblank(struct drm_device *drm, unsigned int crtc); -void pl111_disable_vblank(struct drm_device *drm, unsigned int crtc); irqreturn_t pl111_irq(int irq, void *data); int pl111_debugfs_init(struct drm_minor *minor); diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index 1231905150d0..a7a3a49956c5 100644 --- a/drivers/gpu/drm/pl111/pl111_drv.c +++ b/drivers/gpu/drm/pl111/pl111_drv.c @@ -249,11 +249,6 @@ static int pl111_amba_probe(struct amba_device *amba_dev, if (!priv) return -ENOMEM; - if (!variant->broken_vblank) { - pl111_drm_driver.enable_vblank = pl111_enable_vblank; - pl111_drm_driver.disable_vblank = pl111_disable_vblank; - } - drm = drm_dev_alloc(&pl111_drm_driver, dev); if (IS_ERR(drm)) return PTR_ERR(drm);