Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5188397yba; Wed, 8 May 2019 09:11:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBdfgRrd4EG68nkZ0vsufEAYggvYOM19B3GldftPjq5GjKeJY/guBqC+cHm+aWmtykEqnE X-Received: by 2002:a17:902:f24:: with SMTP id 33mr48131283ply.33.1557331894768; Wed, 08 May 2019 09:11:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557331894; cv=none; d=google.com; s=arc-20160816; b=B69c0Tr4U+asfiERCBkZ9Jde1Jm61vCjmkRJJoH+rEFV6uDgwWtmHhwSm9KaZFCFBk gRo2ijDoSNkiiZ6dwiORIWhUFXRGMUwZy0o40SJpPiBtZtnfXHT91hzphjq7lnub5JeH DV8yhl6FIS3bTESNXjaanxAwQtLpSFZfLKLZ7lA5hdYTD9tVud9vf+iMxJcNGUmUBcpx uwvORI5AjpyePeViDLKO7Gz4IpSuFRc4fd9lcTkkjK0rTg8Ot3PsjrN6tVcd79K2dApu OEt3A4gU4xMgK9huGTPE5YWlFWl+oPC525n1t+WQMBnulFh1RAPI05mG2i8xdUvunta9 4ufQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=H6sWye7vOcqRkubQDg1bib3x5zX/fJ7sX+bA/ddrNzA=; b=KsuNQSJ2cGebPTECYwnXj2HrzoNftPTwPYO3GtBnIzqcz9gIMdFemqs+cvmLmi+w+2 WhG1iG4IiPqftJq1o8SsMLzWyJDr0l+8UgvhNeK2IKLLX3mY/gUsxhJBfHUsnwp8tBA0 s4B0ibdUHczzerjP9s5q6RuZ/8A68RzBGO8XgGdmp9VCjZoVyPWHgj0YbeTybTXrKoD+ HJ4zKY64311oPM2GESOO/NNYLjCDfQcyReb/kgVztYHO0mCiCGOzFP2usW+gyXMb6s5W YWD5Ace2pINzh1arnDHZX4bOJAA1glmqQSfq83Y8dhERV7h9N+AlbmqCL2TNw7TdxmA0 +WHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@poorly.run header.s=google header.b=M9DbqMXx; 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 u2si22618035pfn.4.2019.05.08.09.11.14; Wed, 08 May 2019 09:11:34 -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=@poorly.run header.s=google header.b=M9DbqMXx; 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 S1728115AbfEHQJk (ORCPT + 99 others); Wed, 8 May 2019 12:09:40 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:43662 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728070AbfEHQJi (ORCPT ); Wed, 8 May 2019 12:09:38 -0400 Received: by mail-qt1-f196.google.com with SMTP id r3so13952985qtp.10 for ; Wed, 08 May 2019 09:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H6sWye7vOcqRkubQDg1bib3x5zX/fJ7sX+bA/ddrNzA=; b=M9DbqMXxsg6gdTcr3U6UYjS/8AXwuGbum9KW43E8enhwhN1H0R5dv36jT64MH1xlWn bcKWLzSz0TFNkp040TyCh4dmg6sICaj9MHCNvjo7tH10V+mOko2YalfhimHEEr5lQ551 jYgviwwt1Xormlt8X/oCX8rlNDoV5axtAngv1yTI4yxA6CCHULqXzk6VCsZNt+jMvjo8 b5ZbTy2A5txbryGq03OaJ84/GrnC+TzgfQmnSmVMoo0UvSncJ9184Z4svXZaSyNFZhQG SXWVhrT/7bzya61fb34B6gJH8oAJtKuZCw/kNrN77nS2w1HR9qSuA9W7/iLAiq+oAqgd Gv3g== 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:mime-version:content-transfer-encoding; bh=H6sWye7vOcqRkubQDg1bib3x5zX/fJ7sX+bA/ddrNzA=; b=NYulBlU9sIYGeS8raCSRHQlEWC1O6v1lPHzgJ9v3sHu9CahYKE81oydVzQqvRzvHxg lMBU/ekZYM0wu4oHjy1YUgknvBWLviunVE+yrQyNTMOaMETIc12fuklZu7qe0qTmmVTF ZDaJNDir4dNcbmZqT7ZUNVpOJaKCDWbaQFtiWK9C4vbWl8vF7wnZoIQvKv3mhq7T5J06 M7f5uOzAIBHiz1IN1oJehSf8BWt+CEPhSTGCm4PCXm8+AGFnWYOGl0qleUmZILVsc/hr yx5mB+dk1tYmgNq9dyCYFezo8glbUU5b7OmOHrL/tM3yuxXprfI6ZCiNVt6fgzHcXqGA zpug== X-Gm-Message-State: APjAAAXTBCtZJXj08uCCJ3zyXI5yk4TSMoSpbvUXTiValJdrWHwADMdv /6KPllK/2k5GSGoQKmCPDIGn8w== X-Received: by 2002:ac8:2e74:: with SMTP id s49mr13218772qta.23.1557331777544; Wed, 08 May 2019 09:09:37 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id s50sm10936877qts.39.2019.05.08.09.09.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 09:09:37 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Cc: Sean Paul , Zain Wang , Tomasz Figa , Andrzej Hajda , Laurent Pinchart , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org Subject: [PATCH v4 07/11] drm/rockchip: Check for fast link training before enabling psr Date: Wed, 8 May 2019 12:09:12 -0400 Message-Id: <20190508160920.144739-8-sean@poorly.run> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog In-Reply-To: <20190508160920.144739-1-sean@poorly.run> References: <20190508160920.144739-1-sean@poorly.run> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Paul Once we start shutting off the link during PSR, we're going to want fast training to work. If the display doesn't support fast training, don't enable psr. Changes in v2: - None Changes in v3: - None Changes in v4: - None Link to v1: https://patchwork.freedesktop.org/patch/msgid/20190228210939.83386-3-sean@poorly.run Link to v2: https://patchwork.freedesktop.org/patch/msgid/20190326204509.96515-2-sean@poorly.run Link to v3: https://patchwork.freedesktop.org/patch/msgid/20190502194956.218441-9-sean@poorly.run Cc: Zain Wang Cc: Tomasz Figa Signed-off-by: Sean Paul --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 9 +++++---- 1 file changed, 5 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 225f5e5dd69b..af34554a5a02 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1040,16 +1040,17 @@ static int analogix_dp_commit(struct analogix_dp_device *dp) if (ret) return ret; + /* Check whether panel supports fast training */ + ret = analogix_dp_fast_link_train_detection(dp); + if (ret) + dp->psr_enable = false; + if (dp->psr_enable) { ret = analogix_dp_enable_sink_psr(dp); if (ret) return ret; } - /* Check whether panel supports fast training */ - ret = analogix_dp_fast_link_train_detection(dp); - if (ret) - dp->psr_enable = false; return ret; } -- Sean Paul, Software Engineer, Google / Chromium OS