From patchwork Tue Mar 19 10:40:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 160542 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp3711658jad; Tue, 19 Mar 2019 03:42:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzA0Lc0n7c0gFiuXhi7LraktfwjcErq8/P2MtRNZh/kN9Z7fJ9DrkGVVtFEsbiAY/QJXkuq X-Received: by 2002:a63:1322:: with SMTP id i34mr1329329pgl.208.1552992143191; Tue, 19 Mar 2019 03:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552992143; cv=none; d=google.com; s=arc-20160816; b=ljuW8yTYz8Tv2WSWqH2KBRGGKvTAx5B/4xFtpDcjdqEbLcxEKUnVdlGDa4zPwVRjhp xnbvi1iM+h7EAHbo//FnlflAYYwePwfnZW94MQ87FWTzHBl29uH9GMt0EERvWwMyHgnX dNtX1z/MjnOSYi/rEFzaNwJC8Yq/VTj3Y+kXRB/gei5n+9fdwbmAkTfbbp8ptZPnBCYL FtfqH774D5hb6kbIRfgmNRUCbfacLAWbXREbxUe7FWnWlCi33igVH3AIFEbMQUYSNuSr Be1M/VfcGXI6PdTWHygR0vOsQeEuGedrGs6rTjwMblnzdBQr+v8X0cUm2PpEtoJB4EJE m8Dw== 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=tI1aAQGa/t9wjTpIylFvYgABuHp5WHaFeD/zuBha4IE=; b=SyQun4UaED5PQEpvkQ1YK0CtMVH6j+JNkfh1R+LLOhspb0lVfBny+daIFTLk40iz1e oTBcWisWYn+4o2BW+zsxNf3cIu3CQq52hQupCECOQsXjYozB+5TSu1H9Uzm3NhNJf0dP xtPlRgD6dhG92/MNp457WhkMekiBUYp7xcGAYtzTsy9N4NH5VLGVOUYxT3aaoqczXBcS 6fLvjyW4d39Hl2Fc9I8Oowkcl7csy0DYpF+ZcPB77Y+D4Awbws+SxYliqItS2druGpw4 8JfPl4+N+C9aXu4vFqY1x637ADn7GJKoUGm4muyirITU3obgPhCAK5SAvGvinIWVtaCT h+fA== 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 31si12123067plb.39.2019.03.19.03.42.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2019 03:42:23 -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 0870C8941E; Tue, 19 Mar 2019 10:42:16 +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 8F9DE893A3 for ; Tue, 19 Mar 2019 10:42:12 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2JAg9KW013551; Tue, 19 Mar 2019 05:42:09 -0500 Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2JAg9m9017367 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Mar 2019 05:42:09 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE109.ent.ti.com (157.170.170.41) 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:06 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE105.ent.ti.com (157.170.170.35) 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:06 -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 x2JAfxlL019091; Tue, 19 Mar 2019 05:42:04 -0500 From: Tomi Valkeinen To: Andrzej Hajda , Laurent Pinchart , , Lucas Stach , Andrey Gusakov , Philipp Zabel , Jyri Sarha , Peter Ujfalusi , Benoit Parrot Subject: [PATCH 02/21] drm/bridge: tc358767: reset voltage-swing & pre-emphasis Date: Tue, 19 Mar 2019 12:40:55 +0200 Message-ID: <20190319104114.12077-3-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=1552992129; bh=RBiYve0sqMIwLHB/hvGnz7fJAiy8tNJvOe+3FkqP8i0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=s1ikvm6mWsY5idcsTrk2iQgp3nkgaJnTr2PSVuCLOa3s3n9ZMuF57SRF0q39Fcpul poonteqSUyjxftQN0AQlWEF4ZvvvZVTAK8pmlpWF7i9M77EXLqFffIq7+ewHttpolS d6LllwststXM2bf+347yqDuUpz9Y51b/m9GibJDk= 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" We need to reset DPCD voltage-swing & pre-emphasis before starting the link training, as otherwise tc358767 will use the previous values as minimums. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/tc358767.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 7031c4f52c57..11a50f7bb4be 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -956,6 +956,12 @@ static int tc_main_link_setup(struct tc_data *tc) if (ret < 0) goto err_dpcd_write; + // Reset voltage-swing & pre-emphasis + tmp[0] = tmp[1] = DP_TRAIN_VOLTAGE_SWING_LEVEL_0 | DP_TRAIN_PRE_EMPH_LEVEL_0; + ret = drm_dp_dpcd_write(aux, DP_TRAINING_LANE0_SET, tmp, 2); + if (ret < 0) + goto err_dpcd_write; + ret = tc_link_training(tc, DP_TRAINING_PATTERN_1); if (ret) goto err;