From patchwork Fri Mar 10 04:32:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9614675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 43E9560415 for ; Fri, 10 Mar 2017 04:39:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34ED62864A for ; Fri, 10 Mar 2017 04:39:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28EC9286EF; Fri, 10 Mar 2017 04:39:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A65582864A for ; Fri, 10 Mar 2017 04:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BqUkIhPvL9Ps7bMf/VaZ4eMsccbgMfJF5fEL7Hd6aeQ=; b=hzj2py2RtQ99aUajc2Jvaisp1j Ibf7rJ1FbyjLu2xQklvOj9mAsgj+fXmf1ybauDe3obXI93v+Wy9lE/IRPQ/IaxuZ5C7Z0TNJ8D00v Pf6bCKZVrf4tbdK1eL0V+lre3088XOUGncrWe5Tlp5fd/L6q1GY7u9TBZ3axAShb0nlm96lu21YGz DALM/W9+UJ0HhhNumtCYLyNy6NX7lMrlPRohSDKrD4XHl0CLosuQaXwqCE+rDq6f4kq7gD7CnUo0u yCpqaLbqLJTtvR7QAqzmIsZwhyQpCJTofl+BzwhESFwPmu5uak79lCMVuB0S1hbAJepWRPuveQR55 chj1RpCQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cmCKy-0002Sh-DF; Fri, 10 Mar 2017 04:39:32 +0000 Received: from mail-qk0-x230.google.com ([2607:f8b0:400d:c09::230]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cmCKu-0002NQ-Qw for linux-rockchip@lists.infradead.org; Fri, 10 Mar 2017 04:39:30 +0000 Received: by mail-qk0-x230.google.com with SMTP id y76so152218521qkb.0 for ; Thu, 09 Mar 2017 20:39:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Bsc///pszeHVTtI6ibmgVzlOwIWKqCz+KSlz2n8U2z4=; b=d9z3IAC4woyrsHu2sRBMCpdv601LhMt2e5A9NN4a4fGKcSbpe7c9myuqVFqe8sO0L6 qYJXzfrlA2NFRKEKkCozzENPUcpNoo2qBb1ior99cOk8Wmj0e7Qyv0th6iydUYobSl6O 275ks2uBw7cymHMFSFGTofCmVjuxE8GhmzV44= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Bsc///pszeHVTtI6ibmgVzlOwIWKqCz+KSlz2n8U2z4=; b=SW5GbA3UzUPGMStodUPkY/oH1a9Re/OssHjmDsBCAQIVJ2DhZ8z/qI/ktqQ7yyzlOU il3k7VrYxkJPcpGzKD5k26grvlLkrF2GVl7T6Jq6LHA2ITpvpAy19Ceh9lTw0srpp+7+ lb0vyRiryJuxlBj1eX6Yd8RD8E17jVrDfVptWSxl6tRRmKVcK2b90r01E1x1I0z/f55/ uQHKn8tOeHjXn9c4WWgALfi6wPE0v7CfQ1GCU0EujjC4Tt9tvRnsqewqjRAoKJGqoD3Z 3lA7dfYVsG+2ZephsF+qmzV9ohd1taAzZiaIbw+LNoQZ8GJW+ST09WZ9YzByzxh8jd3j UV8g== X-Gm-Message-State: AFeK/H2EeE9nmg/tuIhslgFIVhEYOe+V4AjzD/n8Ra90ZojHrNKaPrIkpxrjWPfSCv+75lPV X-Received: by 10.55.168.73 with SMTP id r70mr18223921qke.280.1489120747991; Thu, 09 Mar 2017 20:39:07 -0800 (PST) Received: from boxwood.roam.corp.google.com (cpe-75-189-128-87.nc.res.rr.com. [75.189.128.87]) by smtp.gmail.com with ESMTPSA id n19sm5697731qtn.35.2017.03.09.20.39.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Mar 2017 20:39:07 -0800 (PST) From: Sean Paul To: linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH 23/41] drm/bridge: analogix_dp: Fix incorrect usage of enhanced mode Date: Thu, 9 Mar 2017 23:32:38 -0500 Message-Id: <20170310043305.17216-24-seanpaul@chromium.org> X-Mailer: git-send-email 2.12.0.246.ga2ecc84866-goog In-Reply-To: <20170310043305.17216-1-seanpaul@chromium.org> References: <20170310043305.17216-1-seanpaul@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170309_203928_961255_26B1129E X-CRM114-Status: GOOD ( 10.86 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Archit Taneja , zain wang , Lin Huang , Tomeu Vizoso , David Airlie , Douglas Anderson , Tomasz Figa , Sean Paul , Yakir Yang MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 043641aa0a6f..8d69d4327871 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -284,6 +284,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++) @@ -596,8 +598,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; @@ -947,8 +947,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);