From patchwork Wed Apr 6 10:14:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 8760561 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BEEC89F36E for ; Wed, 6 Apr 2016 10:17:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03648201D3 for ; Wed, 6 Apr 2016 10:17:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0A6C8201BB for ; Wed, 6 Apr 2016 10:17:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ankV3-0000FE-Vl; Wed, 06 Apr 2016 10:15:49 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ankV0-0000D3-74; Wed, 06 Apr 2016 10:15:47 +0000 Received: by mail-wm0-x243.google.com with SMTP id n3so11780822wmn.1; Wed, 06 Apr 2016 03:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=AbWc0PaQbYw1et4qH1dI41CBk4LNEZL7PcFPSHMWfD0=; b=w9zdSNZHIhklo5fygqo0FySwWhU782mL7kDduSsqLeegSlp/BEvZf9S3SvfzOEZyIT C5+Z7ruHqByZCM/DlmabvikpAgsp5ZSxBE2T+2nOE5ttYuw4Evtn7MwxnDfNkHdsGDtQ CgfYVSQpi12NgvJs5ROg1uLJ0YF0584k6miop2wD6YAXH6mQNIOkTSE979SJD9hLpzPW DsNsls/ONdecGk5TBMkrkEUDAMfbbRhCfN9Gcw4V8uyeiRffL6F2hW02uRTzMR7ykGYv W0hcKyVySNYsZ1yna88jVubDyGU7o/FNpj1aLsxwErIRpiq2A+zVYn0aov+pd9dYsJyD Vb1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=AbWc0PaQbYw1et4qH1dI41CBk4LNEZL7PcFPSHMWfD0=; b=C8u7pNvtmJETvjTahtGNlY4ZwgEpovEvHbGSukIAAgSna2Fhq8hrYaki56pI4FtzU8 2++72AT/A2PI5viBZ6f5CBs14TxGCPySTcKSF7hqVAPPV4qxzxnE+ewgL0oDFXzBdvRt SBsAGp8OHXPAXv3BJEOHzLZDp9dfuixXrJX/35n5dLyUgTyEjfPoDxor9y4Q2cQ4j32K rN0fz0shCHXxTgqf+Dh27DUF0qOb7KwSOnHnB/PkglCEldI9waavD0FsB5awG93tj4Qb E66uRPM/1GUAxdj3Mueb0xiWasteKreLAk8IemcqmRxfClna5lNnwL+LwObwa3bZ5r5t 08vw== X-Gm-Message-State: AD7BkJIWn8k7d7bV6koqJNQLB7Nv94Oby6mUxw6MklbN0ywrbtJkAkjda88XJXbo2Qj0TQ== X-Received: by 10.194.77.15 with SMTP id o15mr36356947wjw.41.1459937724418; Wed, 06 Apr 2016 03:15:24 -0700 (PDT) Received: from cizrna.lan ([109.72.12.179]) by smtp.gmail.com with ESMTPSA id jk1sm2449545wjb.27.2016.04.06.03.15.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Apr 2016 03:15:23 -0700 (PDT) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Subject: [PATCH 1/2] drm/rockchip: vop: Do check if an update is pending during disable Date: Wed, 6 Apr 2016 12:14:45 +0200 Message-Id: <1459937686-9142-1-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.5.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160406_031546_440625_75F0D17B X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Tomeu Vizoso , David Airlie , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, 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-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When a plane is being disabled but it's still enabled, do check if the previous update has been completed by reading yrgb_mst back. Otherwise, pending pageflips would remain pending after a CRTC is disabled. Signed-off-by: Tomeu Vizoso --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index a9b1e8b5ac85..f46b1fd1887b 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1064,8 +1064,9 @@ static bool vop_win_pending_is_complete(struct vop_win *vop_win) struct vop_plane_state *state = to_vop_plane_state(plane->state); dma_addr_t yrgb_mst; - if (!state->enable) - return VOP_WIN_GET(vop_win->vop, vop_win->data, enable) == 0; + if (!state->enable && + VOP_WIN_GET(vop_win->vop, vop_win->data, enable) == 0) + return true; yrgb_mst = VOP_WIN_GET_YRGBADDR(vop_win->vop, vop_win->data);