Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2737975imj; Mon, 11 Feb 2019 07:45:29 -0800 (PST) X-Google-Smtp-Source: AHgI3IbvsQeKEr/IJIIdp6Pvu4PTFB8dAP4M567+HoOaoYSWk6yu3t8Ph35zxcA0RACNWXXlFJeT X-Received: by 2002:a63:4005:: with SMTP id n5mr6122887pga.86.1549899929730; Mon, 11 Feb 2019 07:45:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549899929; cv=none; d=google.com; s=arc-20160816; b=EP0m34adPhmEL0O9dXpEXDG/+Q2QYS1SzCzT0GpDB1SbnllyhDxOHs2JZY1QJ2wwBh wcyzBkIOlW7XwJZdC3Oa+hPf17sAZ4Ccu71V8t2/lqFasIfVZ9yd6C1StsHD/Fr8DKDS gemYfiGlVi9D96ICXH5qeKnHjXO9w5VXbMra42wuJdwgim49WeknWz0Z6INGhIxrTTHQ oCHJ/lNGTZAG+HnQG2UwI+YAM8PWgm6ZXNCwRS16RSeH5W9sA2fZzWGVILmB4yUPnVpU YBvTwwFlgG0ZJO6O3wurGDUQorcsKVzZRmgVLZUE3xab1T+Ag3FINgRxs4CV/7P6F8/k D5Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=76jz7xL79PPbk4WEDQzf+/L9EF/9Skn1Sm46Cea5vuQ=; b=C8pPnwnkmL9xhmDWD9uIHWzGgrPmhGj6qDypsuzXgBrSAvDHBPjyCgFHNxjZZwjpPo b4CVyPYvFnvQrl+3lajeoLdxs1fRMMuHzihHJaDJtTUK1GpCOqoBgTdqTPIvs0rn2ZwR /8ToKIeHiiOtNkKKEhU68ASzgtIlDX+RyQEwfxyYpLbUgkRuoPmxPA9VsA+SFEOlqTdK kHoWb6WRMEbLYAH3N58Jvf67XB1UZM6n18tnXMb8KwIt3tfl6SpeZgL+s05a7Ysj10MK 2AtQc7vu+swQ9k4VQqgJoEQ1SZ7rjRci2Fy1imGEyBpXWuTH0qomo4o29FxGfV3x2cxv wEgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TpyNNSNp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p66si10667476pfp.144.2019.02.11.07.45.13; Mon, 11 Feb 2019 07:45:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TpyNNSNp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732867AbfBKOoi (ORCPT + 99 others); Mon, 11 Feb 2019 09:44:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:57374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732192AbfBKOod (ORCPT ); Mon, 11 Feb 2019 09:44:33 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 66C152081B; Mon, 11 Feb 2019 14:44:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549896272; bh=Vh9tFSUjCo8gqVJ/Nqh93XKEoy2XcMuOsdLFBOqAp74=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TpyNNSNpPx1A03SJwd2NhHrq7WDz1eo6vCweZk+lohp5Tb21yBttkMwHDuzdqxJzZ 3K/u3czruHEQEs81ZVhPbap+oRzf12TtqjPUR8FinlLr338Z4QgB++RYgNiksFLoH0 gIzCNz6tqRjqGJ/vWjdIXwpslscI7E76ZEJwZPuE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeykumar Sankaran , Sean Paul , Rob Clark , Sasha Levin Subject: [PATCH 4.19 130/313] drm/msm: dpu: Only check flush register against pending flushes Date: Mon, 11 Feb 2019 15:16:50 +0100 Message-Id: <20190211141902.419018026@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141852.749630980@linuxfoundation.org> References: <20190211141852.749630980@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 5f79e03b1f7c1b2cf0019ce6365fe5d52629813d ] There exists a case where a flush of a plane/dma may have been triggered & started from an async commit. If that plane/dma is subsequently disabled by the next commit, the flush register will continue to hold the flush bit for the disabled plane. Since the bit remains active, pending_kickoff_cnt will never decrement and we'll miss frame_done events. This patch limits the check of flush_register to include only those bits which have been updated with the latest commit. Changes in v2: - None Reviewed-by: Jeykumar Sankaran Signed-off-by: Sean Paul Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c index 14fc7c2a6bb7..c9962a36b86b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c @@ -331,7 +331,7 @@ static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx) if (hw_ctl && hw_ctl->ops.get_flush_register) flush_register = hw_ctl->ops.get_flush_register(hw_ctl); - if (flush_register == 0) + if (!(flush_register & hw_ctl->ops.get_pending_flush(hw_ctl))) new_cnt = atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0); spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags); -- 2.19.1