Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2471424imj; Mon, 18 Feb 2019 06:36:11 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia9sh6kSPgfGA5NeipR6Mv11nCX1wRmU7Y329AI1bgOYZ6nYivK75IGOcrc/sOKwV1NXnRJ X-Received: by 2002:a63:2224:: with SMTP id i36mr2287869pgi.169.1550500570963; Mon, 18 Feb 2019 06:36:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550500570; cv=none; d=google.com; s=arc-20160816; b=T8+XvSuXyEJeznm4U6ssuuDZW/GWi/qFClBaSbxr11KXEDP4V4Kc2n6QYKK6MTEYEK 1SdBHMIG0inBEG3M1X+wW6Deo4EYAzwodNgfWmKeAfxIuOeU4frxCanMU3g14LRSeZGo wq7AEjrlPq1Bm7rjwGOiksoiu7aMTdutWBmDEuoUJfCnP+Nz8c+FR9yv3EviiG5dnbmK 0iUfnv7S3i1OFXPHsHXbfEFXR9TvTGmjTP3nQ51SvwLjuShi6FHbWvMX5rRCEM35Yh9c Al+nv/lUhPFD+yctC1u0Nza10J6nUr10lSSG6wqhokNXn1cm/m7x3Yy1dEH8Lvpk3uwy u+bw== 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=ftYfZQxzMESUJtZ5S3DCN+xxSWDhRb7iEo3gfcWZo58=; b=cfopCzp9sgLmIUKxGFzT2nxmvSqaTf2Jw8Zp8obuXmV3Fbj5Gt5tDtQnOhsIbSKmBA YbROp3pHOGrxwH1b5TGEChJfKISenQhWcIQMTFVlcJNjLjWD/ukmLnLMkGLjYkCJQtJ9 8F99kovyz4M2ErgR7R901E7xbxyNmGaLtMvkpeFCkzqzUd8xPAL5qMjzSULsCUwRK6c+ SbTQxJqZpmptDNYSMEVaPi/BR60d2gSoA2wfu/wW8YwwIx+tXg/3ZDhAwoU2XDwLtbfy BQC0Tt2Z1m3X3WY9PM7/UDoTXoix3XljVSAh46LU/BdTsc4iUnu3N1C7g29zUihUC21D CP/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=by4AOPHO; 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 h8si13185619plb.10.2019.02.18.06.35.55; Mon, 18 Feb 2019 06:36:10 -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=by4AOPHO; 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 S2387772AbfBROfD (ORCPT + 99 others); Mon, 18 Feb 2019 09:35:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:36500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387745AbfBRN4U (ORCPT ); Mon, 18 Feb 2019 08:56:20 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 325A82077B; Mon, 18 Feb 2019 13:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550498179; bh=QRXydSeT7l1z8ABgh/eam3o1QP1bCdCumq3Nei0KbR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=by4AOPHOSnHP/WQE9uNrsyjVuAPoDo8Qqjld9b3icTI6naXmgEsIDaqqiifbkiirY wSiiF5BOC0+4mo8cMKPqQgbYQOY+YyGvlTgSKC8MbN+/fUyFNgvJCHwSfZbZW9FZaX 1sp26X5ntGvoV/xt9lWlcXOzlwNJgtd0vAqvJfpU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomi Valkeinen , Andrzej Hajda , Sasha Levin Subject: [PATCH 4.14 28/62] drm/bridge: tc358767: fix single lane configuration Date: Mon, 18 Feb 2019 14:43:34 +0100 Message-Id: <20190218133508.383860516@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218133505.801423074@linuxfoundation.org> References: <20190218133505.801423074@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 4d9d54a730434cc068dd3515ba6116697196f77b ] PHY_2LANE bit is always set in DP_PHY_CTRL, breaking 1 lane use. Set PHY_2LANE only when 2 lanes are used. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-4-tomi.valkeinen@ti.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/tc358767.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index e697c7c6ca52..acac2c1769ad 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -541,6 +541,7 @@ static int tc_aux_link_setup(struct tc_data *tc) unsigned long rate; u32 value; int ret; + u32 dp_phy_ctrl; rate = clk_get_rate(tc->refclk); switch (rate) { @@ -565,7 +566,10 @@ static int tc_aux_link_setup(struct tc_data *tc) value |= SYSCLK_SEL_LSCLK | LSCLK_DIV_2; tc_write(SYS_PLLPARAM, value); - tc_write(DP_PHY_CTRL, BGREN | PWR_SW_EN | PHY_2LANE | PHY_A0_EN); + dp_phy_ctrl = BGREN | PWR_SW_EN | PHY_A0_EN; + if (tc->link.base.num_lanes == 2) + dp_phy_ctrl |= PHY_2LANE; + tc_write(DP_PHY_CTRL, dp_phy_ctrl); /* * Initially PLLs are in bypass. Force PLL parameter update, @@ -858,7 +862,9 @@ static int tc_main_link_setup(struct tc_data *tc) tc_write(SYS_PLLPARAM, value); /* Setup Main Link */ - dp_phy_ctrl = BGREN | PWR_SW_EN | PHY_2LANE | PHY_A0_EN | PHY_M0_EN; + dp_phy_ctrl = BGREN | PWR_SW_EN | PHY_A0_EN | PHY_M0_EN; + if (tc->link.base.num_lanes == 2) + dp_phy_ctrl |= PHY_2LANE; tc_write(DP_PHY_CTRL, dp_phy_ctrl); msleep(100); -- 2.19.1