Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp114327ybg; Mon, 8 Jun 2020 18:01:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZZJ5A2L6dfy+bpLiJ6V83MyY178h6XI5+EUqd9WLYwnwidQlErY906xbxFpicixKb7siq X-Received: by 2002:a17:906:f745:: with SMTP id jp5mr16648965ejb.440.1591664464660; Mon, 08 Jun 2020 18:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591664464; cv=none; d=google.com; s=arc-20160816; b=Pm+Reg/GZMQ5PEZ2olAmGIui4n2c60LnLmlXrRIPlW+ufXgL47Ez6KRxNxmtOkpk6l GKAF6fU7+S71Ka4yTYJQhwY0P8zMjeOpXu80InIVAnTfOe6vfKyKklWuvU4TKMP8myDz 7hUYajifFsLuXDixS6Kunpu5NHw3qV6Eo6TgeRUyJY6d53SHEDeDbp4LR0+oXCiel9Tr cz4d+ruNtehfYbaoWer50xMPoPJD9taq8ioOquu+THkjd1KsqE/UgvQ+yybevoA7Vad7 d4rqFFK1I8ufji2/QVvO4SBZKKUfVa8YqBAV1YZf/mfAfHNNwErV1FQKLO6aIllXkxau jOGQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k975XLviqLxEJV21rB2JuUoZsP9OdFqZJO9GSHAgYBc=; b=GErXq9YbsRR1+PSVnwwn4Kqz3WLUrvLN03Qql+EGZSUuZALaebkW2b3i4E4Gv//ybK jo5RQaPaj9U9Gn/okFtFlFLQk+TfK6oBR33LSZXVPnPQwzQQI01ruJSINjEX/UzFMrkx JQ/gzIkZZJXp62RIvMDYJY0I4WM1IghwMVdCuPZ/IZmZXIeFfdgFZsFU3ECWp6G/4D0b hA8gOTWvG76MSOxqdE6ejXZWZJc6jzqJrxkUjAvbBVo7LNpU9V7ESXuW0ULYvoLHN4PW pFGWVKbOi6K6yZDc7AC4vn+GkaCPXHx0bwidqvqCdFzJ+lA5+cIukLU0ewKT6GPtz+hR LXSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f4Lj95gh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si9662507ejx.370.2020.06.08.18.00.41; Mon, 08 Jun 2020 18:01:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f4Lj95gh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728787AbgFIA64 (ORCPT + 99 others); Mon, 8 Jun 2020 20:58:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:54182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728235AbgFHXIn (ORCPT ); Mon, 8 Jun 2020 19:08:43 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A7FD920890; Mon, 8 Jun 2020 23:08:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657723; bh=7IiQDXdq9Z5dE9WWdDCDCvrJ4FHOUElT9vMdc58iVhs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f4Lj95ghCpXTJQqlfuuZHf7dryN6Fo+aQ3BoWQTVM5Dv+ueDnAckKCN1EMlR2uG8l ulVrJsFgu0Y8+gbMSc6EpvyVRuK9wPJ0prj3LJuWjl47SedX5yKLQxaRTyzBg0naWU ZN/wFuOgq+YxXqA+5pd5RskMRDXnb86qP5eAxNto= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dale Zhao , Sung Lee , Yongqiang Sun , Rodrigo Siqueira , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.7 116/274] drm/amd/display: Correct updating logic of dcn21's pipe VM flags Date: Mon, 8 Jun 2020 19:03:29 -0400 Message-Id: <20200608230607.3361041-116-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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; -- 2.25.1