From patchwork Fri May 31 09:49: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: 13681453 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 26838C27C44 for ; Fri, 31 May 2024 09:50:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CB9B710E1AD; Fri, 31 May 2024 09:50:24 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="b7+Z2uEi"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9E3AE10E1BD for ; Fri, 31 May 2024 09:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149022; x=1748685022; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HYT21E5tBkF/t0aZYvt877QYNzGY+4Ji1kDGoKhqTNY=; b=b7+Z2uEiFIOakqs3yeW8z7//UgKfwUf1BrnEmI3Yl3VtCa5Ylv7a0e4Q yvTkMu+ZRDAf8e/5MN28ixlbimh3Z4ONmBd2qfTIrXuG24wiVK2ciscIT Z5sjxxsFMLTe43R8/9yOOIE3FsA1wSTAdtsiquEH1Hno6s4AWtVR99eXj UYzRS1/N5X1ujrsDNxobTQcqCFDYkq245t8P76rWy8nAJaiOayUSNTtry 0f2VlSXDy/Fp4o1UBJeAgf6HYFSQx/fYv1zb2iB/43yIAdqLai8T2BiF6 AaW5qcax84u4hu4Ri75y8tL8ot0LR1YmGbB3irFQcqNR0BoeSXN8eV5Xf Q==; X-CSE-ConnectionGUID: IWxLASEoR2StVi8CmF1WMA== X-CSE-MsgGUID: NX4v9na8QX2ikKhhTihFvg== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446554" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446554" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:17 -0700 X-CSE-ConnectionGUID: ShFgjcNZQSKpKfaAfk6snA== X-CSE-MsgGUID: BdBuw1cNSGCxqQyV9c3fkw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189201" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50: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 v4 01/19] drm/i915/alpm: Do not use fast_wake_lines for aux less wake time Date: Fri, 31 May 2024 12:49:35 +0300 Message-Id: <20240531094953.1797508-2-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 own variables for fast wake lines and aux less wake time. It might be needed to choose if we can enable Panel Replay Selective Update or PSR2. Also currently aux less wake time is overwritten by calculated fast wake time. Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time") Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_alpm.c | 2 +- drivers/gpu/drm/i915/display/intel_display_types.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c index a26716c14aa3..aa15f57cec66 100644 --- a/drivers/gpu/drm/i915/display/intel_alpm.c +++ b/drivers/gpu/drm/i915/display/intel_alpm.c @@ -159,7 +159,7 @@ static int _lnl_compute_aux_less_alpm_params(struct intel_dp *intel_dp, if (i915->display.params.psr_safest_params) aux_less_wake_lines = ALPM_CTL_AUX_LESS_WAKE_TIME_MASK; - intel_dp->alpm_parameters.fast_wake_lines = aux_less_wake_lines; + intel_dp->alpm_parameters.aux_less_wake_lines = aux_less_wake_lines; intel_dp->alpm_parameters.silence_period_sym_clocks = silence_period; intel_dp->alpm_parameters.lfps_half_cycle_num_of_syms = lfps_half_cycle; diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 012ff9e18b54..42400e1e9875 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1846,6 +1846,7 @@ struct intel_dp { /* LNL and beyond */ u8 check_entry_lines; + u8 aux_less_wake_lines; u8 silence_period_sym_clocks; u8 lfps_half_cycle_num_of_syms; } alpm_parameters; From patchwork Fri May 31 09:49: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: 13681451 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 5132FC25B75 for ; Fri, 31 May 2024 09:50:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F39110E162; Fri, 31 May 2024 09:50:24 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CNbZq/5c"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9E9AE10E2A5 for ; Fri, 31 May 2024 09:50: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=1717149022; x=1748685022; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1xXgv/Hs9OghNJmnWOkKMybnzwFvv3JZcXTSzYEKKwo=; b=CNbZq/5cwdPKYUS6GCY74BZLAVEazBaJcDx3Si/PjsqKn+6XbfuxTBr0 I0A4IQEimmp8v/7orF6OcP0gGNv8ay0NXFwfdTwAVQxTswDe1ukszXTPw 8bSIeRSHjSwCTNGkKe2c7QC9IMdhnOHs6Bv9dG/Y16ixyirBGVFUfKX9C ZXWTNSDg4BIZs83qH1CPGSoGFVtmDsGFvTyFkabpSpgTI902IYMv4OoKp eyynHfEx1sH5VUfZvKzk41tO6ysqPnsD1bNhpq+iztndjqv7aU1M+SS6y pm/9R9DIpbvjK1TFJ42RkND5bXNrHzbqkPUn3tyn6MK1KiOfQ/9i52tr2 Q==; X-CSE-ConnectionGUID: brM1WWgtTyKtZ93eJ7sDpw== X-CSE-MsgGUID: gZ97DgI7TsuDtcOfYl8+Ag== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446557" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446557" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:18 -0700 X-CSE-ConnectionGUID: aeLYC7jMSRGsSoFWG97BOQ== X-CSE-MsgGUID: Kt3kgTjDR/aF224WTIm2Pw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189206" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50: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 v4 02/19] drm/i915/alpm: Write also AUX Less Wake lines into ALPM_CTL Date: Fri, 31 May 2024 12:49:36 +0300 Message-Id: <20240531094953.1797508-3-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 AUX Less Wake lines are not written into ALPM_CTL. Fix this. Fixes: 1ccbf135862b ("drm/i915/psr: Enable ALPM on source side for eDP Panel replay") Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_alpm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c index aa15f57cec66..fd35056237e5 100644 --- a/drivers/gpu/drm/i915/display/intel_alpm.c +++ b/drivers/gpu/drm/i915/display/intel_alpm.c @@ -323,7 +323,8 @@ static void lnl_alpm_configure(struct intel_dp *intel_dp, (crtc_state->has_lobf && intel_alpm_aux_less_wake_supported(intel_dp))) { alpm_ctl = ALPM_CTL_ALPM_ENABLE | ALPM_CTL_ALPM_AUX_LESS_ENABLE | - ALPM_CTL_AUX_LESS_SLEEP_HOLD_TIME_50_SYMBOLS; + ALPM_CTL_AUX_LESS_SLEEP_HOLD_TIME_50_SYMBOLS | + ALPM_CTL_AUX_LESS_WAKE_TIME(intel_dp->alpm_parameters.aux_less_wake_lines); intel_de_write(dev_priv, PORT_ALPM_CTL(dev_priv, cpu_transcoder), From patchwork Fri May 31 09:49: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: 13681454 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 7D8F7C25B75 for ; Fri, 31 May 2024 09:50:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D4FAD10E3D1; Fri, 31 May 2024 09:50:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CHVCaH10"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id E464E10E384 for ; Fri, 31 May 2024 09:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149022; x=1748685022; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WesjoU+OxefA4cC+hqMK6c4CkX3StrB/8PTQc8jOon4=; b=CHVCaH10F9f4MhV1DWI5zDfDxKnu7ly6mx5CVuvHxWAY0L6SV9fnvpQ2 ObD5kGoed4gR1AxdrDTE92GZMvDt0Qm6ZPgxc85NbXZE6D2b/KvtlwpRj jDTBB4hQ5Znm5T6bouKCMtKYoEMotCepYd7xyf7PT7A75MgFW/bkKB+Pb A0F+1xIEPPFZew+PFw407a0omgCb3rDk6Cz3s5zOPtNiyxemJ6ODTd6hy KJr/RkCNEg79GDLgnwCvnT9S1S3UGIjRvhNWiOI98A8iqaGebRHb1r4L8 38mt7Dc80fZpiWUI8MwIDgNjwwYFMVpJrkKsAzYuvPW3rDw9rPxoqoAgv w==; X-CSE-ConnectionGUID: Em7TOF8TStuZnK2V1yBFWw== X-CSE-MsgGUID: L8H55aDATKi8N5x/LEoWlw== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446558" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446558" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:20 -0700 X-CSE-ConnectionGUID: kuXPIxXIQE6pCYGCYmcaaA== X-CSE-MsgGUID: 8B9HrDRZQw+3qhcDMhGqdA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189210" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:18 -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 v4 03/19] drm/i915/display: Take panel replay into account in vsc sdp unpacking Date: Fri, 31 May 2024 12:49:37 +0300 Message-Id: <20240531094953.1797508-4-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 intel_dp_vsc_sdp_unpack is not taking into account Panel Replay vsc sdp. Fix this by adding vsc sdp revision 0x6 and length 0x10 into intel_dp_vsc_sdp_unpack Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_dp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index fd054e16850d..286119eb77f8 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -4438,7 +4438,8 @@ static int intel_dp_vsc_sdp_unpack(struct drm_dp_vsc_sdp *vsc, vsc->length = sdp->sdp_header.HB3; if ((sdp->sdp_header.HB2 == 0x2 && sdp->sdp_header.HB3 == 0x8) || - (sdp->sdp_header.HB2 == 0x4 && sdp->sdp_header.HB3 == 0xe)) { + (sdp->sdp_header.HB2 == 0x4 && sdp->sdp_header.HB3 == 0xe) || + (sdp->sdp_header.HB2 == 0x6 && sdp->sdp_header.HB3 == 0x10)) { /* * - HB2 = 0x2, HB3 = 0x8 * VSC SDP supporting 3D stereo + PSR @@ -4446,6 +4447,8 @@ static int intel_dp_vsc_sdp_unpack(struct drm_dp_vsc_sdp *vsc, * VSC SDP supporting 3D stereo + PSR2 with Y-coordinate of * first scan line of the SU region (applies to eDP v1.4b * and higher). + * - HB2 = 0x6, HB3 = 0x10 + * VSC SDP supporting 3D stereo + Panel Replay. */ return 0; } else if (sdp->sdp_header.HB2 == 0x5 && sdp->sdp_header.HB3 == 0x13) { From patchwork Fri May 31 09:49: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: 13681457 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 9F635C27C4F for ; Fri, 31 May 2024 09:50:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5A3D10E2A5; Fri, 31 May 2024 09:50:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Zvnp0zea"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4349C10E3D1 for ; Fri, 31 May 2024 09:50: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=1717149022; x=1748685022; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tJ/UpzRHGZGPgo987ubPFKJaHNCNCxXugjnEBKnYDW0=; b=Zvnp0zeaTNFtS/hBbgaGszBIEMvgs7N+bKosoZDLrcOzlakbi+lI3nHh ecFKVhfvX7n0EvLdaHM1Y/ou98wTvzAY5mH0UK/2R5w+MEIxAVfgumGYJ d3XGLarRqXFR8V9B0otUZvHMJXLmXVagYU9BIXRPi+qpsIQ5OONzimj9H huvICHwQAF+cw9ZuiaTT4d6Jf1U+qD+Rc+Qx0jG+mq6uKL9eBdyn23rh2 gXtdvyNtygiKv8Iq51CjBn2C7VqaeoJrtccnHze0eF/ZnHCGetgIqyLDP MIxV3OVZl8e6Td/wEiRhQptJI6Z1kWLQwFJCIknpkysZUFVMpfjKrP6zf g==; X-CSE-ConnectionGUID: 08N9ZBLnSsahVPUFdI9SvA== X-CSE-MsgGUID: fKPmTMfxS6CXgxmRzuXt1A== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446561" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446561" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:22 -0700 X-CSE-ConnectionGUID: 2LjIdrtcSDe7L3U6u9dDrw== X-CSE-MsgGUID: /PW0mdOhRHCcgK69pOc1Cw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189213" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:20 -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 v4 04/19] drm/i915/display: Skip Panel Replay on pipe comparison if no active planes Date: Fri, 31 May 2024 12:49:38 +0300 Message-Id: <20240531094953.1797508-5-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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" Panel Replay is not enabled if there are no active planes. Do not compare it on pipe comparison. Otherwise we get pipe mismatch. Fixes: ac9ef327327b ("drm/i915/psr: Panel replay has to be enabled before link training") Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 765a7ab04a1c..e1923bdc3ff4 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -5330,7 +5330,9 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config, * Panel replay has to be enabled before link training. PSR doesn't have * this requirement -> check these only if using panel replay */ - if (current_config->has_panel_replay || pipe_config->has_panel_replay) { + if (current_config->active_planes && + (current_config->has_panel_replay || + pipe_config->has_panel_replay)) { PIPE_CONF_CHECK_BOOL(has_psr); PIPE_CONF_CHECK_BOOL(has_sel_update); PIPE_CONF_CHECK_BOOL(enable_psr2_sel_fetch); From patchwork Fri May 31 09:49: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: 13681455 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 8FF68C27C4F for ; Fri, 31 May 2024 09:50:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D1C3910E384; Fri, 31 May 2024 09:50:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="VEZZY7lX"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id D1FF410E1AD for ; Fri, 31 May 2024 09:50:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149024; x=1748685024; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=f4HKHEiI6aCXVpeS5i9+Yv4AZARmGADuOJ0xpy1yZVo=; b=VEZZY7lXYD6RHRozuATPx2j9+5JNHbYDsJ0miiMbRJyp2OrDR9Oc+FZ5 jp9XMuK2R+x791aPfEPeaQcp444LY35Rwv6aCdThG6cEqDqD6kid/7X6+ En4OCR9MYF9PnH1WKVcePdItOl0EC4feXGkg2iaGIw8TAiskmHd29swg0 +4oLET+1VEaObUqAZN5Pk1PbxzBpcRW195tJh1mruuE5aPSZrRztKPcQK LUCAUbaaITZFLLTeKpMSJXbMv2Ct4CCRP+w0fqiS1V/8a4S/5mF0QtsGk 5qzBwqtBPgBtM/C+L9yaXAUv9+yklUJuBb8ltFbL10Gzy8v8M4NfK/Cs8 A==; X-CSE-ConnectionGUID: dVvePJb4QzSBPfy2ln0zyg== X-CSE-MsgGUID: bPvA4KW+R7OV9Uz1BI9qgQ== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446562" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446562" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:24 -0700 X-CSE-ConnectionGUID: 1xrSSbbnQpO/1ikvVRPRBw== X-CSE-MsgGUID: b2cOK6ddQ7OggW9wBSNpGg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189219" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:22 -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 v4 05/19] drm/i915/psr: Add Panel Replay support to intel_psr2_config_et_valid Date: Fri, 31 May 2024 12:49:39 +0300 Message-Id: <20240531094953.1797508-6-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 4b337bcd9c90..05aff2adb19e 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -674,16 +674,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) @@ -710,7 +711,7 @@ 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, crtc_state->has_panel_replay)) dpcd_val |= DP_PSR_ENABLE_SU_REGION_ET; } @@ -978,7 +979,7 @@ 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, false)) val |= LNL_EDP_PSR2_SU_REGION_ET_ENABLE; /* @@ -1355,7 +1356,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, crtc_state->has_panel_replay)) crtc_state->enable_psr2_su_region_et = true; return true; From patchwork Fri May 31 09:49: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: 13681456 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 84EECC27C44 for ; Fri, 31 May 2024 09:50:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 235F410E3EB; Fri, 31 May 2024 09:50:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="BuCO//0n"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id CA30510E2A5 for ; Fri, 31 May 2024 09:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149026; x=1748685026; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WcSShjXSB9d5zNL5EK1n0puukbwDav4fJXBOT61kjaw=; b=BuCO//0nP/QbD39m6wDXL5Iaxw4oayTsQb1Mw4rLWx5uCuMh0KuPdaOp AFnr4sJXEBPAGouOSoiz/Mjjh6ewRVxLnPK2Kmgu+lNEbbEnUsr5TnZgQ tXZwMR7An9Lno8agwrfMgYV5eIaq7wqfPucd0kBF5+kAgP6k5WMwYKXfE raW1NqkkiLy+2DQazU+m0cM1oQbjk7gRGlwJqKtbbCwO9nFssV21TeY17 ZONNoQ6atLhqkBrGbN79NYulFJUrsGRYsBY6ArNJhFnRgstmp80diSnUA Mvacyse2UadXKhlzOr1ZcI/46BwP5FtG64rSkMl1itLT0/XV1duWB/znU A==; X-CSE-ConnectionGUID: oOr5V63dSdC2ZYclUkJ/rA== X-CSE-MsgGUID: cERLouHPQNqXO7uT+Dzgig== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446563" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446563" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:25 -0700 X-CSE-ConnectionGUID: I/Z/NYx3Q4m2MY/sZh6FgA== X-CSE-MsgGUID: AioYINSjTiClNLqikLm7yQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189224" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50: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 v4 06/19] drm/i915/alpm: Make alpm support checks non-static Date: Fri, 31 May 2024 12:49:40 +0300 Message-Id: <20240531094953.1797508-7-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 use intel_alpm_aux_wake_supported and intel_alpm_aux_less_wake_supported in intel_psr.c. Convert them as non-static. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_alpm.c | 4 ++-- drivers/gpu/drm/i915/display/intel_alpm.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c index fd35056237e5..5f766d8be63a 100644 --- a/drivers/gpu/drm/i915/display/intel_alpm.c +++ b/drivers/gpu/drm/i915/display/intel_alpm.c @@ -11,12 +11,12 @@ #include "intel_dp_aux.h" #include "intel_psr_regs.h" -static bool intel_alpm_aux_wake_supported(struct intel_dp *intel_dp) +bool intel_alpm_aux_wake_supported(struct intel_dp *intel_dp) { return intel_dp->alpm_dpcd & DP_ALPM_CAP; } -static bool intel_alpm_aux_less_wake_supported(struct intel_dp *intel_dp) +bool intel_alpm_aux_less_wake_supported(struct intel_dp *intel_dp) { return intel_dp->alpm_dpcd & DP_ALPM_AUX_LESS_CAP; } diff --git a/drivers/gpu/drm/i915/display/intel_alpm.h b/drivers/gpu/drm/i915/display/intel_alpm.h index c82ecc7b4001..d4fb60393c91 100644 --- a/drivers/gpu/drm/i915/display/intel_alpm.h +++ b/drivers/gpu/drm/i915/display/intel_alpm.h @@ -22,4 +22,6 @@ void intel_alpm_lobf_compute_config(struct intel_dp *intel_dp, void intel_alpm_configure(struct intel_dp *intel_dp, const struct intel_crtc_state *crtc_state); void intel_alpm_lobf_debugfs_add(struct intel_connector *connector); +bool intel_alpm_aux_wake_supported(struct intel_dp *intel_dp); +bool intel_alpm_aux_less_wake_supported(struct intel_dp *intel_dp); #endif From patchwork Fri May 31 09:49: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: 13681462 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 2F429C27C4F for ; Fri, 31 May 2024 09:50:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBC4B10E554; Fri, 31 May 2024 09:50:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="kaaV709c"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 66E2C10E3D8 for ; Fri, 31 May 2024 09:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149027; x=1748685027; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WKwhbzQi5hsplwFgH2qsWWBeAppsfVS5UfGKMoq9rG4=; b=kaaV709cj5qj2p9sALvip5PIfQsMeQfZZI18VzTewEL1YKkAKbOb9+MJ OIknUzhxM5y47PUhxFBSk66n9nxfRnBA1ZZhFZBXO5IijVyBkmKyencA3 95jcC6fKV2TKaurO0KaWj0LnH3y+6P6cpcJAd9NIqyU41mTerMsyaGTPO xScrYkOY8qR3Q1ZQpvgscTForqAWreR4+169IPY6q7MITE2tIeSd6DVkx 9NE1cGWIXYvtKKuQX7kllR3WQqdjtwZCJ7cO9bujzfP0FMn80GbBGRCj6 kM5Z4bNIMpyle4GmcZwu21MgKxeyjLF3H9wS2/Uh9ma2R4AImOl990rS5 w==; X-CSE-ConnectionGUID: st7Coi5fTkyee8tYbeDe6w== X-CSE-MsgGUID: WZi871ugQmSj9Bpmd6dRtQ== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446564" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446564" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:27 -0700 X-CSE-ConnectionGUID: IoGmTBzmQPuQY9YFBJzPxQ== X-CSE-MsgGUID: n5qUrOUpQ8KllnXT/7XPeg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189228" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:25 -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 v4 07/19] drm/i915/psr: Check panel ALPM capability for eDP Panel Replay Date: Fri, 31 May 2024 12:49:41 +0300 Message-Id: <20240531094953.1797508-8-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 v2: use intel_alpm_aux_less_wake_supported Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 05aff2adb19e..7fb14d740d31 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -561,6 +561,13 @@ static void _panel_replay_init_dpcd(struct intel_dp *intel_dp) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); + if (intel_dp_is_edp(intel_dp) && + (!intel_alpm_aux_less_wake_supported(intel_dp))) { + 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) From patchwork Fri May 31 09:49: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: 13681468 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 CD431C25B75 for ; Fri, 31 May 2024 09:51:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12FC610E6C8; Fri, 31 May 2024 09:51:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="oKDsFKNH"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 55D5A10E506 for ; Fri, 31 May 2024 09:50:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149029; x=1748685029; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+FN/DIO1HZVndQ2etCTx2eQMDGKGblHzsULyzEEZFpI=; b=oKDsFKNHy3NXuz1zH3dZui31K5phSuEfd21pN8YrIJ/HDQlGDCmoQPew Bdy9vIAj0Xx/zsWPnJWV8FzU75W+s09oT81WGfBxTr3T07lXahpFVHe7D MDz7upYaWNIitzCnp5IX1nhll7KQXAAgcE2zXb7ap/9/CllumCfnxgIQP emg4MPrWLkEUrso+6DwCTuGgrXfzXwIxi8hCLqlyE/Rw+J1r/QJ6+x3Ub YRuU2sE33xm+YckkDf5116Zz6RrjZwTaqqrI8ABTDo3NUpQyjQu/n3R+9 AsEiuEOeaWGfXZ34CiwPL18VX2gC6dpSIu6pb7mKuJDGfUa9gQL+Otwgx Q==; X-CSE-ConnectionGUID: ub7l8dwmRNiq1sSEeQHztQ== X-CSE-MsgGUID: Byxtelv6T+egPBBvK4s14g== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446565" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446565" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:29 -0700 X-CSE-ConnectionGUID: K76ib0FSSFe+6GK5q6CxMg== X-CSE-MsgGUID: QHDL9+PmS9u3Rdmtmqwzuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189231" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:27 -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 v4 08/19] drm/i915/psr: Use intel_alpm_aux_wake_supported instead of local variable Date: Fri, 31 May 2024 12:49:42 +0300 Message-Id: <20240531094953.1797508-9-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 have now intel_alpm_aux_wake_supported. Use that instead of local variable. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 7fb14d740d31..51fa8e43265a 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -446,16 +446,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); @@ -607,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 + @@ -620,7 +609,8 @@ 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 && + intel_alpm_aux_wake_supported(intel_dp); drm_dbg_kms(&i915->drm, "PSR2 %ssupported\n", intel_dp->psr.sink_psr2_support ? "" : "not "); } From patchwork Fri May 31 09:49: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: 13681469 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 4353EC27C4F for ; Fri, 31 May 2024 09:51:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 553E510E719; Fri, 31 May 2024 09:51:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="bh5h/DxS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 429FA10E412 for ; Fri, 31 May 2024 09:50:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149031; x=1748685031; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QvhXk65sKbeUOrHsQAPB4iMOE7HccVgrtnYmyE+LUxE=; b=bh5h/DxSrOSQSAiZBydVlexrw4+sFR5sy45z5ECkvK7zq+wAqn3GTGO5 kOAa8OaUZweOPtdnyHMpw3dtPnzGT4l3QlrKuNDUenvmM42/tGms24B9q +kAKT2+4h861rSShuZ/e7ENeXzRhHDW4Zfqd0CzNfXOeYE4SWCnoINmQa gmfqX5ygKDWI6fOYN9NcJanwPyRHVoEHWFzaTShdugTq76Zq5citTja95 TB2iaMiQZlp62CjOwyv0HqZfLmdzIkGjzBfAfqbMUYgRGW7vYNWzDuNGV pNttCyewnf5Vr8wb8Wz6skm/SG1QViCg9zgzgOktbEfhttjZaRXQDATsf g==; X-CSE-ConnectionGUID: 5od+tTOgQeuBvbdgwTvpgg== X-CSE-MsgGUID: HPXouhUcQBuEzARMe8f5Lg== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446566" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446566" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:31 -0700 X-CSE-ConnectionGUID: sSWeoWOKRI2rDLyWZmsn1Q== X-CSE-MsgGUID: zeLy8doOSse5wfy60FthMQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189234" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:29 -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 v4 09/19] drm/i915/psr: Inform Panel Replay source support on eDP as well Date: Fri, 31 May 2024 12:49:43 +0300 Message-Id: <20240531094953.1797508-10-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 51fa8e43265a..4f1ae5393a60 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3037,9 +3037,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 Fri May 31 09:49: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: 13681466 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 91F71C27C44 for ; Fri, 31 May 2024 09:51:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6237710E729; Fri, 31 May 2024 09:51:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="RVg/o9G9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id BF32A10E412 for ; Fri, 31 May 2024 09:50: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=1717149033; x=1748685033; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WQilZbVYAcFUjhgZuyopELkO9faePzT3NUlEfdJL/x0=; b=RVg/o9G9M2Xi0/nSdasZMfYPkTnYq1YSgcfCVzCEWklDmB5IgURdT2mu 6IV5cAK29ZjMKx4f1mm/qbVUTMa1E4/+C8BryyR7tZ9hPz4v9SkKgICsp f5WddSreiyN3ZU4ek9fGo9jxZ0W2YETeplm0OGA9KFvhnOjs+XJaWNlCt N1lXQf14ohrHR5/y43RwyqjD5bhF4aMx6IjyEaEf1+f7E6Drp5yR9Ny/O AGixZ9yFI9vwsuaP1c6zwMcMaYJjMGviZNGzYOm5h7yX9Ka6mAstSa0+j +MCmd5QNGrip0sEjIe6hfYqkO+cd7eSw8visYTET41z1StbD/FiqNZxMr w==; X-CSE-ConnectionGUID: y/Qi115pSeyv1tl2xGJVFQ== X-CSE-MsgGUID: mljv7LUITCevbndbJIYYKA== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446568" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446568" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:33 -0700 X-CSE-ConnectionGUID: 14wkZXyZQLCT5WC8MrPoHQ== X-CSE-MsgGUID: HhtX0h+SSxK6p4guZc6x3g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189242" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:31 -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 v4 10/19] drm/i915/psr: enable sink for eDP1.5 Panel Replay Date: Fri, 31 May 2024 12:49:44 +0300 Message-Id: <20240531094953.1797508-11-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 4f1ae5393a60..081109bed0e6 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -690,6 +690,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. @@ -698,42 +715,54 @@ 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, crtc_state->has_panel_replay)) - 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 Fri May 31 09:49: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: 13681459 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 75CDFC25B75 for ; Fri, 31 May 2024 09:50:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9E7CD10E412; Fri, 31 May 2024 09:50:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="WRT5Cm5E"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 83D3910E506 for ; Fri, 31 May 2024 09:50: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=1717149035; x=1748685035; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nObwX5bbMSIBAjpNJKwjP312Yy4NSYZZ5VuRyaxE6+4=; b=WRT5Cm5EqGzs55CEsm/2qqgAtXY4eIWuyNeTsfXHuS/07YGTnV3ENSDp Q+b5ZbBGv1q9/rcVo2sROzWBjfEXlmAW8SfwCCP2WJbY6K2G4e+Bhs3nS y+ty2q7oXd1QBLBQ5l2cNisNNkd06xWUkqmbIZLAfDb3fsZyTxQmEBpMw l9n3dHB1Y1JFSFZtWVKor6BbJ45fG+Dp4Kl+n1gY19V1zxbKqxu/b6Tni MoJuNuzFmYNrZxcTlDdKK5quMa9AcmuqZqbpPO2OOxxDdiFZ8n2LptiZH tqhsbj3e2pYFmdW5KrpGI9+THIfWMFephMgSaCjmZOge4IXWHGMzUhClk Q==; X-CSE-ConnectionGUID: Bur3sN2fSreurD+YtsRlYw== X-CSE-MsgGUID: lcUoZXvDR9qILinv1NG63A== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446570" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446570" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:34 -0700 X-CSE-ConnectionGUID: nYq+ag6OTXe+A8e77ktSZQ== X-CSE-MsgGUID: SkA9jFnVSkSeTribPSQDwg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189246" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:33 -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 v4 11/19] drm/i915/psr: Check panel Early Transport capability for eDP PR Date: Fri, 31 May 2024 12:49:45 +0300 Message-Id: <20240531094953.1797508-12-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 081109bed0e6..1e503612bd25 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -551,11 +551,18 @@ static void _panel_replay_init_dpcd(struct intel_dp *intel_dp) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); - if (intel_dp_is_edp(intel_dp) && - (!intel_alpm_aux_less_wake_supported(intel_dp))) { - 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 (!intel_alpm_aux_less_wake_supported(intel_dp)) { + 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 Fri May 31 09:49: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: 13681461 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 C1D83C27C44 for ; Fri, 31 May 2024 09:50:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02F1810E506; Fri, 31 May 2024 09:50:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="P1hNmwf2"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 52AB210E5F0 for ; Fri, 31 May 2024 09:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149036; x=1748685036; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=I9EJ8ctntqUvDKUXFvqHfIEj9pwalH9JzRb9Rm5IM+4=; b=P1hNmwf2KBFE1P9fQoguZ9qwJhZKm9UjhlrV1kz3X3ZK7sAj1oaM12ZD AiO6/SegfSjIQX/fYRDyJRPtMHIe97WD4SgP4/NRGPLaJSXs3aYwOjoJt M/x6ShELYuOCNiyrRxPGSahfS3W785iHjowOxrLJYpOB5B4e7Ta5jgww/ 2a8IAXTBLV62smwNBKOoKq7AphxCbqGKWnpqRZ/E40SEl0lt64ZngqCZC exsSJjaj97/RlPXbYwpbF31ZAmeuLR2gJPGKoNuK6FjMSdlbX7L7Z/3eh Y/u0MMfcvFfLPOjL7k2Gt1vcnSomLWCMwvtEZfmwkEUVrvp06OPNQUQ1m g==; X-CSE-ConnectionGUID: LPxHE3O+QDqkN3A5dK85gA== X-CSE-MsgGUID: LwfNjoHbQYy8JImxWa4tKA== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446575" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446575" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:36 -0700 X-CSE-ConnectionGUID: h+13pXreSLqn4hbPlaxCjQ== X-CSE-MsgGUID: eGA4QWWaQ9WBTTXh05opFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189252" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50: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 v4 12/19] drm/i915/psr: Perfrom psr2 checks related to ALPM for Panel Replay Date: Fri, 31 May 2024 12:49:46 +0300 Message-Id: <20240531094953.1797508-13-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 1e503612bd25..25080f2a3806 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1357,27 +1357,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 (!intel_alpm_compute_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, @@ -1416,6 +1395,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 (!intel_alpm_compute_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 Fri May 31 09:49: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: 13681463 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 0338FC25B75 for ; Fri, 31 May 2024 09:51:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E81010E5C1; Fri, 31 May 2024 09:51:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="jvg8EFMv"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1585B10E628 for ; Fri, 31 May 2024 09:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149038; x=1748685038; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=94eVm9bA4VMDi8GlGFq0qic23rWprrT9+YVqxjb4kwU=; b=jvg8EFMvDgMbZBlaa+3MVc3z7VqC9DWLBZxg23bYf31S8gJLK6N58kG7 +cbWbzLZDLH2B5OmrLfXbG/sEumiXZm57nMZ6MsrQj3IWbgQu7DsHovh4 4PI6sTHImW286PKK9PS6IoRf3T/QE2FNAhdfBpOHkO5M5GIbbVWUbVAh5 iBl429xZ5NwHDZIPQ+jcr9VLbw/1iPMkEMnZKP7BqI5LHRsqb6KC5YrrG PBYZY4yzfHlUghxaulYUe8GkUpCnyDTI8qg8d7iqtIzx1YEQJ0PAae5Mj uPF6Jf1kkfhsWMYssq54IK5hXYZCvIY5jLQUvo12h2skQ3MebEc/q6GJ9 w==; X-CSE-ConnectionGUID: 436DR8zLS7qZj1c2IC0f8g== X-CSE-MsgGUID: y2jmNy+xQTOy0GDw16VfMw== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446581" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446581" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:38 -0700 X-CSE-ConnectionGUID: eDd+tK+gSHa5c43F/DfsUA== X-CSE-MsgGUID: TI/QWZISQG+XPwisTeEZPQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189261" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50: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 v4 13/19] drm/i915/psr: Add Panel Replay compute_config helper Date: Fri, 31 May 2024 12:49:47 +0300 Message-Id: <20240531094953.1797508-14-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 are about to add more checks for Panel Replay. Due to that it makes sense to add now Panel Replay compute config helper. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 25080f2a3806..1e958d9851d6 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1472,6 +1472,14 @@ static bool _psr_compute_config(struct intel_dp *intel_dp, return true; } +static bool _panel_replay_compute_config(struct intel_dp *intel_dp) +{ + if (!CAN_PANEL_REPLAY(intel_dp)) + return false; + + return true; +} + void intel_psr_compute_config(struct intel_dp *intel_dp, struct intel_crtc_state *crtc_state, struct drm_connector_state *conn_state) @@ -1507,8 +1515,7 @@ void intel_psr_compute_config(struct intel_dp *intel_dp, return; } - if (CAN_PANEL_REPLAY(intel_dp)) - crtc_state->has_panel_replay = true; + crtc_state->has_panel_replay = _panel_replay_compute_config(intel_dp); crtc_state->has_psr = crtc_state->has_panel_replay ? true : _psr_compute_config(intel_dp, crtc_state); From patchwork Fri May 31 09:49: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: 13681458 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 8E2CAC27C4F for ; Fri, 31 May 2024 09:50:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B19210E3D8; Fri, 31 May 2024 09:50:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ALyvmkbt"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id D37C710E4E3 for ; Fri, 31 May 2024 09:50: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=1717149040; x=1748685040; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6Z27CrxdT/c29nun3inCNGsQfus1n5BS5B3Cf3odnOw=; b=ALyvmkbtVWQsFP703HVeIpWhuU8XrZ9beAk1tcXQO1IDV5r08SanfySF c6edrIYlGT8ne+uEEdQm12qusvFC8TP2Rb7j82tTnMGlKQV1ojuRYO+hV xEA7IHLXWxCzW6CojSPxJM+OTUvpfS651Q9lM2l7ytzJvnyMupYPFv/0s P0jXstaFLisSJN8iSMFjd1CFVjvd6ugcxFCIylJPKY+IQLkyu9ctVFX2u s8Gb0GEQH/4AA4HsN0FaRZ/3sKHb+62Mn6Y/W2EIxxyasFW+W6+gykKed fG26HEXTFKaMGZ0pqzueHLqzaESjMFxtqZGr2X7OEHzNn3sCZjpiK3RAO Q==; X-CSE-ConnectionGUID: A5EZxt1jQymNwXGT/phu9g== X-CSE-MsgGUID: Mgjr7wY+SEKE3pRz70bKiw== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446583" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446583" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:40 -0700 X-CSE-ConnectionGUID: 3DQhKlLkSZ+6Z4+KwTQYjg== X-CSE-MsgGUID: WJjnx7UZRVuZP8W31BQ7Og== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189267" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50: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 v4 14/19] drm/i915/psr: 128b/132b Panel Replay is not supported on eDP Date: Fri, 31 May 2024 12:49:48 +0300 Message-Id: <20240531094953.1797508-15-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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" Take into account that 128b/132b Panel Replay is not supported on eDP. Bspec: 68920 Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 1e958d9851d6..6f69bd6d4461 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1472,11 +1472,22 @@ static bool _psr_compute_config(struct intel_dp *intel_dp, return true; } -static bool _panel_replay_compute_config(struct intel_dp *intel_dp) +static bool +_panel_replay_compute_config(struct intel_dp *intel_dp, + const struct intel_crtc_state *crtc_state) { if (!CAN_PANEL_REPLAY(intel_dp)) return false; + if (!intel_dp_is_edp(intel_dp)) + return true; + + /* Remaining checks are for eDP only */ + + /* 128b/132b Panel Replay is not supported on eDP */ + if (intel_dp_is_uhbr(crtc_state)) + return false; + return true; } @@ -1515,7 +1526,8 @@ void intel_psr_compute_config(struct intel_dp *intel_dp, return; } - crtc_state->has_panel_replay = _panel_replay_compute_config(intel_dp); + crtc_state->has_panel_replay = _panel_replay_compute_config(intel_dp, + crtc_state); crtc_state->has_psr = crtc_state->has_panel_replay ? true : _psr_compute_config(intel_dp, crtc_state); From patchwork Fri May 31 09:49:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13681470 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 917D8C27C44 for ; Fri, 31 May 2024 09:51:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 76B0B10E74A; Fri, 31 May 2024 09:51:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="TwZxnDav"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9383610E506 for ; Fri, 31 May 2024 09:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149042; x=1748685042; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=icFY9mDDiFCzJ8Vtaux6jof2YksJvytT6b+E75rABbE=; b=TwZxnDavJSQJ7/GDmXB1fkwOHRxPg98HRzI9BhCPLAjRSvHhl4iXN6rn wzIj358M2sTwEzhK5r+le6OSC7Yj1svylPbLfURcKwe1/qgjQZQEJPYDf BWtNpyV0CJ3G8UaKG3SLlqD+C254/Pyx42hoZ0oQbNkXO9wo6EKaIDu0Q v+WbSnb/qfgDraW3Bz0L+7eQmo9XqOqoF1k3X++CE6FkGZ1ORG4vv2fKU 1VTtOrIk09iwy0OOp7lmarnfCgtv+buuJIpO/i3ZokgWH1uZB7oyOMlWI 2KFj+6c3JICnKv8BrMhUkOumIq4KdrilWbtlJ0YxEJCwQ++PZ4f5CY47E w==; X-CSE-ConnectionGUID: aFUEA1b4S3i/j+wOluALQQ== X-CSE-MsgGUID: 3/32ibMAQXqfD8NcpYay2g== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446585" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446585" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:41 -0700 X-CSE-ConnectionGUID: 2x8RaYBeR0GEexhTZZGVjQ== X-CSE-MsgGUID: ARIR0lxOT6CWn+vA7TlLcQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189275" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:40 -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 v4 15/19] drm/i915/psr: HW will not allow PR on eDP when HDCP enabled Date: Fri, 31 May 2024 12:49:49 +0300 Message-Id: <20240531094953.1797508-16-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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" Take into account in Panel Replay compute config that HW will not allow PR on eDP when HDCP enabled. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 6f69bd6d4461..2bb25634b65d 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1474,8 +1474,13 @@ static bool _psr_compute_config(struct intel_dp *intel_dp, static bool _panel_replay_compute_config(struct intel_dp *intel_dp, - const struct intel_crtc_state *crtc_state) + const struct intel_crtc_state *crtc_state, + const struct drm_connector_state *conn_state) { + struct intel_connector *connector = + to_intel_connector(conn_state->connector); + struct intel_hdcp *hdcp = &connector->hdcp; + if (!CAN_PANEL_REPLAY(intel_dp)) return false; @@ -1488,6 +1493,14 @@ _panel_replay_compute_config(struct intel_dp *intel_dp, if (intel_dp_is_uhbr(crtc_state)) return false; + /* HW will not allow Panel Replay on eDP when HDCP enabled */ + if (conn_state->content_protection == + DRM_MODE_CONTENT_PROTECTION_DESIRED || + (conn_state->content_protection == + DRM_MODE_CONTENT_PROTECTION_ENABLED && hdcp->value == + DRM_MODE_CONTENT_PROTECTION_UNDESIRED)) + return false; + return true; } @@ -1527,7 +1540,8 @@ void intel_psr_compute_config(struct intel_dp *intel_dp, } crtc_state->has_panel_replay = _panel_replay_compute_config(intel_dp, - crtc_state); + crtc_state, + conn_state); crtc_state->has_psr = crtc_state->has_panel_replay ? true : _psr_compute_config(intel_dp, crtc_state); From patchwork Fri May 31 09:49:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13681460 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 03711C25B75 for ; Fri, 31 May 2024 09:50:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 57BCA10E4E3; Fri, 31 May 2024 09:50:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="OxT+C+Gw"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 62EA210E554 for ; Fri, 31 May 2024 09:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149043; x=1748685043; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sn+9uC1yAidMBc1+BtsPRF/sXwTDZCqTntJuSmRz2Ww=; b=OxT+C+GwpFiPN5bvsLKoM2fXRmsE/dXmbwD3j6fYnzXEAMOi3GPeILGx aBFLI15UL4IdYOFGey+Q6rURJeqF480lL/woVUaNHtlq34/dAOs1xS7zz SH/xU6WK/l28exalipvwIM8aS6cq4Rk02b4b0F08O+ou06zv0XKmKvBOh +IRDmElxeImvAWoUu+kVyfYg1n9ug5Yv5+9vzgzjlilKF4eegBsOocA42 s7MKiWzvZ+nQs3XJ28Uad8BLQXmE6CqXta6+OcyooVWnFgVpPAXmz0y8U RFCO1lL4kVx8AyryQUMQv5xW3+nTNKlK2XzawqFtBgs5du7yZAK/OUddy A==; X-CSE-ConnectionGUID: EtzEdu2fS5OnNSd3IX3RJQ== X-CSE-MsgGUID: EL4LBodHQCCb9fAw5P1QLg== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446587" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446587" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:43 -0700 X-CSE-ConnectionGUID: FRk/BqiXTXy7VuyiR4AffA== X-CSE-MsgGUID: z25OjMQJRV2CRm0YrRpdpQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189282" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:41 -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 v4 16/19] drm/i915/psr: Check Early Transport for Panel Replay as well Date: Fri, 31 May 2024 12:49:50 +0300 Message-Id: <20240531094953.1797508-17-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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. v2:set crtc_state->enable_psr2_su_region_et directly (not in if block) 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 2bb25634b65d..81e29223c026 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1368,9 +1368,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, crtc_state->has_panel_replay)) - crtc_state->enable_psr2_su_region_et = true; - return true; } @@ -1435,6 +1432,9 @@ static bool intel_sel_update_config_valid(struct intel_dp *intel_dp, goto unsupported; } + crtc_state->enable_psr2_su_region_et = + psr2_su_region_et_valid(intel_dp, crtc_state->has_panel_replay); + return true; unsupported: From patchwork Fri May 31 09:49:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13681465 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 3042AC41513 for ; Fri, 31 May 2024 09:51:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E12910E628; Fri, 31 May 2024 09:51:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="E4WPD1xF"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2DA5710E5C1 for ; Fri, 31 May 2024 09:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149045; x=1748685045; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HK20Xf1Cco2A7EfjpIJrKRNBvgdJwkUhsAqNkW+ZCB4=; b=E4WPD1xFZL0E5cAPGSVN+wS0QXio/kURi6WV1Or074yEB3em43cnOUQT W6ud+X0bTdXKSCrgSq4SVOhN5wlk6kk7LXUfgXmDWa8nkgrUBjv6zy0vT Trs8nx6NvFx9cV83qZCY/HWRIFLIpNqI1caIvXxEF6FWXsFr+UK2bft+W b4n3x4iRKDYnCNEJkxguZ4im0ZVhoj7MGLu3tEdGQyq5zgeA0NztQ0r7a oLm644sVFXWwcVrXzm3FmY1cm5a2Sf23cAuo7x4CUlMvZiZVsHIIzVsPq K61ywx7hun7+tTMKIG7AC7wyRcgHYCk+VhMGe7VJcA4uELKbqUJrWYuMr g==; X-CSE-ConnectionGUID: b4TWgxkzT1SfXngfZcCbSA== X-CSE-MsgGUID: 7p8JAR32RKWtl6z6ru49Iw== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446588" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446588" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:45 -0700 X-CSE-ConnectionGUID: 9VA2qAB4SVKoHJ8ZgIQOvw== X-CSE-MsgGUID: OYKG8YDOQeK/ze8aQSLcVg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189289" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:43 -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 v4 17/19] drm/i915/psr: Modify dg2_activate_panel_replay to support eDP Date: Fri, 31 May 2024 12:49:51 +0300 Message-Id: <20240531094953.1797508-18-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 81e29223c026..0a5f0481c6ad 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -926,6 +926,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 Fri May 31 09:49:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13681464 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 29617C27C4F for ; Fri, 31 May 2024 09:51:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D06C10E5D8; Fri, 31 May 2024 09:51:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="LHdCWrzh"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id E9D2B10E4E3 for ; Fri, 31 May 2024 09:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149047; x=1748685047; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PU//Djvcolg6a6pKeYw6mowqF8UaKk3KZSRWN3mCjso=; b=LHdCWrzh/5Pn1QSNHFbo/bdLmexQntpOdnIEjAK+sDEXjIjP58t+Mzmb a6uzUnUlgnGBkRB1Wn5FqLnn9lbYrYtSWzsl/pYSPGX7dUlWW3gSXTTFy uO/Ta2bhVR0Kpo+PZbO2CBz41WLaIozQcYxJNoqu2Z+rh4waTOWAyXhRv FZbMm50eLktqjNQ9OuBkOGBBmiaZtnHoTYFDYglkmb2zWfh8Aa+ertYxZ YR2oV1tBwm4lxu7A3MyREbhdaidTKsqT+JqsF8MySXmDCDTTJo9ekvtgd 79Y1CPLPWCLiVBa1Qzz7DJfEFVbTQRiUBO/eaP03eUFsypAArNyKN61VR A==; X-CSE-ConnectionGUID: B36QUOCxRLWPdTiKlAgvXQ== X-CSE-MsgGUID: QrqYMJy5T6eX5dyzVVCmCw== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446590" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446590" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:47 -0700 X-CSE-ConnectionGUID: dhkQ4oIlRy++G0X8U90qjA== X-CSE-MsgGUID: aqy+1NrpR1aoX6C52QTfFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189309" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:45 -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 v4 18/19] drm/i915/psr: Add new debug bit to disable Panel Replay Date: Fri, 31 May 2024 12:49:52 +0300 Message-Id: <20240531094953.1797508-19-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 42400e1e9875..030ef84f5dd4 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1690,6 +1690,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 0a5f0481c6ad..885c75c55f9a 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1496,6 +1496,9 @@ _panel_replay_compute_config(struct intel_dp *intel_dp, if (!CAN_PANEL_REPLAY(intel_dp)) return false; + if (intel_dp->psr.debug & I915_PSR_DEBUG_PANEL_REPLAY_DISABLE) + return false; + if (!intel_dp_is_edp(intel_dp)) return true; @@ -2813,10 +2816,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; @@ -2827,6 +2832,9 @@ 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_SU_REGION_ET_DISABLE | + I915_PSR_DEBUG_PANEL_REPLAY_DISABLE); intel_dp->psr.debug = val; /* @@ -2838,7 +2846,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 Fri May 31 09:49:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13681467 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 83726C25B75 for ; Fri, 31 May 2024 09:51:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7011010E5F0; Fri, 31 May 2024 09:51:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="K8uBLqqw"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE5AE10E5C1 for ; Fri, 31 May 2024 09:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717149049; x=1748685049; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hhTbBnjts07Vpd1jWtpIVuhdDbUvTc38WxP5DVTPLaE=; b=K8uBLqqwmBxjt+6RgRyF37V4RKb9vZpl53aceuJF07EBFaWZiASJ9hMq ENkvfGpfye0Z4e9oqAn59W8FIRvyd95AOuB/7cf2YWA+aEfCRDz1uBCk4 2tKC/XsME8FDqcQfvUdsz6Mnx+wylcBjDgt7zGdnL75ppMGI/QYddBkwu /8RSgRaGR6vys8+SYUxDTATDZDk+BuA/BwEy9XMRiISb5rB68MWgF4GG6 1Ob5ofVeThge+17ZsKQsQk0MCyCZu0oXmrO/LuQJ7cNg419N70erd64CI GqYdd7VhqgzoSZLNz7Xn3UMGQsfZsGxHrnEAiXaljAmpvjQ7t0mYfi/D9 w==; X-CSE-ConnectionGUID: ycZKhQJQRY2Y+/0zkHoYqw== X-CSE-MsgGUID: yC4ARoN+R7mDbfetSUe07g== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13446592" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="13446592" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:49 -0700 X-CSE-ConnectionGUID: Tl6p7b3ZQ/iJwnoQUIwBVA== X-CSE-MsgGUID: OJwv36v+RiSQ9hIyZfVeVw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="41189320" Received: from romanove-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.36.204]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 02:50:47 -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 v4 19/19] Revert "drm/i915/psr: Disable early transport by default" Date: Fri, 31 May 2024 12:49:53 +0300 Message-Id: <20240531094953.1797508-20-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240531094953.1797508-1-jouni.hogander@intel.com> References: <20240531094953.1797508-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 885c75c55f9a..0f58553049a0 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3136,9 +3136,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 */