From patchwork Fri May 3 12:29:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 163301 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp546228ill; Fri, 3 May 2019 05:30:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfX/rKaAms2lG6pwYgnb3vzLKU8FenH/0shBjyfMOLl94pPcCiY8uihV2Z9ZxGIll5Kg5M X-Received: by 2002:a63:10c:: with SMTP id 12mr10154300pgb.276.1556886650377; Fri, 03 May 2019 05:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556886650; cv=none; d=google.com; s=arc-20160816; b=g33koF916orreqGU/dA2N4tna9ws0Wqv0I3q5qP5Ol8b3FTFCj7NykAwj6SuObMuS3 zGtlOvBmIK332Jf856xsx6a6w5+lyJx67CL2BAk4T2Eg8cS1BwmazSljPZuNgjNX7bo1 t/gKD/IwO60IAIpwf3uBSgV51q8ZiwL9Dz5cdqtBI699mg/QRordm+hvUzXFSec/7GLj 35he9Z0+UU8b6hLwA84wRsGEPfShVl/lFfvMfOfs06d9uVF9S/pwPEv5aMgQCxGG5B/0 ZSDFhTUDuWtnSV/MRE1kfFhEQ6HjthlW6nxfZXAczI6qnrt4Peth5W2JbdygxDLILUAS xaBQ== 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=xk8J4mXXJ8B92A2uC57+jrJMe6VyCGBDqQIpO/uWh5Q=; b=0cyhcs5J7/sttWuWQ3vDMSPpxupjR/RVDLb5MTQsXTyDJ8zySMgmi3tAU7DgiDQndB WWZNDpYhsSDZiEQiqTVq+VlUV5i+o6t3sSWqNCGWDZRZFpwY8niEFFL2SDtMMbPg/wJU EXlVir+dkGT6NrTFFn//mtY0t+WB8CVOmh8uuPV3yy0jzAV55lDqbwguhqv0SuxILlZJ dxCHstbgpcR3t5ezRe7hXhCOI7F7hePm4R4ktVB+vajX4ZeEUDl3XrKWKxwoFnh5RpD3 rZ6eGAQTPeCuYN9Cd1JY7kX8Yz8A5s2bAlekz3IL6JHtVm0JbrKk0lZFhCN8G9SnUEBY 1fqw== 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 r197si2171003pfc.247.2019.05.03.05.30.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2019 05:30:50 -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 1A25C8913B; Fri, 3 May 2019 12:30:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by gabe.freedesktop.org (Postfix) with ESMTPS id CBC0F89134 for ; Fri, 3 May 2019 12:30:45 +0000 (UTC) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x43CUhaA017290; Fri, 3 May 2019 07:30:43 -0500 Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x43CUhLN121223 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 3 May 2019 07:30:43 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 3 May 2019 07:30:42 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 3 May 2019 07:30:42 -0500 Received: from deskari.lan (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x43CUYtk002029; Fri, 3 May 2019 07:30:40 -0500 From: Tomi Valkeinen To: Andrzej Hajda , Laurent Pinchart , Lucas Stach , Andrey Gusakov , Philipp Zabel , Andrey Smirnov , Peter Ujfalusi , Jyri Sarha , Benoit Parrot , Subject: [PATCHv3 02/23] drm/bridge: tc358767: reset voltage-swing & pre-emphasis Date: Fri, 3 May 2019 15:29:28 +0300 Message-ID: <20190503122949.12266-3-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190503122949.12266-1-tomi.valkeinen@ti.com> References: <20190503122949.12266-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=1556886643; bh=BlwWTzYvunLKctKkv35eo4s39aaBrOJkiufexUvjPqQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Av6KH77zgjxmcobkYl1KnK6oqnFJXkJv1PgePpNizNWuwQiorEkjMOD2w8fMORlk4 4xrydJ0/7s96k8V/Ql+w0gi90hYNzl3y/Ef2RiSihR/q/O8846dgLCeh1I59IRMVVT hj0TqSiSQypMOUGV5NUQ3/IqOWjI+bs/xvCEtudA= 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 Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/bridge/tc358767.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 7031c4f52c57..03da47cff182 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -956,6 +956,13 @@ 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;