Received: by 10.223.176.5 with SMTP id f5csp1046459wra; Fri, 2 Feb 2018 10:14:00 -0800 (PST) X-Google-Smtp-Source: AH8x227yj2qz+lJIpuymaWYiHdQDsIWHR+H3rHLWlAdPDxPuuuglriPwrIyQ1HxG5Xnfckzvo4LC X-Received: by 10.98.153.2 with SMTP id d2mr41536844pfe.44.1517595240140; Fri, 02 Feb 2018 10:14:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517595240; cv=none; d=google.com; s=arc-20160816; b=PCQ+glpmynMlfTc7uN4seLWJeAJu3eR1f0zsB/vUxoyG0x3xip7+081Lia15H1Zys7 l7dRBxPH/NjO8BR9rj9EBPkWhwCF7Vjm4y6KXy3jGH+i/2hjvyClSqO1qyH/aQC9xeAR vOOyEzFgMCLWbB1HMGhr3v+Qi+WPd9DV7g9Vnp1Y476h+KDMBUlKV6qoM+z9Clg3qi9c 7tyOEWhy4/p5AZkGFm7QblGvyQuki7tYFGk5FElPszBJxy54l5ROuHIDa0/113BoKtF7 53jUCp0UUDVGuz2+hM7JXkal4p+BuYqyPKXWWnPtl9nTQPBAa2IjshH0REoSk+595WhE rFNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=aHq5udxkgcQbbPyVlwSnX8jJBC3qqMrKh+RmtpvttGI=; b=l2QRDjhef4qqNU1xYya8cxJN8bKWBY68M+JJ741uQvIOTxVsjzsyiArBP6aAbqRh6c 4I3Y5sNzjbmpRJXe04RQh37mTNAm3VRjAEVlvOEHldLC4vXRlfxm48nS3Uwc1t3HCtqo PPadlZ51iYGLwOKCDsOKOGVtneX3/PALFJvr1OzTuObgD7NeqFiP8tV0H6wFSjWRmFY7 dLnkz0YCzCcAH6R+Ojw/hzB10v2Joh7WQRKrwIkIPBA+I5S8rtayP2OAk76+8izbBi6+ ORQ3YPyU9RnLIQkkZCWpm+xXEwNj7VUPuxyIyyEKMzhRNSaf4NMgBkNE+flurU2xnd1C Kjmg== ARC-Authentication-Results: i=1; mx.google.com; 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 v184si18595pgb.832.2018.02.02.10.13.45; Fri, 02 Feb 2018 10:14:00 -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; 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 S1753825AbeBBSMl (ORCPT + 99 others); Fri, 2 Feb 2018 13:12:41 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36854 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751958AbeBBRGp (ORCPT ); Fri, 2 Feb 2018 12:06:45 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id DAA29E3B; Fri, 2 Feb 2018 17:06:43 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Philipp Zabel , Andrzej Hajda , Andrey Gusakov , Sasha Levin Subject: [PATCH 4.9 54/86] drm/bridge: tc358767: do no fail on hi-res displays Date: Fri, 2 Feb 2018 17:58:14 +0100 Message-Id: <20180202140827.266152758@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140822.679101338@linuxfoundation.org> References: <20180202140822.679101338@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrey Gusakov [ Upstream commit cffd2b16c01c3431a7a7dd62e722af33490fc436 ] Do not fail data rates higher than 2.7 and more than 2 lanes. Try to fall back to 2.7Gbps and 2 lanes. Acked-by: Philipp Zabel Reviewed-by: Andrzej Hajda Signed-off-by: Andrey Gusakov Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-2-git-send-email-andrey.gusakov@cogentembedded.com Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/bridge/tc358767.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -603,8 +603,15 @@ static int tc_get_display_props(struct t ret = drm_dp_link_probe(&tc->aux, &tc->link.base); if (ret < 0) goto err_dpcd_read; - if ((tc->link.base.rate != 162000) && (tc->link.base.rate != 270000)) - goto err_dpcd_inval; + if (tc->link.base.rate != 162000 && tc->link.base.rate != 270000) { + dev_dbg(tc->dev, "Falling to 2.7 Gbps rate\n"); + tc->link.base.rate = 270000; + } + + if (tc->link.base.num_lanes > 2) { + dev_dbg(tc->dev, "Falling to 2 lanes\n"); + tc->link.base.num_lanes = 2; + } ret = drm_dp_dpcd_readb(&tc->aux, DP_MAX_DOWNSPREAD, tmp); if (ret < 0) @@ -637,9 +644,6 @@ static int tc_get_display_props(struct t err_dpcd_read: dev_err(tc->dev, "failed to read DPCD: %d\n", ret); return ret; -err_dpcd_inval: - dev_err(tc->dev, "invalid DPCD\n"); - return -EINVAL; } static int tc_set_video_mode(struct tc_data *tc, struct drm_display_mode *mode)