From patchwork Tue May 26 18:53:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 225346 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47A95C433E1 for ; Tue, 26 May 2020 19:12:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24672208DB for ; Tue, 26 May 2020 19:12:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590520367; bh=mRhGw7qR37r16r1P8tKnMThQNVCj3v9b08mSdxj9QVw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=AyJKa+hnB74cjbmbpHrpFw1q1JubIm25rqiiWnVb8V/xTgz+YaDAsJdzD3KnZTw1l EaFj3ZvAJ6rglurXB6FeLMnmnDvNX9mv/QQDyjLNsZXKv01PRwlMLjhGUxOK3/b2W5 nmk8wnHOCTAnW92aiNZ8rUBY7GldK94P3FeJmrI4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392112AbgEZTMq (ORCPT ); Tue, 26 May 2020 15:12:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:42362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392120AbgEZTMo (ORCPT ); Tue, 26 May 2020 15:12:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 E1D2E20888; Tue, 26 May 2020 19:12:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590520364; bh=mRhGw7qR37r16r1P8tKnMThQNVCj3v9b08mSdxj9QVw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VJsRYzAHsSAyv2RkEueQuJhihezuf0K/VUdhFwZp2G2fj71q0uOz3YmReskcMFzlf lurQdBf3ldjlNzjIf2AzqbLLu28D7YeNKfeFF7qXx1Fz7XQ+W3iuuMQ/v80I2B8d2M DFGMQTSwmJ7OQdL2TJsXXjM8JdHyglUjxFJ0m5Tc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Roman Li , Zhan Liu , Aurabindo Pillai , Alex Deucher , Sasha Levin Subject: [PATCH 5.6 050/126] drm/amd/display: fix counter in wait_for_no_pipes_pending Date: Tue, 26 May 2020 20:53:07 +0200 Message-Id: <20200526183942.236469362@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200526183937.471379031@linuxfoundation.org> References: <20200526183937.471379031@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Roman Li [ Upstream commit 80797dd6f1a525d1160c463d6a9f9d29af182cbb ] [Why] Wait counter is not being reset for each pipe. [How] Move counter reset into pipe loop scope. Signed-off-by: Roman Li Reviewed-by: Zhan Liu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 188e51600070..b3987124183a 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -803,11 +803,10 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context) static void wait_for_no_pipes_pending(struct dc *dc, struct dc_state *context) { int i; - int count = 0; - struct pipe_ctx *pipe; PERF_TRACE(); for (i = 0; i < MAX_PIPES; i++) { - pipe = &context->res_ctx.pipe_ctx[i]; + int count = 0; + struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; if (!pipe->plane_state) continue;