Received: by 10.223.176.5 with SMTP id f5csp1007704wra; Fri, 2 Feb 2018 09:36:08 -0800 (PST) X-Google-Smtp-Source: AH8x226ioSiPZf0d7iVIB1lng419VPsHushjfemea5KdgsS+KGw7Ht4k5ybdrrSI+fu2XKNy4L8h X-Received: by 10.101.71.199 with SMTP id f7mr31838049pgs.91.1517592968678; Fri, 02 Feb 2018 09:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517592968; cv=none; d=google.com; s=arc-20160816; b=DWla52NE35Jyk78JYk3+oZOJlQPw394vp8mq/zii3B2x86K2joZ/CdtiIQOPUwy/m9 9fzp2PVf9POSggGbHFULe2XatQmKiqiFTNjDA4dTXQyYQPHrn/IYAasAMn0bXwuyDlMQ ZMRYb339rf8LX6+Wje0/z/AKnpPTux1W/hYhAhmHQZGGUn4Sd7fL5NF5ykU6EOEffuvF alClwaFBycpz6i8KKziLIf5sEZmet3OdSefvDYHYRDjNulMjUh862L/QMbAnuNs7Ctxj Mw0q/3dPdvNhg8m9X7m+qBzbyai2ZmbuazKxFRd7b/MD81/SqPyHz7UDdbOqGPlfj2Lf cCdw== 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=nYGxOfTKSnsYeFIzlAPNForifqCeZmST1IBRAZiDKm8=; b=KVw0O+XShzPmg/SXeJ4MHhzkuj8poQTl7i1QXegY79fSkT4Yu4pdxZwbfIg9eoH6KZ AuFXS20F0v7nAvXY7C2hUO/lHQDUJK0/m4t0N+gALCCzbGcdjJR3hOr8/6QlaYM/rJ2w QW1JxlVFMhA3qxuIO+a8Y8BBUPbl12m0c098IHbcsMbah+hKVJ25wUevlxYwjvLCNhIb fknrxhfReTsY/GBCxZCRtUBWSGR4RxWbnm9PWt1ZMS/UTVuY6TjuAUA08Ij1j6HgaIcA DU/sp9A7GeZEAP/VeMOyp1vd423FsCyvzpsS3LmQkP/PceNeIKe57BiYeQO6yyf2ne3W ew3g== 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 y11si1702792pgv.424.2018.02.02.09.35.54; Fri, 02 Feb 2018 09:36:08 -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 S1753990AbeBBRVu (ORCPT + 99 others); Fri, 2 Feb 2018 12:21:50 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39288 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752589AbeBBRNU (ORCPT ); Fri, 2 Feb 2018 12:13:20 -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 4E627E27; Fri, 2 Feb 2018 17:13:19 +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.14 106/156] drm/bridge: tc358767: do no fail on hi-res displays Date: Fri, 2 Feb 2018 17:58:07 +0100 Message-Id: <20180202140844.988701967@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@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.14-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)