Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2762393imj; Mon, 11 Feb 2019 08:06:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IY6dT5T1EwNDYiQWLW0dHw+YYJT9OuPaqc6nX2hQ4mqEx1vjwmRnDgK2/ar/IU8k+V4VAju X-Received: by 2002:a63:2784:: with SMTP id n126mr34741691pgn.48.1549901192266; Mon, 11 Feb 2019 08:06:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901192; cv=none; d=google.com; s=arc-20160816; b=BRAtaKaJOaUlvVIfyvA6zVjiBIe/673Q9ZZrzSWz0v8zwI+ko7SZVlryEg32Ms5YUL s248WyFpfwiT7ZUy7RkXvyCnJTOtOdRL0RbL0Iri0GguCZ84cmrpkl7x1X2PvkX5LW7Y di7WfW7JKaNI944LJFW15EbY6kqdaekf9xbdoLfOFZPyQPVP/u4FeR3FzhHsFqPYlVZv ec9SrDY0Ii6FcqWvI/EmMZDs3mrSInvCw5EUA7+kbAr54enJnMqKDAcuO3QTbtOl9NYn gswjL5jXdjHUv3zeDyIZarrV/6CnTaRj/JrPE1j6rawnfynQeyqqKbX0RrH9xhkdxBMH sJ2g== 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=wmxi5tTffSvxV0rt4YXYrN6ETGwWdDwWJLiIDkAogKE=; b=eVIBDeSPKmBBtsvccZD5EnojlB6DVhvdN4X25MPUzdQ9aqW/x4jTIh4J31WKIKV+Xd BFRFoQr2Np7/IdckDkOZAgdmCz7vFCTEt4Qezf+iglN2EHngrx/k4noGZWQDUr9eoOZ0 h8jjPONpOFTsgB/bYY3IiZW6H0ZMX3JBxy6ijpIm6GOUMsRF8i8GV5Pds4HRabYgOVLm ywnMze7myR0BRF3TljzGf1CwHf3d0pkTrogmLXtaDSfrSJ0hQldamARN7AW4JGIFKYjR NkvzaA26nj4rUxAzYgvfI5l/XfGU1V3ggZY77vVOEhW50keR/J5ICap7EIaOKOOO6dWa 6GaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YxMLN1Oq; 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 e9si9798256pgk.173.2019.02.11.08.06.15; Mon, 11 Feb 2019 08:06:32 -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=YxMLN1Oq; 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 S1729874AbfBKQFN (ORCPT + 99 others); Mon, 11 Feb 2019 11:05:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:33814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728827AbfBKO1z (ORCPT ); Mon, 11 Feb 2019 09:27:55 -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 9A2AA20838; Mon, 11 Feb 2019 14:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895275; bh=JFpZy7cvcl6ckjEpNx6NcqRUdI1roiElFia8OEcgFrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YxMLN1OqixfERa8pf3vAGhpn6Ft5aGKKbFzdz3NFm5khznk5l/TSXm2VCaFWDGT6w cCPUQBC4a35gycU0wiw1Bjyn6bSBkhw7H92/pXCgimBHs/b/J2jYqohFYNfUP12rBL /AbyOqYghfdNCpYIbiBIdpN0MTUJvDw8KGEJ6r7Q= 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.20 152/352] drm/msm: dpu: Only check flush register against pending flushes Date: Mon, 11 Feb 2019 15:16:19 +0100 Message-Id: <20190211141856.364328528@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@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.20-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 84de385a9f62..60f146f02b77 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