From patchwork Wed Feb 22 14:17:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Werner Sembach X-Patchwork-Id: 13149215 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14371C6379F for ; Wed, 22 Feb 2023 14:25:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8479910E9D4; Wed, 22 Feb 2023 14:25:22 +0000 (UTC) Received: from srv6.fidu.org (srv6.fidu.org [IPv6:2a01:4f8:231:de0::2]) by gabe.freedesktop.org (Postfix) with ESMTPS id CA01A10E9D1; Wed, 22 Feb 2023 14:25:19 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by srv6.fidu.org (Postfix) with ESMTP id 91652C800A8; Wed, 22 Feb 2023 15:18:01 +0100 (CET) Authentication-Results: srv6.fidu.org (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=tuxedocomputers.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= tuxedocomputers.com; h=content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from; s=default; t=1677075481; x=1678889882; bh=Dr Ii1vuCf0M2qkQQn1lUvMJ7ABWpWQc5qIqqv1HPM50=; b=Fq9S7N0c+dEIgnEHyc On4fqdsfakUPcCu8AU0KxA+72yqCncWNwK6E20AmhN3NjRgP0OxedOLuiE02WjTK lp8oXvdtB4lCDdRBIFj6l60uo4brLpDJT87FRbbBdCrfdYiWtr9LtXmEAveT0AcE UwUR33QIsWI1z9EwZ8eCww7bQ= X-Virus-Scanned: Debian amavisd-new at srv6.fidu.org Received: from srv6.fidu.org ([127.0.0.1]) by localhost (srv6.fidu.org [127.0.0.1]) (amavisd-new, port 10026) with LMTP id ssDc2LTHyjkA; Wed, 22 Feb 2023 15:18:01 +0100 (CET) Received: from wsembach-tuxedo.fritz.box (host-88-217-226-44.customer.m-online.net [88.217.226.44]) (Authenticated sender: wse@tuxedocomputers.com) by srv6.fidu.org (Postfix) with ESMTPA id 5CECEC800A5; Wed, 22 Feb 2023 15:18:00 +0100 (CET) From: Werner Sembach To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com, airlied@gmail.com, daniel@ffwll.ch, jose.souza@intel.com, jouni.hogander@intel.com, mika.kahola@intel.com, ville.syrjala@linux.intel.com, lucas.demarchi@intel.com, Diego.SantaCruz@spinetix.com, wse@tuxedocomputers.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] Add quirk to disable PSR 2 on a per device basis Date: Wed, 22 Feb 2023 15:17:54 +0100 Message-Id: <20230222141755.1060162-2-wse@tuxedocomputers.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230222141755.1060162-1-wse@tuxedocomputers.com> References: <20230222141755.1060162-1-wse@tuxedocomputers.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This adds the possibility to disable PSR 2 explicitly using the intel quirk table for devices where PSR 2 is borked, but PSR 1 works fine. Signed-off-by: Werner Sembach Cc: --- drivers/gpu/drm/i915/display/intel_psr.c | 4 +++- drivers/gpu/drm/i915/display/intel_quirks.c | 6 ++++++ drivers/gpu/drm/i915/display/intel_quirks.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 5b678916e6db5..4607f3c4cf592 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -37,6 +37,7 @@ #include "intel_psr.h" #include "intel_snps_phy.h" #include "skl_universal_plane.h" +#include "intel_quirks.h" /** * DOC: Panel Self Refresh (PSR/SRD) @@ -851,7 +852,8 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp, int crtc_vdisplay = crtc_state->hw.adjusted_mode.crtc_vdisplay; int psr_max_h = 0, psr_max_v = 0, max_bpp = 0; - if (!intel_dp->psr.sink_psr2_support) + if (!intel_dp->psr.sink_psr2_support || + intel_has_quirk(dev_priv, QUIRK_NO_PSR2)) return false; /* JSL and EHL only supports eDP 1.3 */ diff --git a/drivers/gpu/drm/i915/display/intel_quirks.c b/drivers/gpu/drm/i915/display/intel_quirks.c index 6e48d3bcdfec5..ce6d0fe6448f5 100644 --- a/drivers/gpu/drm/i915/display/intel_quirks.c +++ b/drivers/gpu/drm/i915/display/intel_quirks.c @@ -65,6 +65,12 @@ static void quirk_no_pps_backlight_power_hook(struct drm_i915_private *i915) drm_info(&i915->drm, "Applying no pps backlight power quirk\n"); } +static void quirk_no_psr2(struct drm_i915_private *i915) +{ + intel_set_quirk(i915, QUIRK_NO_PSR2); + drm_info(&i915->drm, "Applying No PSR 2 quirk\n"); +} + struct intel_quirk { int device; int subsystem_vendor; diff --git a/drivers/gpu/drm/i915/display/intel_quirks.h b/drivers/gpu/drm/i915/display/intel_quirks.h index 10a4d163149fd..2e0b788a44a1e 100644 --- a/drivers/gpu/drm/i915/display/intel_quirks.h +++ b/drivers/gpu/drm/i915/display/intel_quirks.h @@ -17,6 +17,7 @@ enum intel_quirk_id { QUIRK_INVERT_BRIGHTNESS, QUIRK_LVDS_SSC_DISABLE, QUIRK_NO_PPS_BACKLIGHT_POWER_HOOK, + QUIRK_NO_PSR2, }; void intel_init_quirks(struct drm_i915_private *i915); From patchwork Wed Feb 22 14:17:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Werner Sembach X-Patchwork-Id: 13149217 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34FD1C636D6 for ; Wed, 22 Feb 2023 14:25:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4380E10E9D7; Wed, 22 Feb 2023 14:25:23 +0000 (UTC) Received: from srv6.fidu.org (srv6.fidu.org [IPv6:2a01:4f8:231:de0::2]) by gabe.freedesktop.org (Postfix) with ESMTPS id CA85410E9D3; Wed, 22 Feb 2023 14:25:19 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by srv6.fidu.org (Postfix) with ESMTP id 6E47FC800A5; Wed, 22 Feb 2023 15:18:02 +0100 (CET) Authentication-Results: srv6.fidu.org (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=tuxedocomputers.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= tuxedocomputers.com; h=content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from; s=default; t=1677075482; x=1678889883; bh=D3 I1kLODPKL0LKI3DL3UiMVU0H7ABoanUSeYpcT2TB0=; b=uIVQqKBZ0WTwd+JgUn hbLFIMfmYcW350S5ujyXLx7UXgYpiohWMvru4OYsEERBgaU8i8CS8bTrIC3VWnwY 0OJh1NZiF7IehCRlIuplrrWx53E0Fk/FiqMJ2isDtJ8yJ8Ufh3UtAN5aXdR08ieW NjidBTFHMAf+WGz5SgDLImv5w= X-Virus-Scanned: Debian amavisd-new at srv6.fidu.org Received: from srv6.fidu.org ([127.0.0.1]) by localhost (srv6.fidu.org [127.0.0.1]) (amavisd-new, port 10026) with LMTP id eif2nOs781h2; Wed, 22 Feb 2023 15:18:02 +0100 (CET) Received: from wsembach-tuxedo.fritz.box (host-88-217-226-44.customer.m-online.net [88.217.226.44]) (Authenticated sender: wse@tuxedocomputers.com) by srv6.fidu.org (Postfix) with ESMTPA id 73504C800A2; Wed, 22 Feb 2023 15:18:01 +0100 (CET) From: Werner Sembach To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com, airlied@gmail.com, daniel@ffwll.ch, jose.souza@intel.com, jouni.hogander@intel.com, mika.kahola@intel.com, ville.syrjala@linux.intel.com, lucas.demarchi@intel.com, Diego.SantaCruz@spinetix.com, wse@tuxedocomputers.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] Apply quirk to disable PSR 2 on Tongfang PHxTxX1 and PHxTQx1 Date: Wed, 22 Feb 2023 15:17:55 +0100 Message-Id: <20230222141755.1060162-3-wse@tuxedocomputers.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230222141755.1060162-1-wse@tuxedocomputers.com> References: <20230222141755.1060162-1-wse@tuxedocomputers.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On these Barebones PSR 2 is recognized as supported but is very buggy: - Upper third of screen does sometimes not updated, resulting in disappearing cursors or ghosts of already closed Windows saying behind. - Approximately 40 px from the bottom edge a 3 pixel wide strip of randomly colored pixels is flickering. PSR 1 is working fine however. Signed-off-by: Werner Sembach Cc: --- drivers/gpu/drm/i915/display/intel_quirks.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_quirks.c b/drivers/gpu/drm/i915/display/intel_quirks.c index ce6d0fe6448f5..eeb32d3189f5c 100644 --- a/drivers/gpu/drm/i915/display/intel_quirks.c +++ b/drivers/gpu/drm/i915/display/intel_quirks.c @@ -65,6 +65,10 @@ static void quirk_no_pps_backlight_power_hook(struct drm_i915_private *i915) drm_info(&i915->drm, "Applying no pps backlight power quirk\n"); } +/* + * Tongfang PHxTxX1 and PHxTQx1 devices have support for PSR 2 but it is broken + * on Linux. PSR 1 however works just fine. + */ static void quirk_no_psr2(struct drm_i915_private *i915) { intel_set_quirk(i915, QUIRK_NO_PSR2); @@ -205,6 +209,10 @@ static struct intel_quirk intel_quirks[] = { /* ECS Liva Q2 */ { 0x3185, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time }, { 0x3184, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time }, + + /* Tongfang PHxTxX1 and PHxTQx1/TUXEDO InfinityBook 14 Gen6 */ + { 0x9a49, 0x1d05, 0x1105, quirk_no_psr2 }, + { 0x9a49, 0x1d05, 0x114c, quirk_no_psr2 }, }; void intel_init_quirks(struct drm_i915_private *i915)