From patchwork Mon Feb 20 08:28:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yao mark X-Patchwork-Id: 9582151 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 048A1600C1 for ; Mon, 20 Feb 2017 08:30:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBC7B28856 for ; Mon, 20 Feb 2017 08:30:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0B7A28862; Mon, 20 Feb 2017 08:30:20 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A032828856 for ; Mon, 20 Feb 2017 08:30:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=M6gtubiy5C5bGjTYoF0hegRu2UvmUzUPK2RfD9Vwmu0=; b=K30 SQQKIWtsxE43/ouisLttrRirg1AGNlmcb8RbDd9moVFO/dwfbaLRkrs8y5NBQU4RY5uBSnEzNTQZz I7Vjz3BPvS4XVmjooA+/7/9hVIEZGPnbu/OAUoIfx4sV7+1hU0+vKzEop+NUO2vQOzVJn45TgG0wL bcfEjQsLsttUoVUlAJNpDDZeiv1qQHwqf5DrrgyrUDpe4W5nerpPiLjym34RhK/z29cX7nujyNwo7 SJnX+hDYFhSghLxd6xYf4KhtcPdg9b5qWx3Dq+TE7HAtfVKMkyhzeQisYnINV5BFM9scQgnH36cyd ViEl+jhrGBEL+9ysCQWpVEaOIn4jr4w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cfjME-0004hO-SS; Mon, 20 Feb 2017 08:30:06 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cfjLq-0004gq-FY; Mon, 20 Feb 2017 08:29:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WUybaAUveP74sYYHYSUO+z5gLmTdj8S/tz63BIcO+ww=; b=c1A7Uq2nEz01ZTga64w/+XHY4 djTkZKFS0vCVUTDS+Q7YMa2tjBC4E9eKVJMOUhWkRdOCtG6x7qrZ1FMJMr0gpY5vIX/Kv7AAfoemW Bf3Si8Za4f20ILeBRO5jdw01o3n9OMwuIVNw3l0lSVlIbacneT+N19N315ixbcOByZpwqY8wqikZq ugvRXgGaIepGVUfxyyP7vYH7ufoXg0yK2mqeWYdnjFW999Zwbk43hWdah2RcV8e+20Ma0/Ze487OS JiMDxnfFDwwp4dVzfuFylcYsCvmNFu6foRYRj+fLACr29CnlWNDqYECmoVD3DlZ3T047aJiJZ4cYV WRyKRRdPQ==; Received: from regular1.263xmail.com ([211.150.99.133]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cfjLh-0000Iq-Qu; Mon, 20 Feb 2017 08:29:40 +0000 Received: from mark.yao?rock-chips.com (unknown [192.168.167.224]) by regular1.263xmail.com (Postfix) with ESMTP id AA218905D; Mon, 20 Feb 2017 16:28:59 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id B04523DC; Mon, 20 Feb 2017 16:28:57 +0800 (CST) X-RL-SENDER: mark.yao@rock-chips.com X-FST-TO: airlied@linux.ie X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: mark.yao@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: yzq@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 2097632P2KO; Mon, 20 Feb 2017 16:28:59 +0800 (CST) From: Mark Yao To: David Airlie , Heiko Stuebner , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/rockchip: vop: no need wait vblank on crtc enable Date: Mon, 20 Feb 2017 16:28:52 +0800 Message-Id: <1487579332-8578-1-git-send-email-mark.yao@rock-chips.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170220_082937_127225_8D2DA78E X-CRM114-Status: UNSURE ( 6.52 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Yao MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since atomic framework, crtc enable and disable are in pairs, no need to wait vblank. Signed-off-by: Mark Yao --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 36 ----------------------------- 1 file changed, 36 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 76c79ac..8dab2af 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -900,42 +900,6 @@ static void vop_crtc_enable(struct drm_crtc *crtc) return; } - /* - * If dclk rate is zero, mean that scanout is stop, - * we don't need wait any more. - */ - if (clk_get_rate(vop->dclk)) { - /* - * Rk3288 vop timing register is immediately, when configure - * display timing on display time, may cause tearing. - * - * Vop standby will take effect at end of current frame, - * if dsp hold valid irq happen, it means standby complete. - * - * mode set: - * standby and wait complete --> |---- - * | display time - * |---- - * |---> dsp hold irq - * configure display timing --> | - * standby exit | - * | new frame start. - */ - - reinit_completion(&vop->dsp_hold_completion); - vop_dsp_hold_valid_irq_enable(vop); - - spin_lock(&vop->reg_lock); - - VOP_CTRL_SET(vop, standby, 1); - - spin_unlock(&vop->reg_lock); - - wait_for_completion(&vop->dsp_hold_completion); - - vop_dsp_hold_valid_irq_disable(vop); - } - pin_pol = BIT(DCLK_INVERT); pin_pol |= (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC) ? 0 : BIT(HSYNC_POSITIVE);