From patchwork Wed Jul 25 07:22:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dhinakaran Pandiyan X-Patchwork-Id: 10543631 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 97DFA14BC for ; Wed, 25 Jul 2018 07:22:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D44828640 for ; Wed, 25 Jul 2018 07:22:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DA4D2943D; Wed, 25 Jul 2018 07:22: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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 22C1A28640 for ; Wed, 25 Jul 2018 07:22:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA4A66E05C; Wed, 25 Jul 2018 07:22:44 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id E1CDF6E05C for ; Wed, 25 Jul 2018 07:22:43 +0000 (UTC) Received: by mail-io0-x244.google.com with SMTP id g11-v6so5528892ioq.9 for ; Wed, 25 Jul 2018 00:22:43 -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:mime-version :content-transfer-encoding; bh=H8lIXpdBV9OZ8pS0xMcfqhTbtGkzrS7IIIcr4YQcuUw=; b=O4z02+gG1BBcBZlbXydiycb2vmYib4x5py0r4DS4tpFIR86nF1XQUwwikkdorGdrzn 0vyEBtHt30x/4mzsXls9CdeONCgiGAMGfAqpZ5SJnn4tvxzqiEMSiYvA7IweNknsGYGQ UvHCkY3k2069oXDy9dj3B77kat8WDWOQbtRRKNbeAlxn6/Zahek6x3kwKBTfXSdM8snq EgyiJ0fw71dyzezHfcAfpLG0MxuryMKkwF/0xY08DozUgelTFt+mMe4iiIJD9EF1Pbl/ +VgCQMAac2V4vMNK662MCeBSm9RjwQvUXJ+H9KUBVP7hBUuMdEglSJl9MLPYmHFsAHKn 1fBg== X-Gm-Message-State: AOUpUlGNoyqTLXf3Af8yN1zILw0+52950jX26v9etJN58FA9KuS9+QI2 ZMVuxXyvqW6TBfinA5lyB/kvzugx X-Google-Smtp-Source: AAOMgpeaBMvXFQmLuOQiiCf2sL6SA8UMN7de8RCKDnJyt4w6WiA2AwyjKdiweG6cYsowlsobw7IHQQ== X-Received: by 2002:a6b:3757:: with SMTP id e84-v6mr16486408ioa.151.1532503362817; Wed, 25 Jul 2018 00:22:42 -0700 (PDT) Received: from dk-ThinkPad-X260.fios-router.home (50-39-164-98.bvtn.or.frontiernet.net. [50.39.164.98]) by smtp.gmail.com with ESMTPSA id d12-v6sm1815490itf.44.2018.07.25.00.22.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jul 2018 00:22:41 -0700 (PDT) From: Dhinakaran Pandiyan X-Google-Original-From: Dhinakaran Pandiyan To: intel-gfx@lists.freedesktop.org Date: Wed, 25 Jul 2018 00:22:28 -0700 Message-Id: <20180725072228.2469-1-dhinakaran.pandiyan@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915/psr: Enable PSR1 by default on gen9+ platforms X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dhinakaran Pandiyan , Rodigo Vivi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP We have merged several fixes, re-written some tests and improved debug capability in the past several months, so this is a good time to give PSR1 another try. PSR1 has not been tested on HSW and BDW recently, so let's enable only on gen9+ now. Cc: Rodigo Vivi Cc: José Roberto de Souza Signed-off-by: Dhinakaran Pandiyan --- drivers/gpu/drm/i915/intel_psr.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index 4bd5768731ee..942db85da6a1 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -471,10 +471,8 @@ void intel_psr_compute_config(struct intel_dp *intel_dp, if (!CAN_PSR(dev_priv)) return; - if (!i915_modparams.enable_psr) { - DRM_DEBUG_KMS("PSR disable by flag\n"); + if (!i915_modparams.enable_psr) return; - } /* * HSW spec explicitly says PSR is tied to port A. @@ -516,7 +514,11 @@ void intel_psr_compute_config(struct intel_dp *intel_dp, } crtc_state->has_psr = true; - crtc_state->has_psr2 = intel_psr2_config_valid(intel_dp, crtc_state); + + /* Enable only PSR 1 by default for now */ + crtc_state->has_psr2 = i915_modparams.enable_psr == 1 && + intel_psr2_config_valid(intel_dp, crtc_state); + DRM_DEBUG_KMS("Enabling PSR%s\n", crtc_state->has_psr2 ? "2" : ""); } @@ -956,12 +958,10 @@ void intel_psr_init(struct drm_i915_private *dev_priv) if (!dev_priv->psr.sink_support) return; - if (i915_modparams.enable_psr == -1) { - i915_modparams.enable_psr = dev_priv->vbt.psr.enable; - - /* Per platform default: all disabled. */ - i915_modparams.enable_psr = 0; - } + /* Enable PSR 1 default only on gen9+ */ + if (i915_modparams.enable_psr == -1) + if (INTEL_GEN(dev_priv) < 9 || !dev_priv->vbt.psr.enable) + i915_modparams.enable_psr = 0; /* Set link_standby x link_off defaults */ if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))