Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2282429ybl; Thu, 19 Dec 2019 10:58:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwOQuHl6mQhc5NcgRkCYPK5JTok8XIhA9mxoGFyHSRdheNhTLqa629eUgrEHs3+Ug/HMBmF X-Received: by 2002:a05:6830:10d7:: with SMTP id z23mr10350217oto.114.1576781928041; Thu, 19 Dec 2019 10:58:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781928; cv=none; d=google.com; s=arc-20160816; b=WjEZxfa1dRNbB4cDxrlm9sAE7vV5kVE7SBldI5MaB4NN2MQmni7sP7cSgobs3CSRUh rD7vKt0X0Buk1vNHggAWJkPm1AZuPoHhHF0OWrT0rdVwPkMX7G6KZSbjNC9PQoO9B517 RLBJdsSDRgWYSySX6Icfv+Qr/JmlKotsmb7I5IYDweNo7PYg7u7ZVOHEGALl+I/Xk8kX LqLIVHf89mWF+botX8vxYEzBTTO95U+FvaLfA9RLpsQRl9pcKZcCN7elUJDTsg8iqAnX VOPH8s8lX34gHvxo4cny3CEAVFL0VxU2x+N/kjmnzmKcZUROvyEvdU4keBDuLbMXiC7q p65w== 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=Wfs8C8GhLBd+6EUJ46Sy1Vug+kufxQUcYRuRKX10WTw=; b=CGCT0AHpuSfV1aUbdjYoVWo05cDwY+v6/iYGKvWkA9JLz7tKxpTvYw9aM8UEzVAV7y uP6GiuqZ1pAY0drkO/lRBp6NlfEA88B51RtcAGB2kr+cU7b5ObFSZ3z/OMgsT+lZsNYZ ncQ9j7AXx5jVPyL8F/8Im7o4ve6RcCGLkcQuqy3GR74jM6qaGDpp0Bb/tPDtH9nKT6q3 7NEBSpFb7mr02W0NLJu8jpXjTVbBGd7TPmSql2tPnnqJ8vL+v8CFGrfnstvkoL61ooGK Vz7QuOeIace6TNhj90RSg4J9UCILj71txKg8jYPUgGf2PmlO3dh58WhsrPFBwy4QdGlr udzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="y+Ii/Kn4"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6si3629273oiy.116.2019.12.19.10.58.35; Thu, 19 Dec 2019 10:58:48 -0800 (PST) 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="y+Ii/Kn4"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730498AbfLSS5f (ORCPT + 99 others); Thu, 19 Dec 2019 13:57:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:52308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730470AbfLSS4A (ORCPT ); Thu, 19 Dec 2019 13:56:00 -0500 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 18FC5206EC; Thu, 19 Dec 2019 18:55:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781759; bh=ziShp+8CXKXiSUANFpqSVBSkVhPf9J2ROseHKxsZvNI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y+Ii/Kn4ef+KhgE9v8cNZyqj/RwuiWBZHXEG74S6fuCtkT7/aGbwS3kZS0p5S05Vt bMk5OHW+sl2Eqx3AP/ReCdSB8LjgXsTrZhPsbjilG1dtbSs4X9JnjwtfCCdV0TV6jf T7mOySTCXqkHRDPqIr1jnhqJ76gw44N5UqptbNd4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lyude Paul , Ben Skeggs , Daniel Vetter , David Airlie , Jerry Zuo , Harry Wentland , Juston Li , Sam Ravnborg , Sean Paul Subject: [PATCH 5.4 68/80] drm/nouveau/kms/nv50-: Limit MST BPC to 8 Date: Thu, 19 Dec 2019 19:35:00 +0100 Message-Id: <20191219183139.213169231@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183031.278083125@linuxfoundation.org> References: <20191219183031.278083125@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: Lyude Paul commit ae5769d4670982bc483885b120b557a9ffd57527 upstream. Noticed this while working on some unrelated CRC stuff. Currently, userspace has very little support for BPCs higher than 8. While this doesn't matter for most things, on MST topologies we need to be careful about ensuring that we do our best to make any given display configuration fit within the bandwidth restraints of the topology, since otherwise less people's monitor configurations will work. Allowing for BPC settings higher than 8 dramatically increases the required bandwidth for displays in most configurations, and consequently makes it a lot less likely that said display configurations will pass the atomic check. In the future we want to fix this correctly by making it so that we adjust the bpp for each display in a topology to be as high as possible, while making sure to lower the bpp of each display in the event that we run out of bandwidth and need to rerun our atomic check. But for now, follow the behavior that both i915 and amdgpu are sticking to. Signed-off-by: Lyude Paul Fixes: 232c9eec417a ("drm/nouveau: Use atomic VCPI helpers for MST") Cc: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li Cc: Sam Ravnborg Cc: Sean Paul Cc: # v5.1+ Signed-off-by: Ben Skeggs Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -798,7 +798,14 @@ nv50_msto_atomic_check(struct drm_encode if (!state->duplicated) { const int clock = crtc_state->adjusted_mode.clock; - asyh->or.bpc = connector->display_info.bpc; + /* + * XXX: Since we don't use HDR in userspace quite yet, limit + * the bpc to 8 to save bandwidth on the topology. In the + * future, we'll want to properly fix this by dynamically + * selecting the highest possible bpc that would fit in the + * topology + */ + asyh->or.bpc = min(connector->display_info.bpc, 8U); asyh->dp.pbn = drm_dp_calc_pbn_mode(clock, asyh->or.bpc * 3); }