Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1131810ybt; Tue, 7 Jul 2020 08:27:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7GsRUyujFCmpdiIhRgMvb/7OmFe+Dy2Mp3F7ckrw60lVwjliQZMr7Ra0cgFPUtduWRptQ X-Received: by 2002:a17:906:35cd:: with SMTP id p13mr47512544ejb.172.1594135669914; Tue, 07 Jul 2020 08:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594135669; cv=none; d=google.com; s=arc-20160816; b=wBhCzBFBig0RqUqewIoHV5CusvcHQyCKFFPgI+TU3s1DUQmMe/wx50c+NX+1sFvtvh 5AsBR6CTDX3SARXww19dpyYDK9SJxcPCi6o0VXEFQuekvUbAEPuZrpJU29ReQPbRUZZl uq5aK5v6BpGM6EpJxAWgdQLKYutSBXIN2Za6NZbAaJ4mbE0FSnqEM+3ZOOM8n3qrtkI8 rX7+2KpttxK6rCDmoeY1Tvg82qsjX6EiFxoMprwMOE5kX5I+LWHkoMdzXOOLT8J6K3vf 0krjLlBrZkR3qwBjy0ceXDsboyIqTbg+jAPmW2uugflsEOqvKgWDDnLxKzR1Wb/1gKRF F49w== 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=bO+/LyWZ/xb2sACjWuhJZEQ/R5zGP3rpNfNlw3hnxVU=; b=oVhsVTu6f/yypLk3hzECtYSMf/8lMTNNcLbyLwmxfnhKKtK1E4I7VZLQ10Mee2YL+r 6Y23H8hV6B1L/Xk4pmB1CtKpK1n/xBqG1ML0tUIBx/dThDO75f9/29cJzt5uv00n/hID 27xY/uP+XBdFaVrflJeo/pTnw7DtBPwjDNDpaeL2xwWiq0ivotju8ckv1vAJAZFGxY9G rJLLi99EoXvpwDDbcAfq3eiLnEO8NBfohq0HxBlnoicpwxkcZ4C0hu6qL8LJ2k6v7BsW FeV9MoGOrn0YY0PGirwwvPluCOymoHq1nC6QdjNYgAqZzkPJMbdA5ncMF50lHXUqovkS +QJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vBdyrbxh; 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 be23si9736787edb.163.2020.07.07.08.27.26; Tue, 07 Jul 2020 08:27:49 -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=vBdyrbxh; 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 S1728977AbgGGP0l (ORCPT + 99 others); Tue, 7 Jul 2020 11:26:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:40926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730290AbgGGP0i (ORCPT ); Tue, 7 Jul 2020 11:26:38 -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 EE0112078D; Tue, 7 Jul 2020 15:26:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594135597; bh=sQ5kSR3L5ZKqeAIZus4dlttc87HlpU80DJf60vHzsTM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vBdyrbxhteWya/yLhKtt5tqzMtT/tREAQjWuosSSXhMROGRMl4jOT8gH8bf3UgNAJ 80bZLuCHnekReoNSVWt00EpiJpfFEbBbYp5pihFvCvouvsyp/z2Gli8in6tu3SfSIR qnTYILyH1OLVI5okXywHVCd1tLs26BNOI48xm6Rc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Kazlauskas , Alex Deucher , Roman Li Subject: [PATCH 5.7 104/112] drm/amd/display: Only revalidate bandwidth on medium and fast updates Date: Tue, 7 Jul 2020 17:17:49 +0200 Message-Id: <20200707145805.920250048@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200707145800.925304888@linuxfoundation.org> References: <20200707145800.925304888@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: Nicholas Kazlauskas commit 6eb3cf2e06d22b2b08e6b0ab48cb9c05a8e1a107 upstream. [Why] Changes that are fast don't require updating DLG parameters making this call unnecessary. Considering this is an expensive call it should not be done on every flip. DML touches clocks, p-state support, DLG params and a few other DC internal flags and these aren't expected during fast. A hang has been reported with this change when called on every flip which suggests that modifying these fields is not recommended behavior on fast updates. [How] Guard the validation to only happen if update type isn't FAST. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1191 Fixes: a24eaa5c51255b ("drm/amd/display: Revalidate bandwidth before commiting DC updates") Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Roman Li Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/core/dc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -2533,10 +2533,12 @@ void dc_commit_updates_for_stream(struct copy_stream_update_to_stream(dc, context, stream, stream_update); - if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) { - DC_ERROR("Mode validation failed for stream update!\n"); - dc_release_state(context); - return; + if (update_type > UPDATE_TYPE_FAST) { + if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) { + DC_ERROR("Mode validation failed for stream update!\n"); + dc_release_state(context); + return; + } } commit_planes_for_stream(