From patchwork Tue May 21 08:46:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669051 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 07397C25B78 for ; Tue, 21 May 2024 08:47:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1068410E73D; Tue, 21 May 2024 08:47:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ThWTLn6k"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id C78DB10E727 for ; Tue, 21 May 2024 08:47:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281229; x=1747817229; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HjZGCSyCi9tg8sq07vDs1DxVXgWMivlwQdOe6sj+QGs=; b=ThWTLn6kPcc0VvlECViHpGUjpzkL4LGVGc1CqZFukeHPe6x56TWdIFEL XUr1AGp1SLdvG3IMqzojKtOI0ZCr5Jc9imzo2xd1HCTRlmsqjZ4FcW+Tb j4d+v/+XTAH7YmEHuyAX3i8eGbuSpKB6krup2xjw26xvrdsdOIgpzDkFl gh4kcdCYMVqv2yvODwBWgZr4/dixi0zRIlAqktaL1V3Uc7rpOzhKHXGz+ CYWaCIknkjBvXW4/RLvI4g0x11bMIMRNp5kMrQwg4hgGO9wI61JwdeG8U qk/X3ipeTu6CNYEjDOHzBeH04pRfrBEuu5O/YTqicH7Hlos4mR/pf2B0K A==; X-CSE-ConnectionGUID: vIfswfu2R8aEFm+ynHYBHA== X-CSE-MsgGUID: DF6wBDFyQMKabjFEDHRzYA== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297796" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297796" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:09 -0700 X-CSE-ConnectionGUID: Gkh4msI1RZKubxbGzp9C6g== X-CSE-MsgGUID: szD9cpUIRuGWY3XBKr3OSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272475" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:07 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 01/17] drm/i915/psr: Store pr_dpcd in intel_dp Date: Tue, 21 May 2024 11:46:32 +0300 Message-Id: <20240521084648.1987837-2-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" We need pr_dpcd contents for early transport validity check on eDP Panel Replay and in debugfs interface to dump out panel early transport capability. Signed-off-by: Jouni Högander --- .../drm/i915/display/intel_display_types.h | 1 + drivers/gpu/drm/i915/display/intel_psr.c | 19 ++++++------------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 9678c2b157f6..6fbfe8a18f45 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1743,6 +1743,7 @@ struct intel_dp { bool use_max_params; u8 dpcd[DP_RECEIVER_CAP_SIZE]; u8 psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE]; + u8 pr_dpcd; u8 downstream_ports[DP_MAX_DOWNSTREAM_PORTS]; u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE]; u8 lttpr_common_caps[DP_LTTPR_COMMON_CAP_SIZE]; diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index d18baeb971bb..ba92f71b82d9 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -559,20 +559,10 @@ static void intel_dp_get_su_granularity(struct intel_dp *intel_dp) static void _panel_replay_init_dpcd(struct intel_dp *intel_dp) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); - u8 pr_dpcd = 0; - - intel_dp->psr.sink_panel_replay_support = false; - drm_dp_dpcd_readb(&intel_dp->aux, DP_PANEL_REPLAY_CAP, &pr_dpcd); - - if (!(pr_dpcd & DP_PANEL_REPLAY_SUPPORT)) { - drm_dbg_kms(&i915->drm, - "Panel replay is not supported by panel\n"); - return; - } intel_dp->psr.sink_panel_replay_support = true; - if (pr_dpcd & DP_PANEL_REPLAY_SU_SUPPORT) + if (intel_dp->pr_dpcd & DP_PANEL_REPLAY_SU_SUPPORT) intel_dp->psr.sink_panel_replay_su_support = true; drm_dbg_kms(&i915->drm, @@ -630,10 +620,13 @@ static void _psr_init_dpcd(struct intel_dp *intel_dp) void intel_psr_init_dpcd(struct intel_dp *intel_dp) { - _panel_replay_init_dpcd(intel_dp); - drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT, intel_dp->psr_dpcd, sizeof(intel_dp->psr_dpcd)); + drm_dp_dpcd_readb(&intel_dp->aux, DP_PANEL_REPLAY_CAP, + &intel_dp->pr_dpcd); + + if (intel_dp->pr_dpcd & DP_PANEL_REPLAY_SUPPORT) + _panel_replay_init_dpcd(intel_dp); if (intel_dp->psr_dpcd[0]) _psr_init_dpcd(intel_dp); From patchwork Tue May 21 08:46:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669052 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 A1C13C25B7C for ; Tue, 21 May 2024 08:47:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1EB7F10E741; Tue, 21 May 2024 08:47:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="eAaNMxKJ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id B24DA10E733 for ; Tue, 21 May 2024 08:47:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281231; x=1747817231; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fP4NKzC2aG67DdePUMpLYHiqwHRI4vt+/BJotmd6ZwQ=; b=eAaNMxKJfbN//ZCI7Ehkpe6tNkZIbS3X3Z+98V6kv6mVYcJfW8ZpgZrw tb8Wc6pDtjKzApW1K2ErbYDMRylZOD8/3Ai6KDOmm9eIq5JamVoAEPt5x 1n3+m7GjNMPiHfhnopIv95TpBTwQKErKlUP0wun2kJQc0pMa8QFrM5L50 7Ss4ERK5AIMT/NxO/SKg+PvwwsHMNftB1TQaf5iY3oVxzLFIBVfsnAvbb hVZ3xBpGf5bXl2srHgFFHnzr+pgnZs/qllniUrI5ay46Bh1g52Gs++GWy ozV2ycmE2KtUZpsNF5hXa5bj2AKnj+V1ZraXhizcekpXMjOtl0LF5nmr3 w==; X-CSE-ConnectionGUID: V2DIPkFsRU+E8h1hVEM+VQ== X-CSE-MsgGUID: WxCNyTEgQoC58DDFhMKpmg== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297798" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297798" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:11 -0700 X-CSE-ConnectionGUID: mE1fzk16SD+qbUdjWO9HkA== X-CSE-MsgGUID: 6jiDlpZLT4qUeU0dtCiiOQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272478" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:09 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 02/17] drm/panel replay: Add edp1.5 Panel Replay bits and register Date: Tue, 21 May 2024 11:46:33 +0300 Message-Id: <20240521084648.1987837-3-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Add PANEL_REPLAY_CONFIGURATION_2 register and some missing Panel Replay bits. Signed-off-by: Jouni Högander --- include/drm/display/drm_dp.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index 906949ca3cee..79bde372b152 100644 --- a/include/drm/display/drm_dp.h +++ b/include/drm/display/drm_dp.h @@ -544,9 +544,10 @@ /* DFP Capability Extension */ #define DP_DFP_CAPABILITY_EXTENSION_SUPPORT 0x0a3 /* 2.0 */ -#define DP_PANEL_REPLAY_CAP 0x0b0 /* DP 2.0 */ -# define DP_PANEL_REPLAY_SUPPORT (1 << 0) -# define DP_PANEL_REPLAY_SU_SUPPORT (1 << 1) +#define DP_PANEL_REPLAY_CAP 0x0b0 /* DP 2.0 */ +# define DP_PANEL_REPLAY_SUPPORT (1 << 0) +# define DP_PANEL_REPLAY_SU_SUPPORT (1 << 1) +# define DP_PANEL_REPLAY_EARLY_TRANSPORT_SUPPORT (1 << 2) /* eDP 1.5 */ #define DP_PANEL_PANEL_REPLAY_CAPABILITY 0xb1 # define DP_PANEL_PANEL_REPLAY_SU_GRANULARITY_REQUIRED (1 << 5) @@ -734,11 +735,20 @@ #define PANEL_REPLAY_CONFIG 0x1b0 /* DP 2.0 */ # define DP_PANEL_REPLAY_ENABLE (1 << 0) +# define DP_PANEL_REPLAY_VSC_SDP_CRC_EN (1 << 1) /* eDP 1.5 */ # define DP_PANEL_REPLAY_UNRECOVERABLE_ERROR_EN (1 << 3) # define DP_PANEL_REPLAY_RFB_STORAGE_ERROR_EN (1 << 4) # define DP_PANEL_REPLAY_ACTIVE_FRAME_CRC_ERROR_EN (1 << 5) # define DP_PANEL_REPLAY_SU_ENABLE (1 << 6) +#define PANEL_REPLAY_CONFIG2 0x1b1 /* eDP 1.5 */ +# define DP_PANEL_REPLAY_SINK_REFRESH_RATE_UNLOCK_GRANTED (1 << 0) +# define DP_PANEL_REPLAY_CRC_VERIFICATION (1 << 1) +# define DP_PANEL_REPLAY_SU_Y_GRANULARITY_EXTENDED_EN (1 << 2) +# define DP_PANEL_REPLAY_SU_Y_GRANULARITY_EXTENDED_VAL_SEL_SHIFT 3 +# define DP_PANEL_REPLAY_SU_Y_GRANULARITY_EXTENDED_VAL_SEL_MASK (0xf << 3) +# define DP_PANEL_REPLAY_SU_REGION_SCANLINE_CAPTURE (1 << 7) + #define DP_PAYLOAD_ALLOCATE_SET 0x1c0 #define DP_PAYLOAD_ALLOCATE_START_TIME_SLOT 0x1c1 #define DP_PAYLOAD_ALLOCATE_TIME_SLOT_COUNT 0x1c2 From patchwork Tue May 21 08:46:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669053 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 950D9C25B74 for ; Tue, 21 May 2024 08:47:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D7CA310E742; Tue, 21 May 2024 08:47:19 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Aw5XKbJA"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9B57910E742 for ; Tue, 21 May 2024 08:47:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281233; x=1747817233; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=u+maUdvyXHIHoDuKrdCCNrrWuGVVwLkVsYkIPVak5c4=; b=Aw5XKbJAM5/ppUe0G6GS9FsB5X+HCajNyIyZS8BuhEIzgSrG7fUsgs6q rzpO3WUENMsPU/fTRTh6X2cQYJ4lKTw2LCE/MM9pZWvsq9sZlAdKNSDtv PV1izjS4kLjoQZFZnbqtyn8Fm/BFZwhHL4x+ivtjOxF9dcQw6kNGSrlQo JqWskpnBZJUys2b7SLixc9BSptreRiCHbfW62fmboExdc3OGkyh44jTpt cNCDg3mo0JPACa7F/w1Xh41xApek2B/XI/MEp5c35inoDaAhYoJnc6FDQ M2s7BfCeH0bLm0leL11tUmPxdljd31BaM+FaQvEkjjYNbR/+hh8G9+Rue A==; X-CSE-ConnectionGUID: HONHxd1rQ22uxxqah8F/7A== X-CSE-MsgGUID: 2rQYsZFeTxKjaOBMv1ww0w== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297801" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297801" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:12 -0700 X-CSE-ConnectionGUID: mjifAXBCRNuLPhJcRH0fqw== X-CSE-MsgGUID: hVkIpKRPQaGwiGYCpqTbmA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272483" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:11 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 03/17] drm/i915/psr: Move printing sink PSR support to own function Date: Tue, 21 May 2024 11:46:34 +0300 Message-Id: <20240521084648.1987837-4-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" intel_psr_status has grown and is about to grow even. Let's split it a bit and move printing sink psr support to an own function. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index ba92f71b82d9..2ae5cdca5786 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3590,15 +3590,10 @@ psr_source_status(struct intel_dp *intel_dp, struct seq_file *m) seq_printf(m, "Source PSR/PanelReplay status: %s [0x%08x]\n", status, val); } -static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp) +static void intel_psr_sink_capability(struct intel_dp *intel_dp, + struct seq_file *m) { - struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); - enum transcoder cpu_transcoder = intel_dp->psr.transcoder; struct intel_psr *psr = &intel_dp->psr; - intel_wakeref_t wakeref; - const char *status; - bool enabled; - u32 val; seq_printf(m, "Sink support: PSR = %s", str_yes_no(psr->sink_support)); @@ -3608,6 +3603,19 @@ static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp) seq_printf(m, ", Panel Replay = %s", str_yes_no(psr->sink_panel_replay_support)); seq_printf(m, ", Panel Replay Selective Update = %s\n", str_yes_no(psr->sink_panel_replay_su_support)); +} + +static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp) +{ + struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); + enum transcoder cpu_transcoder = intel_dp->psr.transcoder; + struct intel_psr *psr = &intel_dp->psr; + intel_wakeref_t wakeref; + const char *status; + bool enabled; + u32 val; + + intel_psr_sink_capability(intel_dp, m); if (!(psr->sink_support || psr->sink_panel_replay_support)) return 0; From patchwork Tue May 21 08:46:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669055 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 DA5A7C25B75 for ; Tue, 21 May 2024 08:47:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0AF5710E75B; Tue, 21 May 2024 08:47:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="iC8CCHbn"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7899F10E742 for ; Tue, 21 May 2024 08:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281234; x=1747817234; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RJTgF4JVoQs5Pc67RC3iAswMuhQRvmuDMZmizl1Mxyg=; b=iC8CCHbnVpBEbreWx9dqldVYnMbn3IlvcjjALc8hunDU1RhU6rHJolxu 6D8Dx2bMiLRvsxgcUqeyPY5IPTmJVq//+Or0zMhiA/Kh+JzHbevzz37JH IgJLmLZkmWTzmSauuaakI7ltEpnIUMFFLCOI0MK38ejfgnSNUTsLUo+zq PNa2r0LC+tsyXZqlgodi0C5IuqyWX+cAsj32EVq98Mc9FiZDtK1eEjaOD mexKao+F7qMxPDytRWV1zrKAhY+vcT/tvs3yS33jLpR3jNEwPzATqjlxS 2HS9UHwMTHiCWdeOXLPsFmWkDiH65rp4KJdgbKeJBP5SJpMyOHDrjErEc w==; X-CSE-ConnectionGUID: 6/HVMfZoSdyoB8JWZjkuLA== X-CSE-MsgGUID: S8Isvp6fTdeztgotjvurCg== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297803" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297803" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:14 -0700 X-CSE-ConnectionGUID: SuzZn6LFS52boBZe3E+ZiQ== X-CSE-MsgGUID: w+YzCgTvS/W0FQZVKsNxBA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272489" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:13 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 04/17] drm/i915/psr: Move printing PSR mode to own function Date: Tue, 21 May 2024 11:46:35 +0300 Message-Id: <20240521084648.1987837-5-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" intel_psr_status has grown and is about to grow even. Let's split it a bit and move printing PSR mode to an own function. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 26 ++++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 2ae5cdca5786..de0ce5f3a32c 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3605,13 +3605,28 @@ static void intel_psr_sink_capability(struct intel_dp *intel_dp, str_yes_no(psr->sink_panel_replay_su_support)); } +static void intel_psr_psr_mode(struct intel_dp *intel_dp, + struct seq_file *m) +{ + struct intel_psr *psr = &intel_dp->psr; + const char *status; + + if (psr->panel_replay_enabled) + status = psr->sel_update_enabled ? "Panel Replay Selective Update Enabled" : + "Panel Replay Enabled"; + else if (psr->enabled) + status = psr->sel_update_enabled ? "PSR2" : "PSR1"; + else + status = "disabled"; + seq_printf(m, "PSR mode: %s\n", status); +} + static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp) { struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); enum transcoder cpu_transcoder = intel_dp->psr.transcoder; struct intel_psr *psr = &intel_dp->psr; intel_wakeref_t wakeref; - const char *status; bool enabled; u32 val; @@ -3623,14 +3638,7 @@ static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp) wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm); mutex_lock(&psr->lock); - if (psr->panel_replay_enabled) - status = psr->sel_update_enabled ? "Panel Replay Selective Update Enabled" : - "Panel Replay Enabled"; - else if (psr->enabled) - status = psr->sel_update_enabled ? "PSR2" : "PSR1"; - else - status = "disabled"; - seq_printf(m, "PSR mode: %s\n", status); + intel_psr_psr_mode(intel_dp, m); if (!psr->enabled) { seq_printf(m, "PSR sink not reliable: %s\n", From patchwork Tue May 21 08:46:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669054 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 9F672C25B78 for ; Tue, 21 May 2024 08:47:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F3B1B10E754; Tue, 21 May 2024 08:47:19 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="V6TUk1lz"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 55BC710E754 for ; Tue, 21 May 2024 08:47:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281236; x=1747817236; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FxTj7NQG0+uxOTOMgS4gPXWnefZJaZNTjvmk4vwO6HQ=; b=V6TUk1lzI3ITPpa0kQiKLsM4kxUUL3PwbNN9m0L+tXboKkneQPbsIoOZ 6e0Zqdf2/diDRtTtZ1Boa6gUiqWJqs0/Cxz7jPUeR20BBaAhOvpELOuT/ NwQpmX1V3C8R5W+Xc9l4nNNDEWjPsAQnXuutEIXQw6JswbCCowRCQIJk/ m451kB2waLu1UTkRumIqwZAqMNKtgsc44MNS6M48t3ms+M2x1ubui13N8 SCIDUvLqQPr10OHTvAo2ZuB/6QCNO2UfgWvQ9IM6Sg2Ud+//KQahuyoIb nAIKdcXdaWNbYDTj/3WHczR5uAEuuJ8O9dpRpFiXoV4VWrmCVNLwGxHy7 A==; X-CSE-ConnectionGUID: RtxHPjreTX2bEaU1CRKFwA== X-CSE-MsgGUID: R48MvzsDTyeG2SbT/gqT+w== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297806" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297806" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:16 -0700 X-CSE-ConnectionGUID: Sln55TrZT7W4CjIGzZLxkA== X-CSE-MsgGUID: ZrPo4kTsSn2fsB3FqIHw+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272497" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:15 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 05/17] drm/i915/psr: modify psr status debugfs to support eDP Panel Replay Date: Tue, 21 May 2024 11:46:36 +0300 Message-Id: <20240521084648.1987837-6-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Some PSR2_CTL bits are applicable for eDP panel replay as well. Dump this register for eDP Panel Replay as well. Bspec: 68920 Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 11 ++++++++++- 1 file 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 de0ce5f3a32c..3884d88e1594 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3628,7 +3628,7 @@ static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp) struct intel_psr *psr = &intel_dp->psr; intel_wakeref_t wakeref; bool enabled; - u32 val; + u32 val, psr2_ctl; intel_psr_sink_capability(intel_dp, m); @@ -3649,6 +3649,12 @@ static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp) if (psr->panel_replay_enabled) { val = intel_de_read(dev_priv, TRANS_DP2_CTL(cpu_transcoder)); + + if (intel_dp_is_edp(intel_dp)) + psr2_ctl = intel_de_read(dev_priv, + EDP_PSR2_CTL(dev_priv, + cpu_transcoder)); + enabled = val & TRANS_DP2_PANEL_REPLAY_ENABLE; } else if (psr->sel_update_enabled) { val = intel_de_read(dev_priv, @@ -3660,6 +3666,9 @@ static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp) } seq_printf(m, "Source PSR/PanelReplay ctl: %s [0x%08x]\n", str_enabled_disabled(enabled), val); + if (psr->panel_replay_enabled && intel_dp_is_edp(intel_dp)) + seq_printf(m, "PSR2_CTL: 0x%08x\n", + psr2_ctl); psr_source_status(intel_dp, m); seq_printf(m, "Busy frontbuffer bits: 0x%08x\n", psr->busy_frontbuffer_bits); From patchwork Tue May 21 08:46:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669056 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 CC6C1C25B74 for ; Tue, 21 May 2024 08:47:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CE71C10E763; Tue, 21 May 2024 08:47:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="XwEtfceG"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 351D010E742 for ; Tue, 21 May 2024 08:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281238; x=1747817238; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JQ6Exl7Zd17kV25PVtLWaRbnl0bP1dva4y4CnXKFxXo=; b=XwEtfceGXXZdIoWwwHT3/m4JtCXAT718pYAj3SlRl+P2lWfJ0aO4MAFk mpXA4yhg8rv6gylSjWypmM08bApkDrAcL3t1wZ3BAlGEW8nHS2PDqcGKq x3McWp6P0+s8M/JZz8fPGEr8WDM3TzgjFeHCmaBG8yyjQ3wVCvprKILAK nzfptQ9YWFtC4gRTVt9J5ys9Rrd8I8AvZ9jZoUwLyk/RhtmSTwfTIiRjy uFw7pWk6TxTdCAQxpwlyNMMvreebs0DUyhE1yiTf9NjIXGH08iURlulis ypO4m34Q3RFXOXOri/Bc90AGPVDt85MZHjsvGzvSEi5VsK/CdWkS96LOf w==; X-CSE-ConnectionGUID: qWIRSlCCR86IqHtKJS/VmA== X-CSE-MsgGUID: 3U7r/kD3TDuBty0S1oSchw== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297812" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297812" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:18 -0700 X-CSE-ConnectionGUID: btGSJV07T1OqmfB7tvWR5g== X-CSE-MsgGUID: ptMAH4OHRvOWwqmyi4giEA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272505" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:17 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 06/17] drm/i915/psr: Add Panel Replay support to intel_psr2_config_et_valid Date: Tue, 21 May 2024 11:46:37 +0300 Message-Id: <20240521084648.1987837-7-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Early Transport is possible and in our HW mandatory on eDP Panel Replay. Add parameter to intel_psr2_config_et_valid to differentiate validity check for Panel Replay. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 3884d88e1594..24d832dc26c7 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -673,16 +673,17 @@ static void hsw_psr_setup_aux(struct intel_dp *intel_dp) aux_ctl); } -static bool psr2_su_region_et_valid(struct intel_dp *intel_dp) +static bool psr2_su_region_et_valid(struct intel_dp *intel_dp, bool panel_replay) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); - if (DISPLAY_VER(i915) >= 20 && - intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_ET_SUPPORTED && - !(intel_dp->psr.debug & I915_PSR_DEBUG_SU_REGION_ET_DISABLE)) - return true; + if (DISPLAY_VER(i915) < 20 || !intel_dp_is_edp(intel_dp) || + intel_dp->psr.debug & I915_PSR_DEBUG_SU_REGION_ET_DISABLE) + return false; - return false; + return panel_replay ? + intel_dp->pr_dpcd & DP_PANEL_REPLAY_EARLY_TRANSPORT_SUPPORT : + intel_dp->psr_dpcd[0] != DP_PSR2_WITH_Y_COORD_ET_SUPPORTED; } static unsigned int intel_psr_get_enable_sink_offset(struct intel_dp *intel_dp) @@ -709,7 +710,8 @@ void intel_psr_enable_sink(struct intel_dp *intel_dp, DP_ALPM_ENABLE | DP_ALPM_LOCK_ERROR_IRQ_HPD_ENABLE); - if (psr2_su_region_et_valid(intel_dp)) + if (psr2_su_region_et_valid(intel_dp, + intel_dp->psr.panel_replay_enabled)) dpcd_val |= DP_PSR_ENABLE_SU_REGION_ET; } @@ -978,7 +980,8 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp) PSR2_MAN_TRK_CTL(dev_priv, cpu_transcoder), 0); } - if (psr2_su_region_et_valid(intel_dp)) + if (psr2_su_region_et_valid(intel_dp, + intel_dp->psr.panel_replay_enabled)) val |= LNL_EDP_PSR2_SU_REGION_ET_ENABLE; /* @@ -1587,7 +1590,7 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp, tgl_dc3co_exitline_compute_config(intel_dp, crtc_state); - if (psr2_su_region_et_valid(intel_dp)) + if (psr2_su_region_et_valid(intel_dp, false)) crtc_state->enable_psr2_su_region_et = true; return true; From patchwork Tue May 21 08:46:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669057 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 D629FC25B7C for ; Tue, 21 May 2024 08:47:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC8EB10E75F; Tue, 21 May 2024 08:47:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="iMbw1L2n"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 226CF10E75F for ; Tue, 21 May 2024 08:47:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281240; x=1747817240; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=A4B+KKDjh4xmqktQa981ql6Ex2RsPIYIb8ijn3JFx9c=; b=iMbw1L2nclCnWa42/lkPrrjHvEcuJ/6MssZcUEBWx77q0dqTCCPT80fo ZO7tpmAO5S0e7jQtFQPb3mtH6Vr4Q+FRTuroMd9JTTgVXHANqoyQj81YL cSTzBken4hnZufn97FIPTDpMtiZFlrUvHbBOiHYpjIeW2ArieVjhrx9vp tTH+KD+6v3OQZ9dS5h4yirCHLRLrnPcnnIihTD8lrhBi7UcNBMdrBKwq3 /zg0loEtaJ3RSITFrEzex7EemhdTb19sg5dNLtn0mgYLTuVRS2fUCTLKa NknrtEskLaJYJlJTfXZ+39KGbQSuietsRQDObgc2vIFJG22V5iglAhn3b Q==; X-CSE-ConnectionGUID: ziD2N79oRsSHskM9noL1eQ== X-CSE-MsgGUID: Biu4ycbTQzGjl7K6VPx55Q== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297815" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297815" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:20 -0700 X-CSE-ConnectionGUID: XyjlqJ8IRDKH2ba14cWNHg== X-CSE-MsgGUID: 9F5z4ow8TLmwkt5D+oLbzA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272522" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:19 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 07/17] drm/i915/psr: Add Early Transport into psr debugfs interface Date: Tue, 21 May 2024 11:46:38 +0300 Message-Id: <20240521084648.1987837-8-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" We want to have sink Early Transport capability and usage in our psr debugfs status interface. v2: printout "Selective Update enabled (Early Transport)" instead of "Selective Update Early Transport enabled" Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 36 ++++++++++++++++++------ 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 24d832dc26c7..cc2d0143ca2d 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3603,25 +3603,45 @@ static void intel_psr_sink_capability(struct intel_dp *intel_dp, if (psr->sink_support) seq_printf(m, " [0x%02x]", intel_dp->psr_dpcd[0]); + if (intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_ET_SUPPORTED) + seq_printf(m, " (Early Transport)"); seq_printf(m, ", Panel Replay = %s", str_yes_no(psr->sink_panel_replay_support)); - seq_printf(m, ", Panel Replay Selective Update = %s\n", + seq_printf(m, ", Panel Replay Selective Update = %s", str_yes_no(psr->sink_panel_replay_su_support)); + if (intel_dp->pr_dpcd & DP_PANEL_REPLAY_EARLY_TRANSPORT_SUPPORT) + seq_printf(m, " (Early Transport)"); + seq_printf(m, "\n"); } static void intel_psr_psr_mode(struct intel_dp *intel_dp, struct seq_file *m) { struct intel_psr *psr = &intel_dp->psr; - const char *status; + const char *status, *mode, *region_et; - if (psr->panel_replay_enabled) - status = psr->sel_update_enabled ? "Panel Replay Selective Update Enabled" : - "Panel Replay Enabled"; + if (psr->enabled) + status = " enabled"; + else + status = " disabled"; + + if (psr->panel_replay_enabled && psr->sel_update_enabled) + mode = "Panel Replay Selective Update"; + else if (psr->panel_replay_enabled) + mode = "Panel Replay"; + else if (psr->sel_update_enabled) + mode = "PSR2"; else if (psr->enabled) - status = psr->sel_update_enabled ? "PSR2" : "PSR1"; + mode = "PSR1"; + else + mode = ""; + + if (psr->sel_update_enabled && + (psr2_su_region_et_valid(intel_dp, psr->panel_replay_enabled))) + region_et = " (Early Transport)"; else - status = "disabled"; - seq_printf(m, "PSR mode: %s\n", status); + region_et = ""; + + seq_printf(m, "PSR mode: %s%s%s\n", mode, status, region_et); } static int intel_psr_status(struct seq_file *m, struct intel_dp *intel_dp) From patchwork Tue May 21 08:46:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669058 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 19F59C25B74 for ; Tue, 21 May 2024 08:47:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E85E810E760; Tue, 21 May 2024 08:47:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="GkNNOBUr"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1093710E776 for ; Tue, 21 May 2024 08:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281242; x=1747817242; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+szKxTSOgEIDRM/429ev80DKLMC3HChQWpJUPkuTqXg=; b=GkNNOBUr2f/xs7W/Te0wWwf1h2RF4NtIQ9rvCiLNPVcbVzxN1rC8x4G/ dbWQAOiaz3XAHy+bO+Eou5HBEtQ3dyxzjjRvASb4wKT/XojbMkUyyYlf1 aWSU+UgurBUwwDdLqgVXFIuSzi7fizlJ0+zsk06+V+Y6YFamnuOUkZ8zv FYby0+g1UIMXbLPPKnVIjsUcPZ9dpaRduWYsRSCrpovr6+Uezcc8ZkTAz 0pHdg9+G+lKfX7Safc9eU3x5AH9JYNEq2X/4+T/jHAbpaqxIZbx82Qzx+ 2AD3FysyiUdQa2OpdsYrcMqNE6c564SOCJw3qOD7h/iIcDHk9iMl4OgUx A==; X-CSE-ConnectionGUID: 7BVgmvXRQBu1s8EO7HvXDA== X-CSE-MsgGUID: VgBuJp0qRg2UPvjIzwlgzg== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297819" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297819" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:22 -0700 X-CSE-ConnectionGUID: 0277/SW/QjyCg1FSpdNnMA== X-CSE-MsgGUID: AscDVcYKQgmIZuPEwCIA+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272528" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:21 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 08/17] drm/display: Add missing aux less alpm wake related bits Date: Tue, 21 May 2024 11:46:39 +0300 Message-Id: <20240521084648.1987837-9-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" eDP1.5 adds some more bits into DP_RECEIVER_ALPM_CAP and DP_RECEIVER_ALPM_CONFIG registers. Add definitions for these. Signed-off-by: Jouni Högander --- include/drm/display/drm_dp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index 79bde372b152..f3ce8c483659 100644 --- a/include/drm/display/drm_dp.h +++ b/include/drm/display/drm_dp.h @@ -232,6 +232,8 @@ #define DP_RECEIVER_ALPM_CAP 0x02e /* eDP 1.4 */ # define DP_ALPM_CAP (1 << 0) +# define DP_ALPM_PM_STATE_2A_SUPPORT (1 << 1) /* eDP 1.5 */ +# define DP_ALPM_AUX_LESS_CAP (1 << 2) /* eDP 1.5 */ #define DP_SINK_DEVICE_AUX_FRAME_SYNC_CAP 0x02f /* eDP 1.4 */ # define DP_AUX_FRAME_SYNC_CAP (1 << 0) @@ -685,6 +687,7 @@ #define DP_RECEIVER_ALPM_CONFIG 0x116 /* eDP 1.4 */ # define DP_ALPM_ENABLE (1 << 0) # define DP_ALPM_LOCK_ERROR_IRQ_HPD_ENABLE (1 << 1) +# define DP_ALPM_MODE_AUX_LESS (1 << 2) /* eDP 1.5 */ #define DP_SINK_DEVICE_AUX_FRAME_SYNC_CONF 0x117 /* eDP 1.4 */ # define DP_AUX_FRAME_SYNC_ENABLE (1 << 0) From patchwork Tue May 21 08:46:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669059 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 C784CC25B75 for ; Tue, 21 May 2024 08:47:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E6C3110E781; Tue, 21 May 2024 08:47:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Zn56LV1B"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29A3210E76E for ; Tue, 21 May 2024 08:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281250; x=1747817250; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=La0Sw+HKTOey72cY9NzJRfpey7ndOs9Ls9VrfHU0tho=; b=Zn56LV1BKEOEkZWSbpNIrS218pOpUcXRuVkwmcgFUnBdUlY55GBq8V2L 6vdOUw6UEsp6aPMSYSLlHzLC3bOpt2CLQu8+IUCL9QP4HcQX7Bz8vP9+F daTWVrauWMc+m0++qupU4S49QMXlf0CnFClOcykAcP/vqJVIZw9QgBdT4 6eUAyW82s/71kZgiWI497TEa+NV8SZYrO1dgfjXdR+jpr1OqmVziKOs7j r9DK/P1LleMgzFhELNNZOYx9TdLGlOO+kd5VftlpV6ArvELAGO3OVTN+F ufkt7cBR1z6k5q/jPC/glkChbT6rBfMKSnb+sRVBIKuzrSfu5J8wjM+y8 g==; X-CSE-ConnectionGUID: Z/t/zsP+Tbm/70sfK/+BQQ== X-CSE-MsgGUID: r+x/44SwSJefDWh6PuR75A== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297822" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297822" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:24 -0700 X-CSE-ConnectionGUID: gayE5l3WQF2G2zfFnxm9jg== X-CSE-MsgGUID: 5KvXVzZ8QsCw/0mYuxm2GQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272531" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:23 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 09/17] drm/i915/psr: Check panel ALPM capability for eDP Panel Replay Date: Tue, 21 May 2024 11:46:40 +0300 Message-Id: <20240521084648.1987837-10-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Our HW doesn't support Panel Replay without AUX_LESS ALPM on eDP. Check panel support for this and prevent eDP panel replay if it doesn't exits. Bspec: 68920 Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 32 ++++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index cc2d0143ca2d..b2b230f34721 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -445,16 +445,6 @@ void intel_psr_irq_handler(struct intel_dp *intel_dp, u32 psr_iir) } } -static bool intel_dp_get_alpm_status(struct intel_dp *intel_dp) -{ - u8 alpm_caps = 0; - - if (drm_dp_dpcd_readb(&intel_dp->aux, DP_RECEIVER_ALPM_CAP, - &alpm_caps) != 1) - return false; - return alpm_caps & DP_ALPM_CAP; -} - static u8 intel_dp_get_sink_sync_latency(struct intel_dp *intel_dp) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); @@ -556,10 +546,18 @@ static void intel_dp_get_su_granularity(struct intel_dp *intel_dp) intel_dp->psr.su_y_granularity = y; } -static void _panel_replay_init_dpcd(struct intel_dp *intel_dp) +static void _panel_replay_init_dpcd(struct intel_dp *intel_dp, u8 alpm_caps) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); + if (intel_dp_is_edp(intel_dp) && + (!(alpm_caps & DP_ALPM_CAP) || + !(alpm_caps & DP_ALPM_AUX_LESS_CAP))) { + drm_dbg_kms(&i915->drm, + "Panel doesn't support AUX-less ALPM, eDP Panel Replay not possible\n"); + return; + } + intel_dp->psr.sink_panel_replay_support = true; if (intel_dp->pr_dpcd & DP_PANEL_REPLAY_SU_SUPPORT) @@ -571,7 +569,7 @@ static void _panel_replay_init_dpcd(struct intel_dp *intel_dp) "selective_update " : ""); } -static void _psr_init_dpcd(struct intel_dp *intel_dp) +static void _psr_init_dpcd(struct intel_dp *intel_dp, u8 alpm_caps) { struct drm_i915_private *i915 = to_i915(dp_to_dig_port(intel_dp)->base.base.dev); @@ -599,7 +597,6 @@ static void _psr_init_dpcd(struct intel_dp *intel_dp) intel_dp->psr_dpcd[0] >= DP_PSR2_WITH_Y_COORD_IS_SUPPORTED) { bool y_req = intel_dp->psr_dpcd[1] & DP_PSR2_SU_Y_COORDINATE_REQUIRED; - bool alpm = intel_dp_get_alpm_status(intel_dp); /* * All panels that supports PSR version 03h (PSR2 + @@ -612,7 +609,7 @@ static void _psr_init_dpcd(struct intel_dp *intel_dp) * Y-coordinate requirement panels we would need to enable * GTC first. */ - intel_dp->psr.sink_psr2_support = y_req && alpm; + intel_dp->psr.sink_psr2_support = y_req && alpm_caps & DP_ALPM_CAP; drm_dbg_kms(&i915->drm, "PSR2 %ssupported\n", intel_dp->psr.sink_psr2_support ? "" : "not "); } @@ -620,16 +617,19 @@ static void _psr_init_dpcd(struct intel_dp *intel_dp) void intel_psr_init_dpcd(struct intel_dp *intel_dp) { + u8 alpm_caps = 0; + drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT, intel_dp->psr_dpcd, sizeof(intel_dp->psr_dpcd)); drm_dp_dpcd_readb(&intel_dp->aux, DP_PANEL_REPLAY_CAP, &intel_dp->pr_dpcd); + drm_dp_dpcd_readb(&intel_dp->aux, DP_RECEIVER_ALPM_CAP, &alpm_caps); if (intel_dp->pr_dpcd & DP_PANEL_REPLAY_SUPPORT) - _panel_replay_init_dpcd(intel_dp); + _panel_replay_init_dpcd(intel_dp, alpm_caps); if (intel_dp->psr_dpcd[0]) - _psr_init_dpcd(intel_dp); + _psr_init_dpcd(intel_dp, alpm_caps); if (intel_dp->psr.sink_psr2_support || intel_dp->psr.sink_panel_replay_su_support) From patchwork Tue May 21 08:46:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669061 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 95500C25B78 for ; Tue, 21 May 2024 08:47:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 967AC10E777; Tue, 21 May 2024 08:47:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="NGwixA6z"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8B4E310E76E for ; Tue, 21 May 2024 08:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281255; x=1747817255; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=apatSrvQb4qLKs0hZ+KmfD9i9ioolaGe36xQLnjcyOA=; b=NGwixA6zWHjxCeolFCHUHFF9RhISs0Z4AbHVGTTI3dm7kYLQLjjiRAIV 2V3gGsf4WnNSLjD94xYrROf1KeE+xQ5PKsdNXpR2xql82Ji4JWt6LhYYq ntHNiKfJEbAeCTItZwP7bddMvk3Y0RYqaLnIs85SuL7qohDENk+dhH39i uRf5hL6sRxhyshnlCEqxvv2/izcNr5zs4klebWpXgDC0/R1wlFBGpvH+p q/xL7vRdzstH1iDhqZC3NavK/4nfVXbhuzW0JlC6kFh8rllam+XJjluPd UPzOpF5qweRVCQXbDB9jOMTWHhOOMTwvbVE2d/GsgvfBeBbBuu+InbTZW w==; X-CSE-ConnectionGUID: dUvMfcS1RjK2pGoewBHSAA== X-CSE-MsgGUID: ZlG3BAAcSqeWSweEIvVdrg== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297831" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297831" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:26 -0700 X-CSE-ConnectionGUID: 1df/SEdyQA2J0xlNKewYIw== X-CSE-MsgGUID: sCKeEGOeT3y+ivQFwZYVGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272538" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:24 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 10/17] drm/i915/psr: Inform Panel Replay source support on eDP as well Date: Tue, 21 May 2024 11:46:41 +0300 Message-Id: <20240521084648.1987837-11-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Display version >= 20 support eDP 1.5. Inform Panel Replay source support on eDP for display version >= 20. Bspec: 68920 Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index b2b230f34721..87bfa68b1ddb 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3321,9 +3321,11 @@ void intel_psr_init(struct intel_dp *intel_dp) return; } - if (HAS_DP20(dev_priv) && !intel_dp_is_edp(intel_dp)) + if ((HAS_DP20(dev_priv) && !intel_dp_is_edp(intel_dp)) || + DISPLAY_VER(dev_priv) >= 20) intel_dp->psr.source_panel_replay_support = true; - else + + if (HAS_PSR(dev_priv) && intel_dp_is_edp(intel_dp)) intel_dp->psr.source_support = true; /* Disable early transport for now */ From patchwork Tue May 21 08:46:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669062 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 B7965C25B75 for ; Tue, 21 May 2024 08:47:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AF7A10E776; Tue, 21 May 2024 08:47:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CBF6P451"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id BE75510E76F for ; Tue, 21 May 2024 08:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281251; x=1747817251; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pUbmRTIIXEOgHYIdDZ47h0H14/tvjCtlCxwri8t0uJs=; b=CBF6P451jFxY4MFL2semhtP/351LGlylzHiDiiMe9wbWcng8xFpAog/z 8qj0C6eH66tKhrzlouPsnMItNApNvLbZRHKgTTxUiYvKaiOV3aPzAjWqb a2BVo70hQgNqOdTYCMQIa13e3iF6288C7tvxVpenbJiIikDYN0YBiGXZG YXdximyzmzHbICfilu46sjUjdMBF053HPL8o6exBwbgOzvC2KjaJeVCBT zqk/8V7UCZzBxJtPBu+/iVbCVT9ze8hvb5wjNpjugmODE1+P4yXSKF8vF RN1F5A3a/gwdI0vmeOMzDxvoMdxJkS1Pm6z8cdmB+YoXmg8Y8pVWoa4CX w==; X-CSE-ConnectionGUID: eRl1/V8PTCavUyGM6dpWhg== X-CSE-MsgGUID: 3hELSsQ/TJmycebruCOv6w== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297837" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297837" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:30 -0700 X-CSE-ConnectionGUID: jl000DemTrCZqceaysKouw== X-CSE-MsgGUID: fEykWKMMTkGODE1xfkGfsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272543" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:26 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 11/17] drm/i915/psr: enable sink for eDP1.5 Panel Replay Date: Tue, 21 May 2024 11:46:42 +0300 Message-Id: <20240521084648.1987837-12-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" eDP1.5 allows Panel Replay on eDP as well. Take this into account when enabling sink PSR/Panel Replay. Write also PANEL_REPLAY_CONFIG2 register accordingly. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 63 +++++++++++++++++------- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 87bfa68b1ddb..836a9e3b5921 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -692,6 +692,23 @@ static unsigned int intel_psr_get_enable_sink_offset(struct intel_dp *intel_dp) PANEL_REPLAY_CONFIG : DP_PSR_EN_CFG; } +static void intel_psr_enable_sink_alpm(struct intel_dp *intel_dp, + const struct intel_crtc_state *crtc_state) +{ + u32 val; + + if (!crtc_state->has_sel_update && (!crtc_state->has_panel_replay || + !intel_dp_is_edp(intel_dp))) + return; + + val = DP_ALPM_ENABLE | DP_ALPM_LOCK_ERROR_IRQ_HPD_ENABLE; + + if (crtc_state->has_panel_replay) + val |= DP_ALPM_MODE_AUX_LESS; + + drm_dp_dpcd_writeb(&intel_dp->aux, DP_RECEIVER_ALPM_CONFIG, val); +} + /* * Note: Most of the bits are same in PANEL_REPLAY_CONFIG and DP_PSR_EN_CFG. We * are relying on PSR definitions on these "common" bits. @@ -700,43 +717,55 @@ void intel_psr_enable_sink(struct intel_dp *intel_dp, const struct intel_crtc_state *crtc_state) { struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); - u8 dpcd_val = DP_PSR_ENABLE; + u8 enable_val = DP_PSR_ENABLE; + u8 panel_replay_config2 = 0; + + intel_psr_enable_sink_alpm(intel_dp, crtc_state); if (crtc_state->has_sel_update) { - /* Enable ALPM at sink for psr2 */ - if (!crtc_state->has_panel_replay) { - drm_dp_dpcd_writeb(&intel_dp->aux, - DP_RECEIVER_ALPM_CONFIG, - DP_ALPM_ENABLE | - DP_ALPM_LOCK_ERROR_IRQ_HPD_ENABLE); + /* PSR2 and Panel Replay SU on eDP */ + if (intel_dp_is_edp(intel_dp)) { + if (crtc_state->req_psr2_sdp_prior_scanline) { + if (crtc_state->has_panel_replay) + panel_replay_config2 |= + DP_PANEL_REPLAY_SU_REGION_SCANLINE_CAPTURE; + else + enable_val |= DP_PSR_SU_REGION_SCANLINE_CAPTURE; + } if (psr2_su_region_et_valid(intel_dp, intel_dp->psr.panel_replay_enabled)) - dpcd_val |= DP_PSR_ENABLE_SU_REGION_ET; + enable_val |= DP_PSR_ENABLE_SU_REGION_ET; } - dpcd_val |= DP_PSR_ENABLE_PSR2 | DP_PSR_IRQ_HPD_WITH_CRC_ERRORS; + enable_val |= DP_PSR_ENABLE_PSR2 | DP_PSR_IRQ_HPD_WITH_CRC_ERRORS; } else { + /* PSR2 and Panel Replay Full Frame Update */ if (intel_dp->psr.link_standby) - dpcd_val |= DP_PSR_MAIN_LINK_ACTIVE; + enable_val |= DP_PSR_MAIN_LINK_ACTIVE; if (!crtc_state->has_panel_replay && DISPLAY_VER(dev_priv) >= 8) - dpcd_val |= DP_PSR_CRC_VERIFICATION; + enable_val |= DP_PSR_CRC_VERIFICATION; } - if (crtc_state->has_panel_replay) - dpcd_val |= DP_PANEL_REPLAY_UNRECOVERABLE_ERROR_EN | + if (crtc_state->has_panel_replay) { + enable_val |= DP_PANEL_REPLAY_UNRECOVERABLE_ERROR_EN | DP_PANEL_REPLAY_RFB_STORAGE_ERROR_EN; - if (crtc_state->req_psr2_sdp_prior_scanline) - dpcd_val |= DP_PSR_SU_REGION_SCANLINE_CAPTURE; + if (intel_dp_is_edp(intel_dp)) + enable_val |= DP_PANEL_REPLAY_VSC_SDP_CRC_EN; + } if (intel_dp->psr.entry_setup_frames > 0) - dpcd_val |= DP_PSR_FRAME_CAPTURE; + enable_val |= DP_PSR_FRAME_CAPTURE; drm_dp_dpcd_writeb(&intel_dp->aux, intel_psr_get_enable_sink_offset(intel_dp), - dpcd_val); + enable_val); + + if (crtc_state->has_panel_replay && intel_dp_is_edp(intel_dp)) + drm_dp_dpcd_writeb(&intel_dp->aux, PANEL_REPLAY_CONFIG2, + panel_replay_config2); if (intel_dp_is_edp(intel_dp)) drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER, DP_SET_POWER_D0); From patchwork Tue May 21 08:46:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669060 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 BD637C25B74 for ; Tue, 21 May 2024 08:47:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE67A10E761; Tue, 21 May 2024 08:47:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="AsD/fSLB"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8BFCB10E777 for ; Tue, 21 May 2024 08:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281255; x=1747817255; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2YnWUfOyBX0LHdnAll4dD4dw6qB78kkBtdWcTx3kAV4=; b=AsD/fSLBjfvp1gnbxpLAkpawzm1F05jjntwWvxgR/rHZNqZS/Zv9YzSh A2qBtMyiniBUj7U5EQLNA5eUFiapxTz+5c5s7dMtMKAdg9jKxrndNx8To aoc7DZeY981z4NLfxmvXHYfO3k0WyxxZ+7N/tq5CGekLEXcguTmGmPBr5 Rjp0Cws3+j21UNmxjfuJx+JD5e9hGEslH9ZmJWTQNQwa/fh8aFRVJ7h41 97IOHI7+ONrHfifh3WuD7EZUwJxNJv66Z0n6hegkShp/PSY+ngYcRZNwi yAOTxvIsHkMRBZYkjUzfMV9E7M4Z2cqzAMNCo+0OBVqIwyeiZvNAX1sMe g==; X-CSE-ConnectionGUID: 77nJsUe+RPaIQYCPDyRpzQ== X-CSE-MsgGUID: n72d3auFTTqekfoO90ybcQ== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297839" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297839" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:30 -0700 X-CSE-ConnectionGUID: sD7Ki3GeQJesK29foQP/Cw== X-CSE-MsgGUID: E1Do+r/5TLCahj/XDCWvuQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272547" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:28 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 12/17] drm/i915/psr: Check panel Early Transport capability for eDP PR Date: Tue, 21 May 2024 11:46:43 +0300 Message-Id: <20240521084648.1987837-13-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Our HW doesn't support panel replay without Early Transport on eDP. Bspec: 68920 Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 836a9e3b5921..461c3c576ae4 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -550,12 +550,19 @@ static void _panel_replay_init_dpcd(struct intel_dp *intel_dp, u8 alpm_caps) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); - if (intel_dp_is_edp(intel_dp) && - (!(alpm_caps & DP_ALPM_CAP) || - !(alpm_caps & DP_ALPM_AUX_LESS_CAP))) { - drm_dbg_kms(&i915->drm, - "Panel doesn't support AUX-less ALPM, eDP Panel Replay not possible\n"); - return; + if (intel_dp_is_edp(intel_dp)) { + if (!(alpm_caps & DP_ALPM_CAP) || + !(alpm_caps & DP_ALPM_AUX_LESS_CAP)) { + drm_dbg_kms(&i915->drm, + "Panel doesn't support AUX-less ALPM, eDP Panel Replay not possible\n"); + return; + } + + if (!(intel_dp->pr_dpcd & DP_PANEL_REPLAY_EARLY_TRANSPORT_SUPPORT)) { + drm_dbg_kms(&i915->drm, + "Panel doesn't support early transport, eDP Panel Replay not possible\n"); + return; + } } intel_dp->psr.sink_panel_replay_support = true; From patchwork Tue May 21 08:46:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669063 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 B12BDC25B7D for ; Tue, 21 May 2024 08:47:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 08A9410E76E; Tue, 21 May 2024 08:47:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="gvTO8bPK"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 64CA210E76E for ; Tue, 21 May 2024 08:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281255; x=1747817255; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WhjzXB9Y6/YDS9KDRdcBO9PoGJ5avqqAuVqClyTccvo=; b=gvTO8bPK3QMD1tKPaFewRV/0vsqbtW1hFZzSs9AT/GtrxXv9Wujy33qR S6eTd2yIGEsAkLRMmKF+6J//OI35v2sGnKN4BOuSocURdu0SVREfh1CoV hbWiK6w1MGKSzw6mfdau4D4E1GrB07rrdPUz9UizyamfXejZ5pvgOr3QX 2xjoINeHyZ8Br9LOtdCOMMcWQJzGTVsbM81Xe3ptlaVZXwjNfcNUMki77 RsSmV10nZE0KBVKGN0aV+sH+YXDwfRaq4dDUJWjL1CdQK0ULzUYgPtkeo VcgCgmcBw49G71qN7Ei9J8IAzcRkFHgmXICtQYgJ8yxInZNSps1PV2FCt w==; X-CSE-ConnectionGUID: pSo1aev7SpaXOqE+KO7EMQ== X-CSE-MsgGUID: 5Maza5QARZmto4f19lqkpw== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297847" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297847" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:32 -0700 X-CSE-ConnectionGUID: e2XKPJJdScu1KXXSV8elRQ== X-CSE-MsgGUID: eVxQNnzvSTKUdW1gIVpyPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272550" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:30 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 13/17] drm/i915/psr: Perfrom psr2 checks related to ALPM for Panel Replay Date: Tue, 21 May 2024 11:46:44 +0300 Message-Id: <20240521084648.1987837-14-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" eDP1.5 support ALPM with Panel Replay as well. We need to check ALPM related things for Panel Replay as well. Bspec: 68920 Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 45 +++++++++++++----------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 461c3c576ae4..d09a4f5309c4 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1594,27 +1594,6 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp, return false; } - if (!_compute_psr2_sdp_prior_scanline_indication(intel_dp, crtc_state)) { - drm_dbg_kms(&dev_priv->drm, - "PSR2 not enabled, PSR2 SDP indication do not fit in hblank\n"); - return false; - } - - if (!_compute_alpm_params(intel_dp, crtc_state)) { - drm_dbg_kms(&dev_priv->drm, - "PSR2 not enabled, Unable to use long enough wake times\n"); - return false; - } - - /* Vblank >= PSR2_CTL Block Count Number maximum line count */ - if (crtc_state->hw.adjusted_mode.crtc_vblank_end - - crtc_state->hw.adjusted_mode.crtc_vblank_start < - psr2_block_count_lines(intel_dp)) { - drm_dbg_kms(&dev_priv->drm, - "PSR2 not enabled, too short vblank time\n"); - return false; - } - if (!crtc_state->enable_psr2_sel_fetch && (crtc_hdisplay > psr_max_h || crtc_vdisplay > psr_max_v)) { drm_dbg_kms(&dev_priv->drm, @@ -1653,6 +1632,30 @@ static bool intel_sel_update_config_valid(struct intel_dp *intel_dp, if (!crtc_state->has_panel_replay && !intel_psr2_config_valid(intel_dp, crtc_state)) goto unsupported; + if (intel_dp_is_edp(intel_dp)) { + if (!_compute_psr2_sdp_prior_scanline_indication(intel_dp, + crtc_state)) { + drm_dbg_kms(&dev_priv->drm, + "Selective update not enabled, SDP indication do not fit in hblank\n"); + goto unsupported; + } + + if (!_compute_alpm_params(intel_dp, crtc_state)) { + drm_dbg_kms(&dev_priv->drm, + "Selective update not enabled, Unable to use long enough wake times\n"); + goto unsupported; + } + + /* Vblank >= PSR2_CTL Block Count Number maximum line count */ + if (crtc_state->hw.adjusted_mode.crtc_vblank_end - + crtc_state->hw.adjusted_mode.crtc_vblank_start < + psr2_block_count_lines(intel_dp)) { + drm_dbg_kms(&dev_priv->drm, + "Selective update not enabled, too short vblank time\n"); + goto unsupported; + } + } + if (crtc_state->has_panel_replay && (DISPLAY_VER(dev_priv) < 14 || !intel_dp->psr.sink_panel_replay_su_support)) goto unsupported; From patchwork Tue May 21 08:46:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669064 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 16D56C25B75 for ; Tue, 21 May 2024 08:47:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 04BF610E780; Tue, 21 May 2024 08:47:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="mi7SXwNe"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id A8D6710E77D for ; Tue, 21 May 2024 08:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281255; x=1747817255; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ETd5iG6soJwZSQJOthZDM9fuCUIVX2xsxGlWS6za3gU=; b=mi7SXwNepfrptbesX/98Xe1pb43De5vYVY0LTmwqPtsKKj0vz97gHc06 Z9xW/8EWUk6v+rgobv2CUtpFRejurtF8/kDnnoQxVoV+LZqy89Ni+FK6U 4zpiHmIQRCsW0Gw0+CxGI1o/C2w3cYgx4LwLZgbYisoLonJXmSMINg2jy 5j/S1k8OJaac4f+vDT9d9d7EyGrdiH0u1yfMIdjp8vkhynOn/ycNbRGgJ gTM+1EDC6nQi0tu0EYtau4LwsuqQ7U64uqMcmdALKk+7h3lBpGo2RjctY iCx+iu7HQOJqsxz2+plkvsDNKMhiuCfNsa4Akck6pAfNrfiEfSFljMa6S w==; X-CSE-ConnectionGUID: 4n3ghgtzRpWBIR260851Vg== X-CSE-MsgGUID: 0b+HkYe/SOSiaLcco3BUIQ== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297852" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297852" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:33 -0700 X-CSE-ConnectionGUID: H6sC2/v5Tra93iL30s//qA== X-CSE-MsgGUID: UQV9iSzKT5yxDgGklhEfqg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272557" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:32 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 14/17] drm/i915/psr: Check Early Transport for Panel Replay as well Date: Tue, 21 May 2024 11:46:45 +0300 Message-Id: <20240521084648.1987837-15-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Move Early Transport validity check to be performed for Panel Replay as well and use Early Transport for eDP Panel Replay always. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index d09a4f5309c4..2a18ef974221 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1605,9 +1605,6 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp, tgl_dc3co_exitline_compute_config(intel_dp, crtc_state); - if (psr2_su_region_et_valid(intel_dp, false)) - crtc_state->enable_psr2_su_region_et = true; - return true; } @@ -1672,6 +1669,9 @@ static bool intel_sel_update_config_valid(struct intel_dp *intel_dp, goto unsupported; } + if (psr2_su_region_et_valid(intel_dp, crtc_state->has_panel_replay)) + crtc_state->enable_psr2_su_region_et = true; + return true; unsupported: From patchwork Tue May 21 08:46:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669067 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 93168C25B78 for ; Tue, 21 May 2024 08:47:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E209B10E784; Tue, 21 May 2024 08:47:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="oKqU6Hb9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA84310E777 for ; Tue, 21 May 2024 08:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281256; x=1747817256; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Fd5WRcflTgAq8bvjuEtXZYohYCk5CIRp60BJkRF0Z9s=; b=oKqU6Hb9YRSNsuKRsgdZDEcH9ZITAMY8Bg8OSuXN2Wp4NNTWJQ6GYEuX xbOXWGTAp5uXvxw7blJJ2WTK9W/7o0dfYUR7QyQrKFuBOiDzYglKd+J8/ roeV15PxZTdhUwNjCmm3wY0nQXwrQFhY3YHbCMHPajpMzCrkZBErEfCli Qn57Bino9gb6FWwzFDQiMbTXm4lEJUU3p7ySIipvccYQVJGTsO0ZDIsZ+ tyag+KaPfSGMJrEQmdwF9xwqfCejdrpkESGiBH/rpLun2Y1tYf48s+RYE OAxHt5eejqw9G+4MkhO04Lu3NjcNN/xzLK07JCIWTlDK3UipmBUWWgDnz Q==; X-CSE-ConnectionGUID: 9POylLSPQmCKljJ+N9br+A== X-CSE-MsgGUID: VxXpt/NPSEy5AKyx8sSFTg== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297858" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297858" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:35 -0700 X-CSE-ConnectionGUID: qIUffvlRR/mhXgsC5P24aw== X-CSE-MsgGUID: MsrtvZjIQ4yx3RHvOhfuLg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272561" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:34 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 15/17] drm/i915/psr: Modify dg2_activate_panel_replay to support eDP Date: Tue, 21 May 2024 11:46:46 +0300 Message-Id: <20240521084648.1987837-16-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" There are couple of bits in PSR2_CTL which needs to be written in case of eDP Panel Replay Bspec: 68920 Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 2a18ef974221..bcd0f2c8cb5c 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -929,6 +929,18 @@ static u8 frames_before_su_entry(struct intel_dp *intel_dp) static void dg2_activate_panel_replay(struct intel_dp *intel_dp) { struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); + struct intel_psr *psr = &intel_dp->psr; + enum transcoder cpu_transcoder = intel_dp->psr.transcoder; + + if (intel_dp_is_edp(intel_dp) && psr->sel_update_enabled) { + u32 val = LNL_EDP_PSR2_SU_REGION_ET_ENABLE; + + if (intel_dp->psr.req_psr2_sdp_prior_scanline) + val |= EDP_PSR2_SU_SDP_SCANLINE; + + intel_de_write(dev_priv, EDP_PSR2_CTL(dev_priv, cpu_transcoder), + val); + } intel_de_rmw(dev_priv, PSR2_MAN_TRK_CTL(dev_priv, intel_dp->psr.transcoder), From patchwork Tue May 21 08:46:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669065 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 23FECC41513 for ; Tue, 21 May 2024 08:47:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0306A10E77D; Tue, 21 May 2024 08:47:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Koo4jvRd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C5D310E76E for ; Tue, 21 May 2024 08:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281258; x=1747817258; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4PFJfzXMM5h+pjVd8tuCAtBHrleh/Qvq3b+NkuyPXSE=; b=Koo4jvRduAWq9sWKfcHAkVp3CvYMmAo8YgP309xLrsEWNGibRGAG6CVY /fJq0r1ck9Ll1fHMxjiP9U20T28XqAXb0a9/cEL9R1qTZ9sXbhMpTxKI2 BrCDF3owm75JYvXwCHST9SeLQ8FiZqm+D57LPHCRPugnQtUY4mufz3jq5 i69OK7mjSv7/Ic9a9NrbvRUZAk08Kqo3E8Wm4jx6n8MKV0pHuSlG4R700 5jBV6GmZ3smatT5C+nOHSE5oJMr21xiH8ZmIMn+MeoaGbmqOJtUlNFJOV fjYWOnfkl15fFVmN9tUm5/I6Jy0/gLHNLXQIGz6daNs9DhZmhu49Yj3cY Q==; X-CSE-ConnectionGUID: I/X1flXoRSW0rxrFWSxOxw== X-CSE-MsgGUID: JBG3tf5oQfWYiTnvSQJ1SQ== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297865" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297865" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:37 -0700 X-CSE-ConnectionGUID: HP+jW3E8TlSr/fSUsbMoaQ== X-CSE-MsgGUID: UpWAAbyvSTqKo2kPFlj5wg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272570" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:36 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 16/17] drm/i915/psr: Add new debug bit to disable Panel Replay Date: Tue, 21 May 2024 11:46:47 +0300 Message-Id: <20240521084648.1987837-17-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Currently there is no way to disable Panel Replay without disabling PSR. Add new debug bit to be used with i915_edp_psr_debug debugfs interface. v2: ensure that fastset is performed when the bit changes Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_display_types.h | 1 + drivers/gpu/drm/i915/display/intel_psr.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 6fbfe8a18f45..f8863510e722 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1687,6 +1687,7 @@ struct intel_psr { #define I915_PSR_DEBUG_ENABLE_SEL_FETCH 0x4 #define I915_PSR_DEBUG_IRQ 0x10 #define I915_PSR_DEBUG_SU_REGION_ET_DISABLE 0x20 +#define I915_PSR_DEBUG_PANEL_REPLAY_DISABLE 0x40 u32 debug; bool sink_support; diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index bcd0f2c8cb5c..c9b1a5d367e2 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1756,7 +1756,8 @@ void intel_psr_compute_config(struct intel_dp *intel_dp, return; } - if (CAN_PANEL_REPLAY(intel_dp)) + if (CAN_PANEL_REPLAY(intel_dp) && + !(intel_dp->psr.debug & I915_PSR_DEBUG_PANEL_REPLAY_DISABLE)) crtc_state->has_panel_replay = true; crtc_state->has_psr = crtc_state->has_panel_replay ? true : @@ -3064,10 +3065,12 @@ int intel_psr_debug_set(struct intel_dp *intel_dp, u64 val) { struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); const u32 mode = val & I915_PSR_DEBUG_MODE_MASK; - u32 old_mode; + const u32 disable_bits = val & I915_PSR_DEBUG_PANEL_REPLAY_DISABLE; + u32 old_mode, old_disable_bits; int ret; - if (val & ~(I915_PSR_DEBUG_IRQ | I915_PSR_DEBUG_MODE_MASK) || + if (val & ~(I915_PSR_DEBUG_IRQ | I915_PSR_DEBUG_PANEL_REPLAY_DISABLE | + I915_PSR_DEBUG_MODE_MASK) || mode > I915_PSR_DEBUG_ENABLE_SEL_FETCH) { drm_dbg_kms(&dev_priv->drm, "Invalid debug mask %llx\n", val); return -EINVAL; @@ -3078,6 +3081,8 @@ int intel_psr_debug_set(struct intel_dp *intel_dp, u64 val) return ret; old_mode = intel_dp->psr.debug & I915_PSR_DEBUG_MODE_MASK; + old_disable_bits = intel_dp->psr.debug & + I915_PSR_DEBUG_PANEL_REPLAY_DISABLE; intel_dp->psr.debug = val; /* @@ -3089,7 +3094,7 @@ int intel_psr_debug_set(struct intel_dp *intel_dp, u64 val) mutex_unlock(&intel_dp->psr.lock); - if (old_mode != mode) + if (old_mode != mode || old_disable_bits != disable_bits) ret = intel_psr_fastset_force(dev_priv); return ret; From patchwork Tue May 21 08:46:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13669066 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 7A1C4C25B74 for ; Tue, 21 May 2024 08:47:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6994810E785; Tue, 21 May 2024 08:47:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JUiC3RGU"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 348DA10E776 for ; Tue, 21 May 2024 08:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716281259; x=1747817259; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fnM6raBeKWXHvF75x000vpcjumfTVh2iWBSkvXEx1B0=; b=JUiC3RGUZbrjl9TXQGYrt/qw6svJR+FPOSZY59P56I9w0BOe8/eZ9xuI 2mXzPVNP7q0oMApKAd/+zgNOpNJDJ6NUy0saQCY4yGnCB+pY6CmF9Cr/c uZwij4YPxDie9ipISJ7HXkJHXYnQhgAUyzlYTkm3Tc8rBQhpbhpAR/KpC mo9q6tTKIhFP4OkKhptWmIES429t71ZdO8qDuGBMtSMSt+nTi0ddxFqXg n2EaqjWQtgDnOYy+cf9Wd2k7ba2f6W1YbV4a/j683HPtSC60YcB8PqnwT nE97A+b4IRmt2VOYixV4O/CPcXLbSxvRlHdnVfoDwD6luW7enD775e55W g==; X-CSE-ConnectionGUID: aYDACzrBTGyBjTmB4yOzTw== X-CSE-MsgGUID: kxF5pR0MStKBTXWc5mWXFg== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12297869" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12297869" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:39 -0700 X-CSE-ConnectionGUID: g4Um9NN5TaeeSxdJqfoVNQ== X-CSE-MsgGUID: HSeU/vMfTYijoxgTL/6ymw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="33272577" Received: from mathiasj-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.251.211.157]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:47:38 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v2 17/17] Revert "drm/i915/psr: Disable early transport by default" Date: Tue, 21 May 2024 11:46:48 +0300 Message-Id: <20240521084648.1987837-18-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521084648.1987837-1-jouni.hogander@intel.com> References: <20240521084648.1987837-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This reverts commit f3c2031db7dfdf470a2d9bf3bd1efa6edfa72d8d. We want to notice possible issues faced with PSR2 Region Early Transport as early as possible -> let's revert patch disabling Region Early Transport by default. Also eDP 1.5 Panel Replay requires Early Transport. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index c9b1a5d367e2..d68b8d03a2d4 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3384,9 +3384,6 @@ void intel_psr_init(struct intel_dp *intel_dp) if (HAS_PSR(dev_priv) && intel_dp_is_edp(intel_dp)) intel_dp->psr.source_support = true; - /* Disable early transport for now */ - intel_dp->psr.debug |= I915_PSR_DEBUG_SU_REGION_ET_DISABLE; - /* Set link_standby x link_off defaults */ if (DISPLAY_VER(dev_priv) < 12) /* For new platforms up to TGL let's respect VBT back again */