Received: by 10.213.65.68 with SMTP id h4csp1739614imn; Thu, 5 Apr 2018 03:01:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+59JHxoexJXiD5SDwD9YY5xyGMISydcboCD3KELXHbJ0I20AXwnrc7JNWLpXn+POGig6cm X-Received: by 2002:a17:902:44c:: with SMTP id 70-v6mr22532162ple.354.1522922468861; Thu, 05 Apr 2018 03:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522922468; cv=none; d=google.com; s=arc-20160816; b=lx4u/zUL7+J07g1/0neZ+fqmcUZMMYGHkPMyFmFpqD8Z0uJr8OsKkyK3QTuiAwP7eT HYW5CLNwY6LV8CTgnZwlglK3dETcdvowjeZ1ck1t3t3HM/e/NPkKfEJFHxe95Se+89TF sUcAjWcNCZ30lVcTUXhpyIAfjwxv4iucsDLFvyzQR0hL547ZE/L2JWgthcdm6xF8XffA /0hYSBha9xPWmG+8A98SGr6gNrGMNMTxS7jYqNHFH8+xmMKH2n3iC+wRWHlB79meC4ty kmPAuiNc7a/JEBgDV/D4bKSb+cvf1XYkHtMjHP1d0SdEBrNtvm2+pduNzgzgBN1+Sq5t atNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=VLeLK+CHyKYIAhArRNwEkKdDO4eM6iRMT7inj90xAzA=; b=jE4RRzZqoHJ0kbpBeTLRhpO8FD2KLJZ5hIxp2tzaIgafR9qtxOlwUhyR5x2pLcvthi 73HtMS/dXy02JyKds7/ICdscKHb5melwuwDvwaiKX8nIyAjrjuB33pGI90NOiLY3Gyb8 tntJ0iJWN3Wl5pFzxg4reHnL8XID93cLmOEchGy76achF1h0VKqHcFF5SOWC91HLzjyQ iLLyLcSYnk7sWCpDVuNNctOBVJ0Ypm08f/xrMGbx3drjsoR0/h9PZBGMfOmEYpX1LpX4 hBGiGeYJRR840/tT+LAsqGtCm1S1J/b2EGnwS/51iVewsAzp3huOZCxlrjbdf5Wo5yOU +E8w== 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 n34-v6si5375382pld.603.2018.04.05.03.00.55; Thu, 05 Apr 2018 03:01:08 -0700 (PDT) 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 S1751886AbeDEJul (ORCPT + 99 others); Thu, 5 Apr 2018 05:50:41 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:60682 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751602AbeDEJud (ORCPT ); Thu, 5 Apr 2018 05:50:33 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 2E80827AEA6 From: Enric Balletbo i Serra To: architt@codeaurora.org, inki.dae@samsung.com, thierry.reding@gmail.com, hjc@rock-chips.com, seanpaul@chromium.org, airlied@linux.ie, tfiga@chromium.org, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, dianders@chromium.org, a.hajda@samsung.com, ykk@rock-chips.com, kernel@collabora.com, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, rydberg@bitmath.org, krzk@kernel.org, linux-rockchip@lists.infradead.org, kgene@kernel.org, linux-input@vger.kernel.org, orjan.eide@arm.com, wxt@rock-chips.com, jeffy.chen@rock-chips.com, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.com, wzz@rock-chips.com, hl@rock-chips.com, jingoohan1@gmail.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com, Laurent.pinchart@ideasonboard.com, kuankuan.y@gmail.com, hshi@chromium.org, Enric Balletbo i Serra Subject: [PATCH v6 09/30] drm/bridge: analogix_dp: Fix incorrect usage of enhanced mode Date: Thu, 5 Apr 2018 11:49:39 +0200 Message-Id: <20180405095000.9756-10-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180405095000.9756-1-enric.balletbo@collabora.com> References: <20180405095000.9756-1-enric.balletbo@collabora.com> 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 Signed-off-by: Enric Balletbo i Serra Tested-by: Marek Szyprowski Reviewed-by: Archit Taneja --- 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 1f4f34149019..1e1743b59c77 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; @@ -940,8 +940,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.16.3