Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3096855ybi; Thu, 18 Jul 2019 20:58:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNgStPgF8umLbe3BhEtv/I+PykytjjrBnqhbYcx5cB651dF6ht/fRnehtEWFYpbQy54sTc X-Received: by 2002:a17:90b:95:: with SMTP id bb21mr55759459pjb.8.1563508714743; Thu, 18 Jul 2019 20:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563508714; cv=none; d=google.com; s=arc-20160816; b=Y91nKi/u5aZ+wT3VKTwxaKNz0RyPB3OwxrJfjkLyhwPdA4VBByfrwCZQpnU9CXXAf0 YkpAtl3CLKXAgg0myPVIoj/8HkMr3A7DAW+GD5tg8YV5iGac925yNF/c3GcQYotOIPaI xjZzLmbHOkT2m7DP7npmQewFsvVyAaIFyRZCGaqDpi461Y44yot4pcXlHvjSKnpzfP4V 8EKc0z+fDVBeSRPRNLQsF7aXfjJrF1JSShWRnjTTAsUeAOrmRdH1c3YT0wOF9CM/H1u8 fFnYusQSVHK5WK2IZzJmoq8iVESJEy6LCtRdsXUHpfrWq8w0jLpUOovxIt37yj23g7q4 lW8g== 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=gzcv/TBfnzvniuCsFGENaDAVv6AoMgKAEcAbCvovSF4=; b=qIWcgvTqw2WSt4tJbd/PvJroQcylBf8SNp0IDABY3aB12ibC1PZmZOzETiQ6bV4yVS cMjn/GFe6XfZrY9m2lkOetF2rMC2g3LUQZTcDYD73nSCRqLSmQRf3LPxhKQTOAaAMl7S hLxzWzDKu4/g8wIUF4xllixJf8vdsYBiJQ3SUmGL+Ks6ImfR9YXcgLm6a+Q8HjQWt5Dm EoPkFC9bZbueMyYwNn9lyZFXn+wPPma0nI3/nAT2/4oa19tN/PgkaR9xiWYsO/ykFYzt LvVCGQFEsxtSZBJRX3mkmWLwy/SWk2gkb160uGntJQxqlt6qIs0xdBAhBptG+Zu5hPpS ljuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ovkiMuWl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id h9si524710pgp.435.2019.07.18.20.58.19; Thu, 18 Jul 2019 20:58:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ovkiMuWl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727390AbfGSD5e (ORCPT + 99 others); Thu, 18 Jul 2019 23:57:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:56760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727356AbfGSD5c (ORCPT ); Thu, 18 Jul 2019 23:57:32 -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 C8EE921852; Fri, 19 Jul 2019 03:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508650; bh=oZq74vOU69k95kJgkuxq8/TZXIrComA3tcoACkgcGz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ovkiMuWlOdx5taxJj1PjkknHXxKMKOTShefC/J+8Mua4jfONv4lTcyAPDJiliyB4W zm4XpktlqWDPZ5+6KCNlMKTriBLaWGv8/w+mMG16h2+XHAQxLChys5DhCXSlGUa7es zdJKDnKWu6BWvRct4g0AyfH0p8+rkmoOjQLQmN1Q= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Anthony Koo , Aric Cyr , Bhawanpreet Lakha , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.2 019/171] drm/amd/display: fix multi display seamless boot case Date: Thu, 18 Jul 2019 23:54:10 -0400 Message-Id: <20190719035643.14300-19-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-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: Anthony Koo [ Upstream commit 4cd75ff096f4ef49c343093b52a952f27aba7796 ] [Why] There is a scenario that causes eDP to become blank if there are multiple displays connected, and the external display is set as the primary display such that the first flip comes to the external display. In this scenario, we call our optimize function before the eDP even has a chance to flip. [How] There is a check that prevents bandwidth optimize from occurring before first flip is complete on the seamless boot display. But actually it assumed the seamless boot display is the first one to flip. But in this scenario it is not. Modify the check to ensure the steam with the seamless boot flag set is the one that has completed the first flip. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 18c775a950cc..ee6b646180b6 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -1138,9 +1138,6 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c const struct dc_link *link = context->streams[i]->link; struct dc_stream_status *status; - if (context->streams[i]->apply_seamless_boot_optimization) - context->streams[i]->apply_seamless_boot_optimization = false; - if (!context->streams[i]->mode_changed) continue; @@ -1792,10 +1789,15 @@ static void commit_planes_for_stream(struct dc *dc, if (dc->optimize_seamless_boot && surface_count > 0) { /* Optimize seamless boot flag keeps clocks and watermarks high until * first flip. After first flip, optimization is required to lower - * bandwidth. + * bandwidth. Important to note that it is expected UEFI will + * only light up a single display on POST, therefore we only expect + * one stream with seamless boot flag set. */ - dc->optimize_seamless_boot = false; - dc->optimized_required = true; + if (stream->apply_seamless_boot_optimization) { + stream->apply_seamless_boot_optimization = false; + dc->optimize_seamless_boot = false; + dc->optimized_required = true; + } } if (update_type == UPDATE_TYPE_FULL && !dc->optimize_seamless_boot) { -- 2.20.1