Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1052411pxk; Mon, 31 Aug 2020 08:32:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2dxz0CfSqAsUeYuDlGH4AdWgQ5zRPKTnCAtOAsHeNuddlichdPfP4RLE26P2wNtimYfai X-Received: by 2002:a17:906:a0c5:: with SMTP id bh5mr1593517ejb.120.1598887932475; Mon, 31 Aug 2020 08:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598887932; cv=none; d=google.com; s=arc-20160816; b=A15CMVWBYjl4Dsv+vKnCtTuISj4P+osZb8RnsYAXzljJGSGfkP2WJ8lQQcmPfjjiBL aHzk8tN13qBihL+Jz2qd+pZiw9kBVNxHzjK6XdPnzdOMgbA4VqYSitwRnG9XtMEJwLXk hXU/6DiyYn3QQr+9Llxe3UFKux+S00Yf+iAu3/Fy/bo5YAaVauMASTre+tv187gZaQyj oQzuN23TYGaGI+NJ8zSnk6Yog8+M5NGiaab8itdOSUklAEQ8iMCX+qLoVLVJq9h1CG9q HVFeg3DHFyMj9ci+CdfUKL8iNEMBr8oSyRvDL9jrT90ytora4qxWE00rUWNoj7RWgvSK +HlA== 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=2yRoIppEV3JTQ+sy2qRhX1hreEVywbab+xVhh4t7rmY=; b=h2HRZRzW4nZ3HqMMqOLIaAd9li3MOW5Wrw2lz/ayYfpuYUD8ae7IlNzjmFDMkjuc5b sD9otn0NzKezsBlW7DuvXTREdjpKjl7Q/sSRipvbFJxFo3aUuGs2WvV/zm52N2tNczoU G3ys5Au6mdNw1rvA7JX9vBpYnmBNXBY677loBDfz5S9WaT+zyfYFDgEBNfljTQklMf62 xKWgbPMXdu/tEDFZIMUSmkbnxZb/bYpj5wxHDSjAItKlDkznGWJNIXxi4QQBdhs/vISg D4egWIik1hq7N5NkJyemubaaZwVKvXkEwl7NbxAMpXS0sv4shYMiyasuH7UAzKQCZIg2 zsiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=L0GnsEDV; 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 w2si5662253ejz.34.2020.08.31.08.31.49; Mon, 31 Aug 2020 08:32:12 -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=L0GnsEDV; 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 S1728706AbgHaPal (ORCPT + 99 others); Mon, 31 Aug 2020 11:30:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:39776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728629AbgHaPa0 (ORCPT ); Mon, 31 Aug 2020 11:30:26 -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 568D520936; Mon, 31 Aug 2020 15:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598887825; bh=yszDG5DcO/d96MooGEwBMQISam8ZFz0o+yX6bch3/ag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L0GnsEDVox3DXHFSF5l0q8dLVCYbOxRzCnSzhJN2iNNiOXU8XKjHatuFrwtCZY6fD E/hbFtJLtheIO9uCT6PkrpqkDZbydH+a30EGY+xRhhUZT1LHOT8JXcMOAvEAPjob8o 1p88aHtVRQBqtgGaNiNuqDYWQIspdt+RagYuOIo0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nicholas Kazlauskas , Hersen Wu , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.8 34/42] drm/amd/display: Reject overlay plane configurations in multi-display scenarios Date: Mon, 31 Aug 2020 11:29:26 -0400 Message-Id: <20200831152934.1023912-34-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831152934.1023912-1-sashal@kernel.org> References: <20200831152934.1023912-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: Nicholas Kazlauskas [ Upstream commit 168f09cdadbd547c2b202246ef9a8183da725f13 ] [Why] These aren't stable on some platform configurations when driving multiple displays, especially on higher resolution. In particular the delay in asserting p-state and validating from x86 outweights any power or performance benefit from the hardware composition. Under some configurations this will manifest itself as extreme stutter or unresponsiveness especially when combined with cursor movement. [How] Disable these for now. Exposing overlays to userspace doesn't guarantee that they'll be able to use them in any and all configurations and it's part of the DRM contract to have userspace gracefully handle validation failures when they occur. Valdiation occurs as part of DC and this in particular affects RV, so disable this in dcn10_global_validation. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c index 17d5cb422025e..8939541ad7afc 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c @@ -1213,6 +1213,7 @@ static enum dc_status dcn10_validate_global(struct dc *dc, struct dc_state *cont bool video_large = false; bool desktop_large = false; bool dcc_disabled = false; + bool mpo_enabled = false; for (i = 0; i < context->stream_count; i++) { if (context->stream_status[i].plane_count == 0) @@ -1221,6 +1222,9 @@ static enum dc_status dcn10_validate_global(struct dc *dc, struct dc_state *cont if (context->stream_status[i].plane_count > 2) return DC_FAIL_UNSUPPORTED_1; + if (context->stream_status[i].plane_count > 1) + mpo_enabled = true; + for (j = 0; j < context->stream_status[i].plane_count; j++) { struct dc_plane_state *plane = context->stream_status[i].plane_states[j]; @@ -1244,6 +1248,10 @@ static enum dc_status dcn10_validate_global(struct dc *dc, struct dc_state *cont } } + /* Disable MPO in multi-display configurations. */ + if (context->stream_count > 1 && mpo_enabled) + return DC_FAIL_UNSUPPORTED_1; + /* * Workaround: On DCN10 there is UMC issue that causes underflow when * playing 4k video on 4k desktop with video downscaled and single channel -- 2.25.1