Received: by 10.223.176.46 with SMTP id f43csp274678wra; Tue, 23 Jan 2018 20:50:01 -0800 (PST) X-Google-Smtp-Source: AH8x225h5iD6YHYfA1JF7eIoVm/DtLnNR6G+15GeD163FiHprSgAkKsQA7/I3RJ90SevBaTEV0IZ X-Received: by 10.99.104.131 with SMTP id d125mr6586107pgc.125.1516769401800; Tue, 23 Jan 2018 20:50:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516769401; cv=none; d=google.com; s=arc-20160816; b=tQtKrJKOf7XHqq2XNtpGFat+tsmPvm5Mq0QDGiS/8tC+Xd5kg+8RffyDqIS4u4u0DS Nf06IuRccYEEquaoeRciVKtnkN2PeJhudVyr4+7ED8gJm/TA3FpLCgisi+g8wlhtJwOK 1lCP92UhLSmVSxNNTXtReo6MUOKgYO8dFYP2vgndU8bAq9gOsvcDaQAs2J3ZWYxF2xLf V8y2eWX067is9Ty1p2bQ4ghpdZ9jEl3IhS3uAeuWQs+DBDTWNl0PDxnMn19X5TapckcC 358xu64q1axz5mfo/TGVrlOwRUhpVITkhEjKL9d3yN+JPiBBE1zNXGUPjPAcGntCM4up EzwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=BzZtVbAqZDYxRBsD3AL9HTS9SmdoQvaPat6I1m6WFnI=; b=bLUn1l4M/YtlON91CjRfos0vrCaQoFMrzQELbW9ugezR4vJwtScll47NzqOmyUWWpi rkAgIdNttksW7a/AuFH+wNYaiNvO3sIJJtIlF0ovVf3S18YItTrP+0yp9TO68rfIJ2Po THp/cRaoZXBpoRjSjAtIoOjxY+Hyk/nfXd6peae8VWbbYFniWj3upckKW0BzYuoqibYz K6nsigUKQaCq8aNemSSmzGVrYb1iamDpb/UdIR4LWYreVlI6grlS6vndSXaKPiETS6dd +o3TuJ9Zt/TJftP8cEDic05nbDpObW4jwnXyr1gh+sq0QmOenefPNwHii7oQLTEnFRy/ GrNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=NsFAcceS; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4-v6si392161plt.112.2018.01.23.20.49.48; Tue, 23 Jan 2018 20:50:01 -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=@microsoft.com header.s=selector1 header.b=NsFAcceS; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932761AbeAXEtZ (ORCPT + 99 others); Tue, 23 Jan 2018 23:49:25 -0500 Received: from mail-by2nam03on0117.outbound.protection.outlook.com ([104.47.42.117]:41259 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932502AbeAXEQH (ORCPT ); Tue, 23 Jan 2018 23:16:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BzZtVbAqZDYxRBsD3AL9HTS9SmdoQvaPat6I1m6WFnI=; b=NsFAcceSjYdKqdmABakdeWx+fTqINcMnPNfLpX49vFz5xlfJfNp6qmw5vBKDiMfc6W9u9PdDX/3Xhvbe9r3+TkFG9SX2MvNYNNYDEyX9r/qk4vJWTtNx3l8GZfx2cynlSjUX3kCecb9CWiXAD/FjY3IytpJVdI7Y//+Dr8zFfgY= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1078.namprd21.prod.outlook.com (52.132.130.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.464.1; Wed, 24 Jan 2018 04:16:01 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7%2]) with mapi id 15.20.0464.000; Wed, 24 Jan 2018 04:16:01 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Andrey Gusakov , Andrzej Hajda , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 080/100] drm/bridge: tc358767: do no fail on hi-res displays Thread-Topic: [PATCH AUTOSEL for 4.14 080/100] drm/bridge: tc358767: do no fail on hi-res displays Thread-Index: AQHTlMnq5iOhZ2E8o0eEakpL58PQzw== Date: Wed, 24 Jan 2018 04:15:06 +0000 Message-ID: <20180124041414.32065-80-alexander.levin@microsoft.com> References: <20180124041414.32065-1-alexander.levin@microsoft.com> In-Reply-To: <20180124041414.32065-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1078;6:r90N6ScGl4y6dsfppPqtmsqpzz+UftJbtKHK4AzBd1NB5bKAh/u9mmzhHDXjfex49xzURpnhHy6ZdjFMO+B/cqYOkMvHlGWzrd6y/QlK9GcNB8G35Wy1TH1GwyFsVf31Hu1DoBwuausJmz8xVTEFDUBthYgB21/xqYLRTnAyQ4RP2rGpPrOfM2QdEAn4GFVmqyNbQ3QWnGwyold3I48W9RWW+OPfWc8BscJMWF4wBTQVT/XKxxmfJ4KYLYvo4SlBHof0CRftF9VHsGwBXw4G4olcy4Cw+pa61KqGyimIGQ4tMLe/BGbKTkjE7DCuafZaea2q8VdlDpR74HMaAs2q2mX7e2YYFRCdSID0ZZryV5pqBuASi7mtc3T4nZBywCgW;5:ZmFT6uN8kyQrxGDT0xCiivCEzNf8uxVLTjBuXZFYe4i21AwNq5Dd5bIOPrOiR66BDclxxvSb7u3YTetMGN03qFO0q4Eo2+pTB/ljhT3L/FZ/d9YHrXX6semZDsQATOns8pXjIT32v4a8eBCTJrNxOZaQ/1MC6gfYmz5fKbbcl2U=;24:qfvfax0j7CsmaeXFl3sO28jxMsBJyLDQgI8gEHSdsbhnUHoFGIZHFjGFBnTcFIvcATqwhbTB1CCh6XMkrVEHQWrm3b6Ppbek/O/1ZoQJifM=;7:wqRw0+tTy7t+U2zvZSUGJuBnyUsey//I6gEKf/ELef47TLNa0a4w4hoSwPnB3kw/FapMWsP+dtjJCQ/PjrImHU2LqfXdWAT/Hc5fDbMLka8IFLAVQcl+3JiAvI22U6Ze9kbMgvjuNd7xZXY8I16jteKT1JQhq9LL1L/g/BlBegSLRfOVjSGkTGl+ZB69iX0sp3DwJL0LZlISOOltdhxFqZKaLc6FY1sOYOyRxnuqO56+wf3hluYwSPCEKa2R+ib6 x-ms-office365-filtering-correlation-id: 185fcd52-fa10-4c30-896d-08d562e12ddd x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603307)(7193020);SRVR:DM5PR2101MB1078; x-ms-traffictypediagnostic: DM5PR2101MB1078: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(7411616537696); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231046)(2400081)(944501161)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1078;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1078; x-forefront-prvs: 056297E276 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(39860400002)(366004)(396003)(39380400002)(199004)(189003)(86612001)(22452003)(6436002)(106356001)(107886003)(102836004)(105586002)(305945005)(5250100002)(2501003)(14454004)(3280700002)(4326008)(7736002)(97736004)(6306002)(6512007)(36756003)(8936002)(2950100002)(3846002)(6116002)(6506007)(86362001)(54906003)(76176011)(110136005)(966005)(2906002)(53936002)(66066001)(72206003)(6346003)(5660300001)(8676002)(478600001)(10290500003)(68736007)(81156014)(10090500001)(1076002)(3660700001)(25786009)(316002)(2900100001)(99286004)(575784001)(26005)(6486002)(81166006)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1078;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: PDawb1r+CG/Jx7pe7dA1mCvKTptxvXYccPhNP3GBJrUi4tVlIiu8TYTv0aJZs6S1NXq/h/72WPE9dt0L/LU9dg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 185fcd52-fa10-4c30-896d-08d562e12ddd X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2018 04:15:06.6327 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1078 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/gpu/drm/bridge/tc358767.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc3= 58767.c index 8571cfd877c5..e1996dbfb0a1 100644 --- 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 tc_data *tc) ret =3D drm_dp_link_probe(&tc->aux, &tc->link.base); if (ret < 0) goto err_dpcd_read; - if ((tc->link.base.rate !=3D 162000) && (tc->link.base.rate !=3D 270000)) - goto err_dpcd_inval; + if (tc->link.base.rate !=3D 162000 && tc->link.base.rate !=3D 270000) { + dev_dbg(tc->dev, "Falling to 2.7 Gbps rate\n"); + tc->link.base.rate =3D 270000; + } + + if (tc->link.base.num_lanes > 2) { + dev_dbg(tc->dev, "Falling to 2 lanes\n"); + tc->link.base.num_lanes =3D 2; + } =20 ret =3D drm_dp_dpcd_readb(&tc->aux, DP_MAX_DOWNSPREAD, tmp); if (ret < 0) @@ -637,9 +644,6 @@ static int tc_get_display_props(struct tc_data *tc) 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; } =20 static int tc_set_video_mode(struct tc_data *tc, struct drm_display_mode *= mode) --=20 2.11.0