From patchwork Thu Feb 28 21:09:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10833733 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E6571575 for ; Thu, 28 Feb 2019 21:10:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 291222ED5A for ; Thu, 28 Feb 2019 21:10:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 194692F198; Thu, 28 Feb 2019 21:10:08 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C3BC32ED5A for ; Thu, 28 Feb 2019 21:10:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F14446E23B; Thu, 28 Feb 2019 21:10:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC7656E23B for ; Thu, 28 Feb 2019 21:10:03 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id w4so25358536qtc.1 for ; Thu, 28 Feb 2019 13:10:03 -0800 (PST) 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=vQSuWA9y6TVzyHcN13bgJ027Z4HSUwbAEc+mu9xpkUM=; b=AMTIgKXdrf92ryjxxhrz1TKs8LVjHl0jjtqK/pYCh2MGnZH4nxD1741uTgiMnmo9W9 KnX5jqbLz5/KN3lnCDfSVHnFRpkR21fCEo8g0Ixxe6Bhb3/XLIlvaDx1PRP8urd4l0jA psnFvHaa4tHaNQSgBCeQJL7VKw48wzoFb1ZXa8KqQUJF0/1kgNs803fuVhQhg6mFmWOG fJix2QfIhrvKL7jw6frLETvdL+wWLYfnQEMJJBHH409z1U1xClyH7dsm57vw9Cvt5p2T RKPzrEAL/bp3wobLrxHbrZZHvTjLk8UWHdeq5+HVsfewDA0If7XuW6DQrHFKlC1IWbNO cHjg== X-Gm-Message-State: APjAAAX1Z7YD+eekY0XAaSsAotxnDxpYNEq+SkHQsIgIQBK63wxP79Lx RicLyr+Hn1G8T+UbBK/XXLf0gynRBP4= X-Google-Smtp-Source: APXvYqwYqaGh3N3oHSiEIrzwgmD5dS40mFfaQP+kBBkujcepgXGbDLCsoAwXhfCUYUX8NSeqX9cS3w== X-Received: by 2002:a0c:e1c9:: with SMTP id v9mr1083033qvl.186.1551388202870; Thu, 28 Feb 2019 13:10:02 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id 70sm23271846qkb.39.2019.02.28.13.10.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Feb 2019 13:10:02 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/5] drm/rockchip: Check for fast link training before enabling psr Date: Thu, 28 Feb 2019 16:09:31 -0500 Message-Id: <20190228210939.83386-3-sean@poorly.run> X-Mailer: git-send-email 2.21.0.rc2.261.ga7da99ff1b-goog In-Reply-To: <20190228210939.83386-1-sean@poorly.run> References: <20190228210939.83386-1-sean@poorly.run> MIME-Version: 1.0 X-Mailman-Original-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=vQSuWA9y6TVzyHcN13bgJ027Z4HSUwbAEc+mu9xpkUM=; b=cNOeIkwBpjbCM6MrQs8adwSHjUYWX1aoTPUb1aTokSQ+97Tz9AeSzA/dRGkAWVwtFV 056FrVzoWGD6CphG+YYMPYpufNF+6jYdWR7nKYHgJYtUkIxdpjJATfL2qNnLl1jxRO4a U1xYDEHrqYbE6BmfDghQc+WRawx/bjfvXlxLhpTsvf3rNSrwvEqJHLpj1NKAiLRl5OsG UxHdcdUN5Dh6gEWO1lTefq1hTLJEeBJLtTPX/bW5LMPi1koNiB+4wLHQWUxN8vertdt7 vgUe5ne7B7BT4YeYJgTeR/Qm2Ym1fDm63iwoGyK+h6u89bCjy70aNgZgu9V8t8DHY/dS xrEA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zain Wang , David Airlie , Tomasz Figa , Sean Paul , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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. 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; }