Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1961039imu; Sat, 22 Dec 2018 09:03:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/XU0w+eRYzENRU8leEfMjk/pf91nyPJgpAs8z6AbqBCI4MfvUpy/8aQG3uCO+Vz19V3GZpl X-Received: by 2002:a62:d005:: with SMTP id p5mr7117645pfg.175.1545498198870; Sat, 22 Dec 2018 09:03:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545498198; cv=none; d=google.com; s=arc-20160816; b=aqR5wpXXBF8KykpMVKfL+tTtOOCW7Z9i7Lh7+FZyxu/3Z2TFyt/IsF8fZ8J09IjUk3 krca2T6wyAQlxJf6WfUVyWreLo0M0dsY0P2DuUNizFQE9fXr5Y6qJr8/aOzncH+41vlF LjGm3GIa1s3Z+8KLOAXMFytdpA7a7pN1J6Derix06rLrvHRXIV2ijNBVMFAAjsHqd2cE Tx7JiKzO/5ZSfJhJ9dWCz3Wg2RxTqkMOIZ3r2u1V12bPVYY4fX4KEACKaNJIZOHiVRmW 71o8ngy4mH4a3VALWWAcHjeu/ZZAe4MVMvpyHedPdiprRQs7o2YEa5Uqsqj8Mcldah/k gjog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=VSW+tLPB26ac+EjuDmMVtQ+PpN5jnpKDYZiSTsubMYI=; b=X/jpr0PMvA9q6V1iV+4RkOAYyGvF8Xzv+a75VQC7mTzDNyjwRaHvTWHQqtewZuPNxS 8W22u1kOo+M15jtuRC9DImyOxRWJZ4CVb3H7b2HGiGtPb3/lhq4ffpMqe3E87udXqpmu IBU7S7ZU7P3iG+JcHkwsiMzIWJO2IkQMBg511exLgD/bllsZZ0f6OqWbWVIcq4aiGdA/ otn6R2PYEnmQj5xIe022OMZIC5Nujo8VPUdRVnISJq210g/sxJVbw2J7Aih5H/3rJrIl CZoAWnMP+NzUsY2FJ8OfKyGB5tczA3cgtPl2ngO8eu8jmAJdRPaw79tJRXZ713c2z7s0 WjIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=kQ2Kf1DA; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 15si23913721pgv.351.2018.12.22.09.03.03; Sat, 22 Dec 2018 09:03:18 -0800 (PST) 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=@google.com header.s=20161025 header.b=kQ2Kf1DA; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388487AbeLURXJ (ORCPT + 99 others); Fri, 21 Dec 2018 12:23:09 -0500 Received: from mail-it1-f202.google.com ([209.85.166.202]:58620 "EHLO mail-it1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbeLURXJ (ORCPT ); Fri, 21 Dec 2018 12:23:09 -0500 Received: by mail-it1-f202.google.com with SMTP id p21so5651410itb.8 for ; Fri, 21 Dec 2018 09:23:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=VSW+tLPB26ac+EjuDmMVtQ+PpN5jnpKDYZiSTsubMYI=; b=kQ2Kf1DALnxK+MigKJQF44FE6BmFXCn7Ipo5ERYyvgGQAW89sscN1iZ6cCA18Lycx0 +hNbrBYRCb4Yij1I5NW0c26rRsJi3m6sPPA7ZTSWa/ovh3Gb0jh9UAY7xZF2aPP0alNQ HO/VwbzqD/vDX5xox6Wsn9idCxTbp9eVzGu5NWECG1bYA3guh7/eoAFxI9o4tY63CFLN F0cXXE/Q1wyKUY5UeUaUzYg17pPhovi2SiI8QwXFCZ0S3OBdnYaAvwhByyyGc4ECsIbd gT5Y298ZKCBhnp1n471RePSIdIEzAnuO05eZ78JVlD1jaly7WGI4LSpb7g7qJrBHZWh3 pP3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=VSW+tLPB26ac+EjuDmMVtQ+PpN5jnpKDYZiSTsubMYI=; b=JzPwPkshiwjU7IANQ9cSVu37M2KKcpm3vtdx8bfOMCDrlqg9lfV3dvDxy8IabcXOTb dQwV8vfyuwUn4anWreI4EzcPb298xgJsB2FaY4p+YmIiggareuo5eot3ZZhkGEKFgZVQ uvwR2aoZcUB99ZCMvb+efhO14yHHNmfikZTcW+zVbrOkzsp9MEAGbwzkUWPyJknXtOzT 0bRJTCmB49URvfGExuwNEBAlgSDqdCUIhvmfwJMYeOxhITLj1wpZGkBNk6gmu+rAJJqF zCqioHdVokRBC0mlQZG6e3Xs1zfEhDzzhL/M6/FGjIYpKvnECBgcDFsuyUNuqwvAThe+ EMog== X-Gm-Message-State: AA+aEWZH5Ql9DR7dFPsgqrSiUN1CeAFJaSpZ7bRpVH1MFJCXgb4bhcP6 jCH1dhIL1F+aGtp6uaTCyiSURg9lkq9Eh70N77E3G2YLRIJYuIF/x82eiDZIG/IGHxmtpg3dKgi bdYk364RMfqe80ZP4/sYrNkRXXXpE6kH5OAe9COfKYPYHFYW8Bfc9jcPAzE2EmAvtjfkjD1LK X-Received: by 2002:a24:1f0f:: with SMTP id d15mr2525062itd.31.1545412988207; Fri, 21 Dec 2018 09:23:08 -0800 (PST) Date: Fri, 21 Dec 2018 10:23:05 -0700 Message-Id: <20181221172305.195943-1-zwisler@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.20.1.415.g653613c723-goog Subject: [PATCH] drm/i915/psr: simplify enable_psr handling From: Ross Zwisler To: linux-kernel@vger.kernel.org Cc: Ross Zwisler , Daniel Vetter , David Airlie , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Jon Flatley , Dhinakaran Pandiyan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit: commit 2bdd045e3a30 ("drm/i915/psr: Check if VBT says PSR can be enabled.") added some code with no usable functionality. Regardless of how the psr default is set up in the BDB_DRIVER_FEATURES section, if the enable_psr module parameter isn't specified it defaults to 0. Remove this dead code, simplify the way that enable_psr is handled and update the module parameter string to match the actual functionality. Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Signed-off-by: Ross Zwisler --- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_params.c | 4 +--- drivers/gpu/drm/i915/i915_params.h | 2 +- drivers/gpu/drm/i915/intel_bios.c | 1 - drivers/gpu/drm/i915/intel_psr.c | 7 ------- 5 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 872a2e159a5f9..b4c50ba0b22a6 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1115,7 +1115,6 @@ struct intel_vbt_data { } edp; struct { - bool enable; bool full_link; bool require_aux_wakeup; int idle_frames; diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c index 295e981e4a398..80ce8758c3c69 100644 --- a/drivers/gpu/drm/i915/i915_params.c +++ b/drivers/gpu/drm/i915/i915_params.c @@ -87,9 +87,7 @@ i915_param_named_unsafe(enable_ppgtt, int, 0400, "(-1=auto [default], 0=disabled, 1=aliasing, 2=full, 3=full with extended address space)"); i915_param_named_unsafe(enable_psr, int, 0600, - "Enable PSR " - "(0=disabled, 1=enabled) " - "Default: -1 (use per-chip default)"); + "Enable PSR (default: false)"); i915_param_named_unsafe(alpha_support, bool, 0400, "Enable alpha quality driver support for latest hardware. " diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h index 6c4d4a21474b5..144572f17a83d 100644 --- a/drivers/gpu/drm/i915/i915_params.h +++ b/drivers/gpu/drm/i915/i915_params.h @@ -42,7 +42,7 @@ struct drm_printer; param(int, enable_dc, -1) \ param(int, enable_fbc, -1) \ param(int, enable_ppgtt, -1) \ - param(int, enable_psr, -1) \ + param(int, enable_psr, 0) \ param(int, disable_power_well, -1) \ param(int, enable_ips, 1) \ param(int, invert_brightness, 0) \ diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 1faa494e2bc91..d676d483d5cf1 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -551,7 +551,6 @@ parse_driver_features(struct drm_i915_private *dev_priv, */ if (!driver->drrs_enabled) dev_priv->vbt.drrs_type = DRRS_NOT_SUPPORTED; - dev_priv->vbt.psr.enable = driver->psr_enabled; } static void diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index b6838b525502e..26e7eb318cf07 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -1065,13 +1065,6 @@ 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; - } - /* Set link_standby x link_off defaults */ if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) /* HSW and BDW require workarounds that we don't implement. */ -- 2.20.1.415.g653613c723-goog