From patchwork Fri Jun 19 14:30:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 223940 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,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 A81E1C433E1 for ; Fri, 19 Jun 2020 15:56:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D29E20809 for ; Fri, 19 Jun 2020 15:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592582161; bh=7IiQDXdq9Z5dE9WWdDCDCvrJ4FHOUElT9vMdc58iVhs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gRkXrfjILnGa8YJ25ui/Ge+1raFoChWvi5z4TMF8Dwm8TODo+N6VhRx0fzTimhH1q A1gUsoW9wubBWSk9QOY7tvvLSXDGk6WrSFltzIzQFOuKHDHBVZIIbQEgtSI/EIx3cg C9sHqHzyuHAdQ+2v7dAfn/K3egJ/a6A3JZoG5Xtc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392517AbgFSPVJ (ORCPT ); Fri, 19 Jun 2020 11:21:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:52444 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392812AbgFSPVH (ORCPT ); Fri, 19 Jun 2020 11:21:07 -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 D839320706; Fri, 19 Jun 2020 15:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592580066; bh=7IiQDXdq9Z5dE9WWdDCDCvrJ4FHOUElT9vMdc58iVhs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nqlq7OCvT3RA2ndRYvkBrNrCCIjKgvp0+uu1FozrZU/Zd4JQFwR+GcVQlpHexldSA OzVIBD0t5U4lW6i/N34vJfvqhG2SbR7Mww/wxILB9K4KiNGlrsA22KvExLF2XCSkuc erRiNpwp7tv7NbfiBEcziUxEgq4IRkgySkdjjc28= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dale Zhao , Sung Lee , Yongqiang Sun , Rodrigo Siqueira , Alex Deucher , Sasha Levin Subject: [PATCH 5.7 108/376] drm/amd/display: Correct updating logic of dcn21s pipe VM flags Date: Fri, 19 Jun 2020 16:30:26 +0200 Message-Id: <20200619141715.458435986@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141710.350494719@linuxfoundation.org> References: <20200619141710.350494719@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: Dale Zhao [ Upstream commit 2a28fe92220a116735ef45939b7edcfee83cc6b0 ] [Why]: Renoir's pipe VM flags are not correctly updated if pipe strategy has changed during some scenarios. It will result in watermarks mistakenly calculation, thus underflow and garbage appear. [How]: Correctly update pipe VM flags to pipes which have been populated. Signed-off-by: Dale Zhao Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c index a721bb401ef0..6d1736cf5c12 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c @@ -1694,12 +1694,8 @@ static int dcn21_populate_dml_pipes_from_context( { uint32_t pipe_cnt = dcn20_populate_dml_pipes_from_context(dc, context, pipes); int i; - struct resource_context *res_ctx = &context->res_ctx; - for (i = 0; i < dc->res_pool->pipe_count; i++) { - - if (!res_ctx->pipe_ctx[i].stream) - continue; + for (i = 0; i < pipe_cnt; i++) { pipes[i].pipe.src.hostvm = 1; pipes[i].pipe.src.gpuvm = 1;