Received: by 10.223.176.5 with SMTP id f5csp1025004wra; Fri, 2 Feb 2018 09:55:03 -0800 (PST) X-Google-Smtp-Source: AH8x2244pvwq8xJugi1hbsRfzeUlkcxlcfim4CNXC2OfuDl+xdXHYR9gzmkdbkDPHMrv6uvJ/mdX X-Received: by 10.98.182.16 with SMTP id j16mr9714236pff.220.1517594103150; Fri, 02 Feb 2018 09:55:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517594103; cv=none; d=google.com; s=arc-20160816; b=RbiJrVjp8ozSa7eSbh7yoOxQOOViHyQdZmjjB5lwuN3m7crfkYo0gP4/yIfdpaYMfj 0f1u00wNAmlbcsVSwDK3jUQCDXFVBKJl/40dxJ0lxVn9zL0kHJSMJlN8WqmPUqW/gXnS CdE/wMlBI3sECzQBC8AMkeE2YEokWrVVNBW1Zo9mhZT/CrvaIcBt4cJrwHKENNlZoI3H n1lhQKNHhkwqgzpI+LcBgwrAhahkMrwDAPoJL3VEA8V+ieaiu/I7mj4aURoL0cY9h5ES XcipN36nynJEYmU9lx66ox0HCyGwDcRtsE3aWbMk4rvPP9amsr3sV3bM/Wa561VgeEoQ PARA== 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=ICwFQJRwlJ/70KiRgIUK1odB4k8bu9S9TVXZweUWRrE=; b=h19ZqueHyQF6Q0NyMJaoDK/X7ZTYklxwnGNvtQAgWBSDfwQgHcNZv1wqNE4WD88duR IPQvnodIyiGG489/rSifk4nWbPTTPgnHWEreHBI/+ebS2ywSAjtnCJmMrqOZLCgkQtDp pZ/ezeCUwIP18JvsCYyWsQ6bYgV9KSPM2NZgtATUTWhpw5t81FdMxllAFTPP8qeUbOhV efpJlS4ygrjdmQxYHP85hrdCIg6dJh0tNUd0kdDVehGnexbnN2NMu8mve6+q7cbHntSe cWb/f5y83rHe9/5TG47BsuylEozGS2R+SG1VJBqlCazYn51n1nin3VdVGfaTHox0BOJm 7QfA== 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 az5-v6si2119861plb.71.2018.02.02.09.54.48; Fri, 02 Feb 2018 09:55:03 -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 S1753575AbeBBRxl (ORCPT + 99 others); Fri, 2 Feb 2018 12:53:41 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38896 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753440AbeBBRMH (ORCPT ); Fri, 2 Feb 2018 12:12:07 -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 C7E3FEF7; Fri, 2 Feb 2018 17:12:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Philipp Zabel , Andrey Gusakov , Andrzej Hajda , Sasha Levin Subject: [PATCH 4.14 111/156] drm/bridge: tc358767: fix 1-lane behavior Date: Fri, 2 Feb 2018 17:58:12 +0100 Message-Id: <20180202140845.192858441@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 4dbd6c03fbf88299c573d676838896c6e06aade2 ] Use drm_dp_channel_eq_ok helper Acked-by: Philipp Zabel Signed-off-by: Andrey Gusakov Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-7-git-send-email-andrey.gusakov@cogentembedded.com Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/bridge/tc358767.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -819,8 +819,6 @@ static int tc_main_link_setup(struct tc_ unsigned int rate; u32 dp_phy_ctrl; int timeout; - bool aligned; - bool ready; u32 value; int ret; u8 tmp[8]; @@ -965,16 +963,15 @@ static int tc_main_link_setup(struct tc_ ret = drm_dp_dpcd_read_link_status(aux, tmp + 2); if (ret < 0) goto err_dpcd_read; - ready = (tmp[2] == ((DP_CHANNEL_EQ_BITS << 4) | /* Lane1 */ - DP_CHANNEL_EQ_BITS)); /* Lane0 */ - aligned = tmp[4] & DP_INTERLANE_ALIGN_DONE; - } while ((--timeout) && !(ready && aligned)); + } while ((--timeout) && + !(drm_dp_channel_eq_ok(tmp + 2, tc->link.base.num_lanes))); if (timeout == 0) { /* Read DPCD 0x200-0x201 */ ret = drm_dp_dpcd_read(aux, DP_SINK_COUNT, tmp, 2); if (ret < 0) goto err_dpcd_read; + dev_err(dev, "channel(s) EQ not ok\n"); dev_info(dev, "0x0200 SINK_COUNT: 0x%02x\n", tmp[0]); dev_info(dev, "0x0201 DEVICE_SERVICE_IRQ_VECTOR: 0x%02x\n", tmp[1]); @@ -985,10 +982,6 @@ static int tc_main_link_setup(struct tc_ dev_info(dev, "0x0206 ADJUST_REQUEST_LANE0_1: 0x%02x\n", tmp[6]); - if (!ready) - dev_err(dev, "Lane0/1 not ready\n"); - if (!aligned) - dev_err(dev, "Lane0/1 not aligned\n"); return -EAGAIN; }