Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp855678ybt; Fri, 19 Jun 2020 15:58:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAzXXo31Zvlqd/fXoX8rBAN/mhkhXu7wv34YuYhioe0E8I7h0SuU7Dc1u/OH7AW9/ElDCB X-Received: by 2002:a50:d0dc:: with SMTP id g28mr5706571edf.71.1592607530781; Fri, 19 Jun 2020 15:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592607530; cv=none; d=google.com; s=arc-20160816; b=blrqvJYgZIEe33oGh5+cIguToEddn8SEl3SbEgIImMOAVJcL6NL2IDWBLOZzEtivom zmvJ6r1I9O4faHoeQaUSgEvjzjcoEJOZ+Gr/fg/qN8wr/Ve4pKGCOD4EV3+dZir7kA/w QxRH3KVBfnO+RbaC0KNWGMz25ag+oDzSSy14tVFjpLxRnta6jRtxdXX1FNJ6R2Cio57d 725Op1Ae5ahOUNA1Uy+D97xwfmdFdYu3ZlWLpILPiwK9+TyEDbJrvOhH4nUKCvRc6ROw P4wC0blvSs6ZeHzwKHfqMTbV3tit1DVasRPn6lbOOlyeoN84V80Va4y+dwz+vVim7QvQ VF2A== 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=21bGwgUgyGjcXUDCEEnfm2sPmOwEOVARmNYBIt3UeLk=; b=fcQSPnkqbftiUW4mhn1mq/CfhFFC0AkXPhvvLbptfUpoSqfIrKdJ/bcJT6GFAm55If gKmFUPrtnC6qIQmvQjGqEV6NCm+x3HMsfKmlb0nObzVgFMd76Y0K19QjowMLbl4gfSXh NXs0GUBr7KOsQvphL+SMYdBLsZ3WQwQLne5usYzvez7InPUNG8b34xTeYmQRNhpRPavf 8b8sriedLS/a/yuZTdn5seMqunIOyDs2uBSQvOkApsogv3L4eqtEhNSGx8reYBCJAYNF MSnTJeGk0M4GyShCGVj001uh131eO/53zft5IazbnO2R+kV6yiZzfnbe+DJRocyfVTsq pEtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CbXxg+07; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lx2si4425028ejb.284.2020.06.19.15.58.29; Fri, 19 Jun 2020 15:58:50 -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=CbXxg+07; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392853AbgFSPZj (ORCPT + 99 others); Fri, 19 Jun 2020 11:25:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:54368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393080AbgFSPWx (ORCPT ); Fri, 19 Jun 2020 11:22:53 -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 A0A6B21582; Fri, 19 Jun 2020 15:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592580172; bh=56mqz//yRO8dwLkzCXAUJh+8sRp/R6L45fiWOsiVU5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CbXxg+07iGEUP+1aA0fTQK221ko6RKYC5E3GzITulcavkBxazNgUIfAxRbBOcvsSo al7t6i653kzLO//iH650nRhYOHMDSeLO0bKQ1b+nLkXyJ7d8MSs6lM+4HUzPnkwb4R 9w8mzvDG+HeYiVda29DKThBAW7u/Xd6gU2qbT4Y4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sung Lee , Yongqiang Sun , Aurabindo Pillai , Alex Deucher , Sasha Levin Subject: [PATCH 5.7 119/376] drm/amd/display: Do not disable pipe split if mode is not supported Date: Fri, 19 Jun 2020 16:30:37 +0200 Message-Id: <20200619141715.978900903@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 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 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