Received: by 10.213.65.68 with SMTP id h4csp783601imn; Tue, 13 Mar 2018 23:04:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELtIZbTjge0MrYPAVL4Eujn7/k/LgEnUA+QtBndUitZGAnzurQZG0vOPncqjeWMHJMdCYE/2 X-Received: by 10.98.64.73 with SMTP id n70mr3154093pfa.142.1521007478616; Tue, 13 Mar 2018 23:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521007478; cv=none; d=google.com; s=arc-20160816; b=rFdknQ05Wo4iaqaT+3zY7klp5vXqejB0B4Po1WhBKvCHp2rx1pLV3/RXHQGIp7evAr 8tRCrcVislAK/EitTyTOUczpF6Vswk5P6c3BfAm4A7ojUw85ZeFOBn10a8YHvaZmJHDp IJJ1kwIgk+sO7u+hVc53ih8Mplgijn7nhjzuly4WOUxvlQ/5GzOK+Fn2irnwR6mVI1gs 76FKEqoUlFJAJVw2sOdfe4ucrb/enr3LLpG7j1vmkpvnJE+knk2h4Ci90SVyYhNATgiw ci+fk64utznLClGiefWa0WsiT7YXpoh+Qu7W4gXdsxa3PjVC+GsvAmbwIez7fs2rprt5 ZUzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=XXQjC0gcnrmcZf3v9snrqctgGy7jO2Wt2ngX+cC9P7Q=; b=Isd7UA7ffGUEZig+PDbsx8l3iAezDfCaYtzDofwZvGAusUf18JiojvUBesLym3Xaiz SLWqSy59b+ofClPFbXquthapi2J5xCJcxLdHFIq2DW60URcd6X0gDrf/C5dXeD1j3GUP aOxzu6lKaZc0/3IJ/9KBSU1M9kD4kvu+0QEEp6Lg21X0tp0d2j6cSeovpaNYJTUOKIgj mNAuMvYgRIQs5YTTgr3ugNG/wjrv6sdg+5boS0KxUdQid5/RP24VhXlClycneexEXfZB G2nqG8CTsF95ujc76KXb6kgzbkbovZ9j1OgfVqw+OTS0I2MKxEsnHOfw2HSK+0J0YOAG iW6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=m3+EsS2I; dkim=pass header.i=@codeaurora.org header.s=default header.b=A4UrLglh; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j4si1361461pgq.119.2018.03.13.23.04.24; Tue, 13 Mar 2018 23:04:38 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=m3+EsS2I; dkim=pass header.i=@codeaurora.org header.s=default header.b=A4UrLglh; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753370AbeCNGDX (ORCPT + 99 others); Wed, 14 Mar 2018 02:03:23 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53582 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751272AbeCNGDV (ORCPT ); Wed, 14 Mar 2018 02:03:21 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id EADD06084A; Wed, 14 Mar 2018 06:03:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521007400; bh=/3dIWUeZqP+m5qoAIwJMl9TtGR2cxtkkFx+c71z2tsY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=m3+EsS2ICAL8OG20f2B1MIwdsQhbh7uCCvS160ZAiV03jXM9tiHPam7wj7kFcFMRH BdrfIWV6IDou+Gf5RE5jZaPoKnkyPYw5B6sBzLyNCl5UhID3U+pgvGlU/gLl077OfJ F64XiKIR5xKpwd1iBuUcOp+FJ4j7DbG1EhTbkwaQ= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.1.84] (unknown [182.71.117.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2D9CC60314; Wed, 14 Mar 2018 06:03:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521007399; bh=/3dIWUeZqP+m5qoAIwJMl9TtGR2cxtkkFx+c71z2tsY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=A4UrLglhOCtjmW27lAwORPRdM9Zu64AHbnFrrHDETRI50gob8ttDyQx4Uhnlc12Ql 8mJeYmog98BsR3rWcnAuFwJRFaFWDFcoQs43gQnjpRYwZag6TwtPLeblenKw9NA1Pk bcNJI7xMShJaS3Ko/ZicEF7w0riYNKptUJfgN5Vw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2D9CC60314 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org Subject: Re: [PATCH v5 09/36] drm/bridge: analogix_dp: Don't use fast link training when panel just powered up To: Enric Balletbo i Serra , 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, =?UTF-8?Q?St=c3=a9phane_Marchesin?= References: <20180309222327.18689-1-enric.balletbo@collabora.com> <20180309222327.18689-10-enric.balletbo@collabora.com> From: Archit Taneja Message-ID: Date: Wed, 14 Mar 2018 11:33:05 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180309222327.18689-10-enric.balletbo@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 10 March 2018 03:53 AM, Enric Balletbo i Serra wrote: > From: zain wang > > Panel would reset its setting when it powers down. It would forget the last > succeeded link training setting. So we can't use the last successful link > training setting to do fast link training. Let's reset fast_train_enable in > analogix_dp_bridge_disable(); > Reviewed-by: Archit Taneja Thanks, Archit > Cc: Stéphane Marchesin > Signed-off-by: zain wang > Signed-off-by: Sean Paul > Signed-off-by: Thierry Escande > Signed-off-by: Enric Balletbo i Serra > Tested-by: Marek Szyprowski > --- > > drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 9 +++++---- > drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 2 +- > 2 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > index f9661b410cb9..ea7a80a989c6 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > @@ -579,14 +579,14 @@ static int analogix_dp_process_equalizer_training(struct analogix_dp_device *dp) > if (retval != 1) { > dev_err(dp->dev, "failed to read downspread %d\n", > retval); > - dp->fast_train_support = false; > + dp->fast_train_enable = false; > } else { > - dp->fast_train_support = > + dp->fast_train_enable = > (spread & DP_NO_AUX_HANDSHAKE_LINK_TRAINING) ? > true : false; > } > dev_dbg(dp->dev, "fast link training %s\n", > - dp->fast_train_support ? "supported" : "unsupported"); > + dp->fast_train_enable ? "supported" : "unsupported"); > > /* set enhanced mode if available */ > analogix_dp_set_enhanced_mode(dp); > @@ -793,7 +793,7 @@ static int analogix_dp_fast_link_train(struct analogix_dp_device *dp) > > static int analogix_dp_train_link(struct analogix_dp_device *dp) > { > - if (dp->fast_train_support) > + if (dp->fast_train_enable) > return analogix_dp_fast_link_train(dp); > > return analogix_dp_full_link_train(dp, dp->video_info.max_lane_count, > @@ -1197,6 +1197,7 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge) > DRM_ERROR("failed to setup the panel ret = %d\n", ret); > > dp->psr_enable = false; > + dp->fast_train_enable = false; > dp->dpms_mode = DRM_MODE_DPMS_OFF; > } > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h > index 6a96ef7e6934..403ff853464b 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h > @@ -173,7 +173,7 @@ struct analogix_dp_device { > int hpd_gpio; > bool force_hpd; > bool psr_enable; > - bool fast_train_support; > + bool fast_train_enable; > > struct mutex panel_lock; > bool panel_is_modeset; >