From patchwork Tue Mar 19 10:41:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 160548 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp3711831jad; Tue, 19 Mar 2019 03:42:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXtXXw8QYNRyf+kZZPA+pqjqk0o0CS2esSfT8dXjQ2fwzwaXzQ6eECCuBeIYvH8HDVkqWf X-Received: by 2002:a62:61c4:: with SMTP id v187mr1221538pfb.133.1552992155532; Tue, 19 Mar 2019 03:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552992155; cv=none; d=google.com; s=arc-20160816; b=KSZ1zUnzmHAP6wQ14GOBFc8KUC+CA2btinLiuZ+IaYZu/ADE61MtgAQhaiY68I3k2/ V0FgZmMAYNzGGG0/KcQArhxUHl/kFAAznSTjjStgTRJkJ1+MBcrhiVHrXz/r2CJ59cKu 9/GbUmxtkugSVI1STZk2UAGxtZPm/wZGLA15JGgWhoc1pVLcACj28wu8EqZLILZYqR7s 5OpWpFtPv0itTqnCm9e9xIDdLwG2jkp1vIy0xAdgZhrnN4JIfyaRxZZFB2tBL0l5Yeam 4mJVdvcLQmAvGCEwSi6+zvAUEmm+gNthH/0LioAQePcVbHxCue1bRk+3btPNIpTta+lF Prtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=oxLG4f6oU4QzEV5RDQPm55Yv2hoT2k3oCd8ZRAax/Co=; b=VavIwrgPuLyUBkh8bhukQCDnACoMFxEHLgSHGjw3UpNqINRcoQoGJWY7yIIHkEPHYO EwRDJ0zZ35K/iI/HGUXVxhNRTikHl8er99z0gEG3EL9jZ2i2B9pnf4yO4mVuBtnuYXoe GTaPiswwTYJw6Uv9SjvNFh3/Wvx3ZFszCUt2kZFOtTX0ayO6mXN7Hl7n9jw7fybTxBwS gCv00RMRvQAZ8O6lBWmlN49g7QOXx3nJ+yXA13WY4J62oSU4+Jz+bQi7a8uLSfIiKUOF /r+iJx/Py27GB5VDCsPRTxhWOpwbcbVmW6YweLLKI5LdEMmx5ADv2zSEtPgbSHy7/UtR 0MDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id h35si12036866plb.180.2019.03.19.03.42.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2019 03:42:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 03D5689A94; Tue, 19 Mar 2019 10:42:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9473489A83 for ; Tue, 19 Mar 2019 10:42:31 +0000 (UTC) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2JAgT32013666; Tue, 19 Mar 2019 05:42:29 -0500 Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2JAgSVs105735 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Mar 2019 05:42:29 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 19 Mar 2019 05:42:27 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1713.5 via Frontend Transport; Tue, 19 Mar 2019 05:42:27 -0500 Received: from deskari.lan (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x2JAfxlU019091; Tue, 19 Mar 2019 05:42:25 -0500 From: Tomi Valkeinen To: Andrzej Hajda , Laurent Pinchart , , Lucas Stach , Andrey Gusakov , Philipp Zabel , Jyri Sarha , Peter Ujfalusi , Benoit Parrot Subject: [PATCH 11/21] drm/bridge: tc358767: ensure DP is disabled before LT Date: Tue, 19 Mar 2019 12:41:04 +0200 Message-ID: <20190319104114.12077-12-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190319104114.12077-1-tomi.valkeinen@ti.com> References: <20190319104114.12077-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1552992149; bh=G8whvB5XNu5+1oZ0kK0Z1pXv14d/iWkdimHvxEYS8B0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=G44EqhWyl5oI3i6umpZZAII3taixC3g2zlcKO6gWyAc9Eyg1dIC2vsck2FWAtctK9 VNyvEtsK0MZCf1KjhpVdK3Sz7c5+KcZN84LAC3+2xnIQKe2ZPDGKYNWbqk772gtlTB PhunjxzDZuPnyGSb8LDIoIlxzob8Dwz/1BQT5ze0= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Link training will sometimes fail if the DP link is, for some whatever reason, enabled when tc_main_link_enable() is called. Ensure that the DP link is disabled by setting DP0CTL to 0 as the first thing. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358767.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index fe5fd7db0247..f628575c9de9 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -839,6 +839,8 @@ static int tc_main_link_enable(struct tc_data *tc) dev_dbg(tc->dev, "link enable\n"); + tc_write(DP0CTL, 0); + tc_write(DP0_SRCCTRL, tc_srcctrl(tc)); /* SSCG and BW27 on DP1 must be set to the same as on DP0 */ tc_write(DP1_SRCCTRL,