From patchwork Tue Sep 29 04:08:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1373003 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C0m9V070Wz9sTQ; Tue, 29 Sep 2020 14:09:17 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kN6ws-0007xo-7i; Tue, 29 Sep 2020 04:09:06 +0000 Received: from mail-pf1-f195.google.com ([209.85.210.195]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kN6wm-0007wG-48 for kernel-team@lists.ubuntu.com; Tue, 29 Sep 2020 04:09:00 +0000 Received: by mail-pf1-f195.google.com with SMTP id d9so3259766pfd.3 for ; Mon, 28 Sep 2020 21:08:59 -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:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mIbUoWyNSHduwAG48VEi1lMPqTN9e+tNRK84IHrgG2g=; b=qnkvN1zUB/lunn+hLb2ku8KeJJmWHzpisidWy/7w88857/c6b5qniIIicliop9jRma TssJLunsus1IDy3Oh+eRPNRT0Z5qHV90OOekttGLHnmlHbAJHEMdHK2lStMmMKrR4Ppc WlPZ1BCCYAum+KHTA23eDEb9MiOupHOsmEcAEbPvbMP6anQo3FNaTO3q8K5id1WxxwWE BGO73IRiDQoQmSlLSrZQV0bEHAlrW3bL6kZnBDvvatV3gWMhhBgAnG19tnrGZ2vq6dgz lJMlDy2JfqCbBNCpeJQmhJZD4xyV5SXMcQzwg5X3GQEgV4xaYJA8RvJuo13PzwkFITY4 yK+g== X-Gm-Message-State: AOAM530yXuROihZWBXQs9yPltvbHg602rFvd7kzxVcG6OhlMiTyThcJ2 UhLLFgolSqOiQxibQD1sUzjjrO5mgSphFg== X-Google-Smtp-Source: ABdhPJys4KASKxCVb+/GJ7f+n1sPWTVk9Bv9FtcdNIBAU+/ZcvXt/2peX4u/IH9YaYagMVEAzF9+Rw== X-Received: by 2002:a63:dd0f:: with SMTP id t15mr1795105pgg.123.1601352537729; Mon, 28 Sep 2020 21:08:57 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id ie13sm3004174pjb.5.2020.09.28.21.08.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 21:08:57 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/2][SRU][F] UBUNTU: SAUCE: drm/i915/psr: allow overriding PSR disable param by quirk Date: Tue, 29 Sep 2020 12:08:48 +0800 Message-Id: <20200929040852.3852307-2-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200929040852.3852307-1-vicamo.yang@canonical.com> References: <20200929040852.3852307-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.210.195; envelope-from=vicamo@gmail.com; helo=mail-pf1-f195.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1897501 HP ZBook Studio G7 equips an INX FHD N156HCG-GQ1 panel that renders corrupted screen when PSR is disabled. This patch allows overriding the default disabled i915_modparams.enable_psr since LP: #1849947 to use chip default when a EDID match is on. Signed-off-by: You-Sheng Yang --- drivers/gpu/drm/i915/display/intel_psr.c | 8 ++++++++ include/drm/drm_dp_helper.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index e32adbbf4ee4..c0f397c8e1b7 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1219,6 +1219,14 @@ void intel_psr_init(struct drm_i915_private *dev_priv) if (!dev_priv->psr.sink_support) return; + /* + * PSR was disabled by module parameters but the underlying panel is + * depending on it, so use per-chip default to probe that automatically. + */ + if ((dev_priv->psr.dp->edid_quirks & BIT(DP_QUIRK_FORCE_PSR_ENABLE)) && + i915_modparams.enable_psr == 0) + i915_modparams.enable_psr = -1; + if (i915_modparams.enable_psr == -1) if (INTEL_GEN(dev_priv) < 9 || !dev_priv->vbt.psr.enable) i915_modparams.enable_psr = 0; diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 5bcb3f7d5d8e..79633ebe953f 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -1447,6 +1447,14 @@ enum drm_dp_quirk { * capabilities advertised. */ DP_QUIRK_FORCE_DPCD_BACKLIGHT, + /** + * @DP_QUIRK_FORCE_PSR_ENABLE + * + * PSR was disabled by default in Ubuntu 5.0 kernels and on, but some + * platforms might be depending on them. If so, use per-chip default to + * probe that automatically. + */ + DP_QUIRK_FORCE_PSR_ENABLE, }; /**