From patchwork Wed May 8 16:09:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10936183 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 BCD441515 for ; Wed, 8 May 2019 16:09:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACD6228587 for ; Wed, 8 May 2019 16:09:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A130428595; Wed, 8 May 2019 16:09:46 +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 596C22811E for ; Wed, 8 May 2019 16:09:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26FCD89830; Wed, 8 May 2019 16:09:43 +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 EB4E189817 for ; Wed, 8 May 2019 16:09:38 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id i31so1111713qti.13 for ; Wed, 08 May 2019 09:09:38 -0700 (PDT) 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=Y9MNBmkGiLCpIweefm3uzvOIACYE4k726pW93RuiHU7seEYpYDQwGPQbnYfdGgyYON +njNNiKxlUvD6Lu3cObeqeOfZDMqR6/4rmKeLlrXu2c5/iDsou3SaQzDV1CWmlh1FSz4 eNV2o+TzgBEEGmkYSc0UPihCBaUQ4jw1zcF4SJaB5nKNGtfuXE/Rbcw1LGN9eO7kBZTW T8qSXLW05oeeRfbyT+i1JVRo68+i0nj4xhr4LYYZxbECBrDHtVjLwSGfIkkpMVUPc10x kOX9AIZRt1Cfdq9EEYfgvAdDuH/ugQGiZzFu4zZs6dXhQ+MsKSvLzYLxmb4smgev+TZL 9IlQ== X-Gm-Message-State: APjAAAXDDfs8/gybLdsUQCxK5xrvvc81nbc60RB9Lf3zab74l0U8ZnTR cNQ3cru8l5z99z7k23tBxgvcKx5qWng= X-Google-Smtp-Source: APXvYqwo6mxDALGKSuzORSfL9rLrjWhNGfhiAJ5bnQe25PUPvfxNdfqYZfXg96kvP4i3gn/wsHozSQ== 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 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 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=H6sWye7vOcqRkubQDg1bib3x5zX/fJ7sX+bA/ddrNzA=; b=M9DbqMXxsg6gdTcr3U6UYjS/8AXwuGbum9KW43E8enhwhN1H0R5dv36jT64MH1xlWn bcKWLzSz0TFNkp040TyCh4dmg6sICaj9MHCNvjo7tH10V+mOko2YalfhimHEEr5lQ551 jYgviwwt1Xormlt8X/oCX8rlNDoV5axtAngv1yTI4yxA6CCHULqXzk6VCsZNt+jMvjo8 b5ZbTy2A5txbryGq03OaJ84/GrnC+TzgfQmnSmVMoo0UvSncJ9184Z4svXZaSyNFZhQG SXWVhrT/7bzya61fb34B6gJH8oAJtKuZCw/kNrN77nS2w1HR9qSuA9W7/iLAiq+oAqgd Gv3g== 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 , linux-kernel@vger.kernel.org, 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. 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; }