Received: by 10.223.176.46 with SMTP id f43csp688857wra; Fri, 26 Jan 2018 05:25:53 -0800 (PST) X-Google-Smtp-Source: AH8x224hQUqYqES8Bs6fdPMqClRbOzir6HnSbJrzl6gcBA4Sk5cvNwisWOhTbR4Z/Q6Pw78jUyFB X-Received: by 10.98.72.214 with SMTP id q83mr18901537pfi.79.1516973153189; Fri, 26 Jan 2018 05:25:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516973153; cv=none; d=google.com; s=arc-20160816; b=JuX4ErMWf+gz+hEbRDPYGctyzQTNMrySe2stZ0xa2CtqJn081qFlX4y17aqz5MENbi njQPgVXG+33ioIVbVSrZrUa4n2l6z0Qbv2v40qt5xph7U6vQPutMC7SssEPsoxKte3Sb qZU1bin7ddeYLA2TgUckMcITpEUXp3dap3wLIKlKtnW890Ih579ATojD87T7h5RQWB11 an28+APFJXVeX/umzMAhFDfpQylU2GsnTa1o17rbcW83g+lY1raFfOpFhSLItpiYol0z fSLB8M7An4OO4HulivE0dkJtmiFcuJFZh5CHOuyj3n0cD7R1jJm64ZWXRRm7hfMtWMv5 TKog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfert-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=EwakVtdBe2o13HpV7b65wNImd68FwKnoht+TT/itaws=; b=prFIpP8LSXIoPevDLqgHEKVUXIh14bXoIvCP44wgQD//2fvOz279x+lbLOEF5xmrxe wCfqSseoADnxCyME41lyP5GgI6lXcksHQEy4CYkBLBmLFf2fS5rXUMBVV5ORHORPzwN6 k/FxgOUNC2q5kjWRywSFYNxAdLpXxgg4EIugbbo9+PN5XlLEdhhJpOd/lACbNiahcwFp 9Q/yEPvZNvFqhL2eoTt8pK5QWv2sU8QjzVoQvvBatcVidfkdgrwHE17giI7RMtPe6jYk twGlGjPisHWctD6GkTwitSWKRlLdQtd8TC9b3M8je/CEHJSMF/ujdSkFkABM/DZhC6MR 4SBw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3-v6si3765483plk.594.2018.01.26.05.25.38; Fri, 26 Jan 2018 05:25:53 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752812AbeAZNXC (ORCPT + 99 others); Fri, 26 Jan 2018 08:23:02 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:34374 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752300AbeAZNRx (ORCPT ); Fri, 26 Jan 2018 08:17:53 -0500 Received: from localhost.localdomain (unknown [IPv6:2a01:e35:8a7e:4790:a8d7:ca4:7b4f:7f87]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tescande) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 26B7E27480E; Fri, 26 Jan 2018 13:17:52 +0000 (GMT) From: Thierry Escande To: Archit Taneja , Inki Dae , Thierry Reding , Sandy Huang , Sean Paul , David Airlie , Tomasz Figa Cc: Haixia Shi , =?UTF-8?q?=C3=98rjan=20Eide?= , Zain Wang , Yakir Yang , Lin Huang , Douglas Anderson , Mark Yao , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 21/43] drm/bridge: analogix_dp: Fix incorrect usage of enhanced mode Date: Fri, 26 Jan 2018 14:16:48 +0100 Message-Id: <20180126131710.7622-22-thierry.escande@collabora.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180126131710.7622-1-thierry.escande@collabora.com> References: <20180126131710.7622-1-thierry.escande@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset = "utf-8" Content-Transfert-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: zain wang Enhanced mode is required by the eDP 1.2 specification, and not doing it early could result in a period of time where we have a link transmitting idle packets without it. Since there is no reason to disable it, we just enable it at the beginning of link training and then keep it on all the time. Cc: Tomasz Figa Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 9df92dc54dbe..846574d0dcb0 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -281,6 +281,8 @@ static int analogix_dp_link_start(struct analogix_dp_device *dp) retval = drm_dp_dpcd_write(&dp->aux, DP_LINK_BW_SET, buf, 2); if (retval < 0) return retval; + /* set enhanced mode if available */ + analogix_dp_set_enhanced_mode(dp); /* Set TX pre-emphasis to minimum */ for (lane = 0; lane < lane_count; lane++) @@ -593,8 +595,6 @@ static int analogix_dp_process_equalizer_training(struct analogix_dp_device *dp) dev_dbg(dp->dev, "fast link training %s\n", dp->fast_train_enable ? "supported" : "unsupported"); - /* set enhanced mode if available */ - analogix_dp_set_enhanced_mode(dp); dp->link_train.lt_state = FINISHED; return 0; @@ -944,8 +944,6 @@ static int analogix_dp_commit(struct analogix_dp_device *dp) } analogix_dp_enable_scramble(dp, 1); - analogix_dp_enable_rx_to_enhanced_mode(dp, 1); - analogix_dp_enable_enhanced_mode(dp, 1); analogix_dp_init_video(dp); ret = analogix_dp_config_video(dp); -- 2.14.1