From patchwork Fri Feb 3 09:41:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Abriou X-Patchwork-Id: 9553675 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 E759060424 for ; Fri, 3 Feb 2017 09:41:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA863281E1 for ; Fri, 3 Feb 2017 09:41:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF6152849C; Fri, 3 Feb 2017 09:41:39 +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 7F89E281E1 for ; Fri, 3 Feb 2017 09:41:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 552376EB34; Fri, 3 Feb 2017 09:41:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [62.209.51.94]) by gabe.freedesktop.org (Postfix) with ESMTPS id 06A6E6EB2F for ; Fri, 3 Feb 2017 09:41:34 +0000 (UTC) Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id v139baxA004801; Fri, 3 Feb 2017 10:41:33 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-.pphosted.com with ESMTP id 288hn25p54-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 03 Feb 2017 10:41:33 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 91B033D; Fri, 3 Feb 2017 09:41:27 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7FAAD276C; Fri, 3 Feb 2017 09:41:27 +0000 (GMT) Received: from localhost (10.201.23.35) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 3 Feb 2017 10:41:27 +0100 From: Vincent Abriou To: Subject: [PATCH 2/2] drm/sti: remove deprecated legacy vtg slave Date: Fri, 3 Feb 2017 10:41:19 +0100 Message-ID: <1486114879-13438-3-git-send-email-vincent.abriou@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486114879-13438-1-git-send-email-vincent.abriou@st.com> References: <1486114879-13438-1-git-send-email-vincent.abriou@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.35] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-03_08:, , signatures=0 Cc: Yannick Fertre , Vincent Abriou , Fabien Dessenne 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP stih416 chip family is no more supported in Linux v4.9. It is then useless to keep vtg slave field since it not used at all for the stih407/10 chip family supported by sti driver. Signed-off-by: Vincent Abriou --- drivers/gpu/drm/sti/sti_vtg.c | 58 +++++++++++-------------------------------- 1 file changed, 14 insertions(+), 44 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c index c3d9c8a..943bce5 100644 --- a/drivers/gpu/drm/sti/sti_vtg.c +++ b/drivers/gpu/drm/sti/sti_vtg.c @@ -17,7 +17,6 @@ #include "sti_vtg.h" #define VTG_MODE_MASTER 0 -#define VTG_MODE_SLAVE_BY_EXT0 1 /* registers offset */ #define VTG_MODE 0x0000 @@ -132,7 +131,6 @@ struct sti_vtg_sync_params { * @irq_status: store the IRQ status value * @notifier_list: notifier callback * @crtc: the CRTC for vblank event - * @slave: slave vtg * @link: List node to link the structure in lookup list */ struct sti_vtg { @@ -144,7 +142,6 @@ struct sti_vtg { u32 irq_status; struct raw_notifier_head notifier_list; struct drm_crtc *crtc; - struct sti_vtg *slave; struct list_head link; }; @@ -166,10 +163,6 @@ struct sti_vtg *of_vtg_find(struct device_node *np) static void vtg_reset(struct sti_vtg *vtg) { - /* reset slave and then master */ - if (vtg->slave) - vtg_reset(vtg->slave); - writel(1, vtg->regs + VTG_DRST_AUTOC); } @@ -259,10 +252,6 @@ static void vtg_set_mode(struct sti_vtg *vtg, { unsigned int i; - if (vtg->slave) - vtg_set_mode(vtg->slave, VTG_MODE_SLAVE_BY_EXT0, - vtg->sync_params, mode); - /* Set the number of clock cycles per line */ writel(mode->htotal, vtg->regs + VTG_CLKLN); @@ -318,11 +307,7 @@ void sti_vtg_set_config(struct sti_vtg *vtg, vtg_reset(vtg); - /* enable irq for the vtg vblank synchro */ - if (vtg->slave) - vtg_enable_irq(vtg->slave); - else - vtg_enable_irq(vtg); + vtg_enable_irq(vtg); } /** @@ -365,18 +350,12 @@ u32 sti_vtg_get_pixel_number(struct drm_display_mode mode, int x) int sti_vtg_register_client(struct sti_vtg *vtg, struct notifier_block *nb, struct drm_crtc *crtc) { - if (vtg->slave) - return sti_vtg_register_client(vtg->slave, nb, crtc); - vtg->crtc = crtc; return raw_notifier_chain_register(&vtg->notifier_list, nb); } int sti_vtg_unregister_client(struct sti_vtg *vtg, struct notifier_block *nb) { - if (vtg->slave) - return sti_vtg_unregister_client(vtg->slave, nb); - return raw_notifier_chain_unregister(&vtg->notifier_list, nb); } @@ -434,29 +413,20 @@ static int vtg_probe(struct platform_device *pdev) return -ENOMEM; } - np = of_parse_phandle(pdev->dev.of_node, "st,slave", 0); - if (np) { - vtg->slave = of_vtg_find(np); - of_node_put(np); + vtg->irq = platform_get_irq(pdev, 0); + if (vtg->irq < 0) { + DRM_ERROR("Failed to get VTG interrupt\n"); + return vtg->irq; + } - if (!vtg->slave) - return -EPROBE_DEFER; - } else { - vtg->irq = platform_get_irq(pdev, 0); - if (vtg->irq < 0) { - DRM_ERROR("Failed to get VTG interrupt\n"); - return vtg->irq; - } - - RAW_INIT_NOTIFIER_HEAD(&vtg->notifier_list); - - ret = devm_request_threaded_irq(dev, vtg->irq, vtg_irq, - vtg_irq_thread, IRQF_ONESHOT, - dev_name(dev), vtg); - if (ret < 0) { - DRM_ERROR("Failed to register VTG interrupt\n"); - return ret; - } + RAW_INIT_NOTIFIER_HEAD(&vtg->notifier_list); + + ret = devm_request_threaded_irq(dev, vtg->irq, vtg_irq, + vtg_irq_thread, IRQF_ONESHOT, + dev_name(dev), vtg); + if (ret < 0) { + DRM_ERROR("Failed to register VTG interrupt\n"); + return ret; } vtg_register(vtg);