Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp113102ybg; Mon, 8 Jun 2020 17:58:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJsgtzQuDkvjE41UKiaqmU3HTuCaGEGTz2ZX9jLQ1UyRG2cAabyoAnRgY4rrru8apmSJ47 X-Received: by 2002:a05:6402:22b3:: with SMTP id cx19mr23983464edb.329.1591664338819; Mon, 08 Jun 2020 17:58:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591664338; cv=none; d=google.com; s=arc-20160816; b=jLfM+Mvmlsu+A1nPz/cRkHt5vUG9zahvr83A+qb9HbOvgcmAx9d8lpkqiPMYykPu3L nYQJerLAyQCWAy+d9R6kJsLN2t78PCbBKHkiaDWflPMXPJqFdi2XUoC82IciLal6nKg/ BiHFo2oJrA33sDOqSE1/iCLloX3fUpwKb2mUSuP2TXmEnaxs5ohTU6N83rl5VfK8zKJS eRZ7VUWSyR815m1juMekhXCNh8lX13H1AicdNLL/lvdUOTF8k3bSTqf4ssOqzKJi5S53 HqOPlYF3JZrDeGRfpCsSoF9XFt755XrDaDf0O4Yp9HY78Mxdgt2xL+vO73iStvSE7WZc /Sog== 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=21bGwgUgyGjcXUDCEEnfm2sPmOwEOVARmNYBIt3UeLk=; b=0kf8VK4uPMjhvZEiIMxVQ+HwvcHLmaUF4AnXqmxwa2N59AzBNr8dpPqXWV5gE2wBNA lRKGHqjI+EDx2fq4ild3CDEiHnobPzGmwUXJRAyxuhPPOAjmqonobH2xMCaBCMoqE545 uPEeuxHVcTpxniTV61zQ02dI2RDMcbrAgAkNeHLg5HmdpAzpvKW0xov7BxTkRjHG1iuD yZZllcgUCB/MlTz20Swf+LXcc3CRQYW3qzYxOi2K/UNEJGllZkdV/ezte+YSTMYEPi1M XwVKfyiA9njCjadeOhDbObUKNy80S0tGpe1eJmrmjLZC+cbRdJa9w1vKO/odgO9GPDg4 s2iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DYpRls70; 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 cb1si9543919ejb.42.2020.06.08.17.58.35; Mon, 08 Jun 2020 17:58:58 -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=DYpRls70; 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 S2388051AbgFIA45 (ORCPT + 99 others); Mon, 8 Jun 2020 20:56:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:54528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728299AbgFHXI6 (ORCPT ); Mon, 8 Jun 2020 19:08:58 -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 AADB420890; Mon, 8 Jun 2020 23:08:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657737; bh=56mqz//yRO8dwLkzCXAUJh+8sRp/R6L45fiWOsiVU5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DYpRls70DT4exOyzW+8GaI0GVzFWbv2pKHTt5a+m25+SLHp8YsO8cPVyYD5c3s8gB Jh0BSj/JxBiZpizdeZlrg6zphDUI7DWpI28QbJScrGjoI3P2rrPNjLvqjb8swpnHVu i2vE6sLJ8XephzYekPp7lc47qIbxi/4kXbh1f/LY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sung Lee , Yongqiang Sun , Aurabindo Pillai , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.7 127/274] drm/amd/display: Do not disable pipe split if mode is not supported Date: Mon, 8 Jun 2020 19:03:40 -0400 Message-Id: <20200608230607.3361041-127-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: Sung Lee [ Upstream commit 1dfedb39d38f813357885e19badd1971c17f79a7 ] [WHY] If mode is not supported, pipe split should not be disabled. This may cause more modes to fail. [HOW] Check for mode support before disabling pipe split. This commit was previously reverted as it was thought to have problems, but those issues have been resolved. Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index e4348e3b6389..2719cdecc1cb 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -2597,19 +2597,24 @@ int dcn20_validate_apply_pipe_split_flags( /* Avoid split loop looks for lowest voltage level that allows most unsplit pipes possible */ if (avoid_split) { + int max_mpc_comb = context->bw_ctx.dml.vba.maxMpcComb; + for (i = 0, pipe_idx = 0; i < dc->res_pool->pipe_count; i++) { if (!context->res_ctx.pipe_ctx[i].stream) continue; for (vlevel_split = vlevel; vlevel <= context->bw_ctx.dml.soc.num_states; vlevel++) - if (context->bw_ctx.dml.vba.NoOfDPP[vlevel][0][pipe_idx] == 1) + if (context->bw_ctx.dml.vba.NoOfDPP[vlevel][0][pipe_idx] == 1 && + context->bw_ctx.dml.vba.ModeSupport[vlevel][0]) break; /* Impossible to not split this pipe */ if (vlevel > context->bw_ctx.dml.soc.num_states) vlevel = vlevel_split; + else + max_mpc_comb = 0; pipe_idx++; } - context->bw_ctx.dml.vba.maxMpcComb = 0; + context->bw_ctx.dml.vba.maxMpcComb = max_mpc_comb; } /* Split loop sets which pipe should be split based on dml outputs and dc flags */ -- 2.25.1