Received: by 10.223.185.111 with SMTP id b44csp822064wrg; Fri, 9 Mar 2018 14:32:19 -0800 (PST) X-Google-Smtp-Source: AG47ELuQqG+0rFN0iZ7qj/RGDrV+BWNzRHZyUEYr/WxN39NkkQZdTQ5/1FCyJ0Q5n3ZefUlZcCSL X-Received: by 10.99.94.197 with SMTP id s188mr33182pgb.363.1520634739866; Fri, 09 Mar 2018 14:32:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520634739; cv=none; d=google.com; s=arc-20160816; b=aXdoPlUh/9iX0U5NRtPcSj89A26GO2PTCmHpOqUXSvAeTPAuttrRcrOGyOPl4xG178 wos8lLwerioCT1YciYCFX6Tm9Z9I9KLVVXAhfoFZGMDdlZfbVgt/o/l/SV5gqSRwZr5v DtYvjJ+nZ322tZ7bpMELsUY9kU14eGuuKhOrWzhiBQ5enbN+VsvB+0NDUnTcb+xfatiJ WaaV5KE1VdxeNDR4QJ4rpXscQqoaueunvYiGgK9/8FULUBJ5DllFdiw0g6e1rKL7wFup X+PR2rctVN0Q17VBE7/PwlASc3kwW80r0Sw+D0xgcLM/cw/wq6EHzQYWmRx5fLBhNwmq KM9g== 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=5VDe3kz3CKLOuHaFDbmyaDelE+naq61jhw25u2rk32Y=; b=N0HRkllXtSz0RKmKGMM9BU2VMn9u8/QFfY/lts/QESswTQ1hEGiADrrwJwqUS8g68f s8tmT9tWUD352iBHWHN7OTccCozb2JxWDBT5WzzCwqfz3w0tbVcURWlPDim08vbodtWq A0Z3hXyo6GSJOtTZIZ02AjRoOvoXOObXlE3tUXB3tbMTSTjKPq1fnN1YW4arWa4kb03v E8GJviKvxMNnsz33TWdeGePy1JgwlcgbC6Y2zRO0kXxPXt/fPWZBEExz6kIBsX9H0T6x PASU2HgDmw4D/p9Ss0Bk+jT2+b2b/EB9Bt5DmaW1XxqRW4fRZSXBBiAlMs9prXxVerY/ dYQw== 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 99-v6si1586340plf.56.2018.03.09.14.32.05; Fri, 09 Mar 2018 14:32:19 -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 S933084AbeCIWbJ (ORCPT + 99 others); Fri, 9 Mar 2018 17:31:09 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:42594 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932408AbeCIWYX (ORCPT ); Fri, 9 Mar 2018 17:24:23 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 7C7902792D8 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 v5 15/36] drm/bridge: analogix_dp: Fix incorrect usage of enhanced mode Date: Fri, 9 Mar 2018 23:23:06 +0100 Message-Id: <20180309222327.18689-16-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180309222327.18689-1-enric.balletbo@collabora.com> References: <20180309222327.18689-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 --- 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 6cbde8473f58..1eed35f9eb8d 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.1