From patchwork Thu May 2 19:49:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10927609 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 0E98617DF for ; Thu, 2 May 2019 19:50:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F22F32621B for ; Thu, 2 May 2019 19:50:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E624B26223; Thu, 2 May 2019 19:50:34 +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 92FFB26222 for ; Thu, 2 May 2019 19:50:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 87618897C8; Thu, 2 May 2019 19:50:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id D768C897C8 for ; Thu, 2 May 2019 19:50:31 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id c13so4063625qtn.8 for ; Thu, 02 May 2019 12:50:31 -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=RZ54H5MP9upabrXqeLSqzX5B4e3SolToSymz2mrIX3g=; b=HmOG8oJa6hcwiTBTJPiJEcsLOns/dAuOPKLSDQst7SOvAwbIjkajcjSngFaos6ptUF oTXOHNd4YlHykUdrMYdxZ1RMorS3vgAuDdrvGbZUekwi87pUCwouRqCoMD555oU4bP1h FhNxRkE31O9XO3n55jeqpLoYdzpuGpTMEehq8ISaCYXhipXci/JvxEDHdqRFyvrePu6Z qcvPHQFQJ9tojam7vzlKe8W84fkM9Fs39h6lUe5XuNofHo8QOIRhTVydRomSZeb/N2Yn YlHWf86GvODCmNAprT2ubX+vrOFZnu1ZLshCt99XI+Sjy4y63nY65F/MmlzN9wQPh/0o 2Hmw== X-Gm-Message-State: APjAAAXXRMwekRw0vTiKtsl+ziJ1qN8N4iGeW/hJCzC/91py0XIg3fWI 0zksSo1qZe/RdVRN/OLsJm5TgA8OLPg= X-Google-Smtp-Source: APXvYqwAd8mPI1Y2X3nRzth4DBaEKIcYqgIeuz6v1B3p53DHZ6z1xy8o5RlN/aCWFGrWOEYwFDn/1w== X-Received: by 2002:a0c:d1ad:: with SMTP id e42mr4626493qvh.208.1556826630783; Thu, 02 May 2019 12:50:30 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id k36sm34366qtc.52.2019.05.02.12.50.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 May 2019 12:50:30 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 07/10] drm/rockchip: Check for fast link training before enabling psr Date: Thu, 2 May 2019 15:49:49 -0400 Message-Id: <20190502194956.218441-8-sean@poorly.run> X-Mailer: git-send-email 2.21.0.593.g511ec345e18-goog In-Reply-To: <20190502194956.218441-1-sean@poorly.run> References: <20190502194956.218441-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=RZ54H5MP9upabrXqeLSqzX5B4e3SolToSymz2mrIX3g=; b=FsXqbJVv4RjRteYBjM0Eb+VX1/TtUdDikLizo73Bi9HiCMSOPFuAufT/n4Q0GOm+oL dx0vzWr1cd1TEJGqPMZnYqb2oMzIYKMj/ePX5r8SghQTOSPT4N/agsp3wwhIJDf1rrj+ HSs+0UXs+k+LvehE+GG37RleWXUrjqHccmPQTzz4S0I59L6RTJhajKsH0qVTMC3sEd/i HlMdfkhfl0YrZkiUpk0wFgaHpm/8edFw4g3PRGazWh7UiQmMW5QeH1BQrN4kg8TBjVHF ygoZsBxt0bMRDzc4xnb5VWFy4ktlZ0nOtmNp54zZnkBMrV3XFQahq1cRPXt0kZRog3gn t47g== 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 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 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; }