From patchwork Wed Jun 5 10:25:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13686560 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 D7D9FC27C53 for ; Wed, 5 Jun 2024 10:26:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A62910E28E; Wed, 5 Jun 2024 10:26:24 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="OGBbWsFV"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9020910E28E for ; Wed, 5 Jun 2024 10:26: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=1717583182; x=1749119182; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cX5PXA6T/yURajFNxP8QySP73wiY77HzDlSCRD6zWyk=; b=OGBbWsFVopISK1/wq0r8j39mrjcNm0CvRWayoEaVkCemfpjehqclDBq0 Lphpn4P4KcR+12h16j0yYj4sE1wPnbRw/bsOoQzE+apjhhS29+2m5h+WF urrWWLK51U/9G+fc4AgfoQm5hNNe3J7V83w1B/xxgSzuEhrtE11/mz5eP ngEUM/QYghZYlVhaS64Tr/N6nKDl59p49dTtTGx4JsHVw0XUeau311OY7 Y2alRlzyLWy9rtyWSRwm88IZ4yYAcmVBPo6C2xubG3bdcFPlUWvOBIIlz H7qDLqA+zKcUWikGEVRQBEhQ7kdw1HPhGoRU8wbqTPdcWag3OFnSUzFHI A==; X-CSE-ConnectionGUID: PgKrqg1EQTaTuP+jVHo/EA== X-CSE-MsgGUID: oOcejqyOS5mr8OJ3+uPpNg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136070" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136070" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:22 -0700 X-CSE-ConnectionGUID: vRgwAd0xTaKKIr9tom5osg== X-CSE-MsgGUID: 53gVUmrLSNaUF/AqVy7+Rw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686030" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:21 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v6 01/26] drm/i915/alpm: Do not use fast_wake_lines for aux less wake time Date: Wed, 5 Jun 2024 13:25:28 +0300 Message-Id: <20240605102553.187309-2-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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. v2:use less wake time in intel_alpm_lobf_compute_config Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna --- drivers/gpu/drm/i915/display/intel_alpm.c | 4 ++-- drivers/gpu/drm/i915/display/intel_display_types.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c index a26716c14aa3..52a573367976 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; @@ -298,7 +298,7 @@ void intel_alpm_lobf_compute_config(struct intel_dp *intel_dp, if (intel_alpm_aux_less_wake_supported(intel_dp)) waketime_in_lines = intel_dp->alpm_parameters.io_wake_lines; else - waketime_in_lines = intel_dp->alpm_parameters.fast_wake_lines; + waketime_in_lines = intel_dp->alpm_parameters.aux_less_wake_lines; crtc_state->has_lobf = (context_latency + guardband) > (first_sdp_position + waketime_in_lines); diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 77609656317b..df29ec37ef28 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1847,6 +1847,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 Wed Jun 5 10:25:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13686561 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 21A77C25B76 for ; Wed, 5 Jun 2024 10:26:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 465EB10E3D1; Wed, 5 Jun 2024 10:26:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="er3cIjWr"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 359B610E3D1 for ; Wed, 5 Jun 2024 10:26:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583184; x=1749119184; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2tDykYOUOMtxqLrJTaaxB9hWTpZ5mNkx942tRtajrhg=; b=er3cIjWrALd9FfLyuGLmi3hZ7AVxSYoJ9xBI8iMqW/vppf9m/MJYy/Cp xYnxZA6PYyr0oDRH+knkk7Brvt4x9ARdtcDnberBwEP+tcONYnMkZeNDE sNvbA922AIlwnOBwcq1oUd/fwxhxFGAhYuz+ZQbvjY2ECTHUCoaP6gQZ8 e2w80vpmThdoh82OTNydXdt/Yasd4H81Ja2RLjucsFAbWDc/7ztaUWNX7 S+GOoGr1hW4o7/FzyVUirgS8fhUSwpAJkrn0alD+H7AtdsqFTgu03U7DI pknW44/JVwYnPztQlK8d8tLRwLwWBqbuq/fAxOUMG1F2iNNaq9U+Cr3wl w==; X-CSE-ConnectionGUID: 6Hjc0sxHTRShVKHisx9DUA== X-CSE-MsgGUID: GtGA7f11QGalzfe9QWkmkg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136072" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136072" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:24 -0700 X-CSE-ConnectionGUID: FleUHjDrSRe0ByxBII/lRQ== X-CSE-MsgGUID: uT5ZSqhQTT6McE7qzEAwjA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686055" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:23 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v6 02/26] drm/i915/alpm: Write also AUX Less Wake lines into ALPM_CTL Date: Wed, 5 Jun 2024 13:25:29 +0300 Message-Id: <20240605102553.187309-3-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 Reviewed-by: Animesh Manna --- 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 52a573367976..18c1c5803670 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 Wed Jun 5 10:25:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13686562 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 C39A9C27C53 for ; Wed, 5 Jun 2024 10:26:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D2F010E5D8; Wed, 5 Jun 2024 10:26:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JMeOMH8M"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE1D810E3D8 for ; Wed, 5 Jun 2024 10:26: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=1717583186; x=1749119186; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WesjoU+OxefA4cC+hqMK6c4CkX3StrB/8PTQc8jOon4=; b=JMeOMH8M8l9qMrnItun2+gsjWN52L091IH+fe1qjcQE3cASdq5FdkfFE xZgnahS5ijfT4hgyV2sDze9EJhu6AU/OV11XajR+DJFGguGkb/oKyukt/ rZfJj5YJSXrObTAeMY/6IqKNKf9aSDCvpQCLS3t5gW8FlxOsXmjkp33I8 k9jdp1zOaEUo3HWW0gIjH/xn3zyy1160YzlRwik/o72uKvD7uM4HTvpC7 VjH4WTkVeNfm9+Vi4FF7AjXw9/PwpLCVKDZg3mFqJ7Wr6Ssv/Kau+4LI9 k8Q+aj2KYva21s0wV0r9p2UhWb2dwcovGoPlIBzq/P5G440eUQI1H1aeo Q==; X-CSE-ConnectionGUID: C+j7QR91QU6FDMo3RZhIAg== X-CSE-MsgGUID: FPKyYK+aRe2aUvploHsNSg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136084" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136084" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:25 -0700 X-CSE-ConnectionGUID: BKDcKYYpQfyO8Q5Gxtvg6Q== X-CSE-MsgGUID: bh323OYRRHuod4c6c3O/JA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686074" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26: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 v6 03/26] drm/i915/display: Take panel replay into account in vsc sdp unpacking Date: Wed, 5 Jun 2024 13:25:30 +0300 Message-Id: <20240605102553.187309-4-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 Reviewed-by: Animesh Manna --- 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 Wed Jun 5 10:25:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13686563 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 4458DC25B76 for ; Wed, 5 Jun 2024 10:26:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 603A910E3EB; Wed, 5 Jun 2024 10:26:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="eiLiRtTG"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B1A110E5F0 for ; Wed, 5 Jun 2024 10:26: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=1717583187; x=1749119187; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+ycKo+uhWdC/oOkm5ysJvhE83D0VSqgq/dw6i3KRMhU=; b=eiLiRtTGe4/0wSJZuE70ctheSltT+I5xTWZY+fCrGnyZjhqP3n4QsPZS lK/G8AQcTHhH2hTSqvaZDTfNQwM4Bs8VLtYxoSj/kKJ/fvn6F6ooWBQEa r9WzFegTVvqHC1gZEkOzCMnigs8RPkkQpfGcneqH0U05J41zeSuGNiBcu oEHvL8GXwNXVO9SbbNKPW9v2OR0y+EgfuN00cr8NxgcVR4GQX6mv8lCOI /2loJZ2UQniMayrtuQhYHdZA3S1z170xDEoF/S47Q8FwyOLDqvESUve81 TtTLDbuKIA7r++DkYJNJp7yoDssTFZegPsnBOw4wfG1rtzqrvPAqJCKbr A==; X-CSE-ConnectionGUID: pLeuCMqdSDS0QcUpt0D/7g== X-CSE-MsgGUID: Y/VLFAEnTw+cNugiTQhGDw== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136089" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136089" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:27 -0700 X-CSE-ConnectionGUID: tBbFnKNAQV6333bs5aU3uw== X-CSE-MsgGUID: MLUXsEuPSuCuUSY+5CAtiw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686091" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:26 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v6 04/26] drm/i915/display: Skip Panel Replay on pipe comparison if no active planes Date: Wed, 5 Jun 2024 13:25:31 +0300 Message-Id: <20240605102553.187309-5-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 Reviewed-by: Animesh Manna --- 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 7370acdd6b8b..2747dd01bb0a 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -5331,7 +5331,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 Wed Jun 5 10:25:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13686564 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 D3E1DC25B76 for ; Wed, 5 Jun 2024 10:26:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 96EB910E4C5; Wed, 5 Jun 2024 10:26:32 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="noo72EJl"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 21C8510E3D8 for ; Wed, 5 Jun 2024 10:26: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=1717583189; x=1749119189; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jFo7kpJXGfTqa8iWiqRY084+wTPdTmXYf1osizthiFQ=; b=noo72EJl6twiITVwneV9mUS0oQd4zIHgDgbJHHLmUmu7YNA+tq+k6sZv Fq2/FzkkGG0P0Yfhif/FNgn3akLO5oCxuJFftGakH9u9/lxoLohWSenlL xx94FbADe+d5mb5tc7nkMyYXZVTno2zsL1xyoZfsLmXehjc5h83X90oIe LZ+/JYkPfwY2X+EqNF/0WvFiMh6BQF6ehPgCF2+DWFvGiwuTeor1fBirk 5CpzXLXuJAXZr4Q00IF0rR/XBRDuF2fgiM82cf6MeeI5Zj2grDl7Npvet wpOkX5ds2pEDMutOSxB4f7ZE3K62fh5fUlIHLp+8+IpjHsqqtLYcNVFVp A==; X-CSE-ConnectionGUID: q2iKSj6jQfKcUKBQTN29QA== X-CSE-MsgGUID: aGBuzTvpTh6Wt8X07i51lA== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136093" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136093" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:29 -0700 X-CSE-ConnectionGUID: Yz2WqI5fQH2whOwMnWwDjg== X-CSE-MsgGUID: OSMi07UfTImEsgCwAfF7PA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686111" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26: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 v6 05/26] drm/display: Add missing Panel Replay Enable SU Region ET bit Date: Wed, 5 Jun 2024 13:25:32 +0300 Message-Id: <20240605102553.187309-6-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Add missing Panel Replay Enable SU Region ET bit defined in DP2.1 specification. Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna --- include/drm/display/drm_dp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index f246fa03a3cb..173548c6473a 100644 --- a/include/drm/display/drm_dp.h +++ b/include/drm/display/drm_dp.h @@ -743,6 +743,7 @@ # define DP_PANEL_REPLAY_RFB_STORAGE_ERROR_EN (1 << 4) # define DP_PANEL_REPLAY_ACTIVE_FRAME_CRC_ERROR_EN (1 << 5) # define DP_PANEL_REPLAY_SU_ENABLE (1 << 6) +# define DP_PANEL_REPLAY_ENABLE_SU_REGION_ET (1 << 7) /* DP 2.1 */ #define PANEL_REPLAY_CONFIG2 0x1b1 /* eDP 1.5 */ # define DP_PANEL_REPLAY_SINK_REFRESH_RATE_UNLOCK_GRANTED (1 << 0) From patchwork Wed Jun 5 10:25:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13686565 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 EE0E1C27C53 for ; Wed, 5 Jun 2024 10:26:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DBBAE10E4E3; Wed, 5 Jun 2024 10:26:32 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="BTExPdHP"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 23AF910E4C5 for ; Wed, 5 Jun 2024 10:26: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=1717583191; x=1749119191; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cprukN0XJD8K2JghPTB4a2pgpypwwD3KZaGNjWtc/J0=; b=BTExPdHPyD8QHLQYWooUQ74G+NrOCgqLjsaX1Qzw+q8bbyMQVIlBVX5S 6Fgd7azhvwsZ4C5tk5XcvUd1aWtH95nXmfsCUfiu5YD4ImMW6Wdb/+Mxp e9XAMej5BfBAJCCTA2iATICdTewwB96e8X+OuoyW42H+XcTdeQYsJEB+j OpP9frXqxReXBLCmqdPRuhWu9Yseia/ZSWVPgktsCuDRZxvGsyBPb97tR E/sRaNaqoLnjMsTS2xwl42CDZHkYrRaC+K9Y2kIn+6OgqGcjDkaQtojji iErJiOIBrT1IFsGk3IIZiqbGxfQwn+DcE5YoP1QBmkB+Tk51jlLwY4S1P w==; X-CSE-ConnectionGUID: nR4q6nieSIqubUm7dNjWkA== X-CSE-MsgGUID: VsAm2zx3TRiMDoCOODFdqw== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136095" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136095" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:30 -0700 X-CSE-ConnectionGUID: qALiBcENR4aa5NWVG888+w== X-CSE-MsgGUID: +LCaoFQpSUaYnIogE/CdTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686127" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26: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 v6 06/26] drm/i915/psr: Split enabling sink for PSR and Panel Replay Date: Wed, 5 Jun 2024 13:25:33 +0300 Message-Id: <20240605102553.187309-7-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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" Current intel_psr_enable_sink is a mess due to partly reusing PSR bit definitions for Panel Replay. Even thought PSR and Panel Replay enable registers do have common bits they still have also different bits and same bits with different meaning. For sake of clarity split enabling sink to PSR and Panel Replay specific parts. Also fix issue caused by using psr->panel_replay_enabled to early. Fixes: 88ae6c65ecdb ("drm/i915/psr: Unify panel replay enable/disable sink") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna --- drivers/gpu/drm/i915/display/intel_psr.c | 81 +++++++++++++----------- 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 4a4124a92a0d..3cc38ba2f954 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -686,56 +686,62 @@ static bool psr2_su_region_et_valid(struct intel_dp *intel_dp) return false; } -static unsigned int intel_psr_get_enable_sink_offset(struct intel_dp *intel_dp) +static void _panel_replay_enable_sink(struct intel_dp *intel_dp, + const struct intel_crtc_state *crtc_state) { - return intel_dp->psr.panel_replay_enabled ? - PANEL_REPLAY_CONFIG : DP_PSR_EN_CFG; + u8 val = DP_PANEL_REPLAY_ENABLE | + DP_PANEL_REPLAY_VSC_SDP_CRC_EN | + DP_PANEL_REPLAY_UNRECOVERABLE_ERROR_EN | + DP_PANEL_REPLAY_RFB_STORAGE_ERROR_EN | + DP_PANEL_REPLAY_ACTIVE_FRAME_CRC_ERROR_EN; + + if (crtc_state->has_sel_update) + val |= DP_PANEL_REPLAY_SU_ENABLE; + + if (crtc_state->enable_psr2_su_region_et) + val |= DP_PANEL_REPLAY_ENABLE_SU_REGION_ET; + + drm_dp_dpcd_writeb(&intel_dp->aux, PANEL_REPLAY_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. - */ -void intel_psr_enable_sink(struct intel_dp *intel_dp, - const struct intel_crtc_state *crtc_state) +static void _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; + struct drm_i915_private *i915 = dp_to_i915(intel_dp); + u8 val = DP_PSR_ENABLE; 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); - - if (crtc_state->enable_psr2_su_region_et) - dpcd_val |= DP_PSR_ENABLE_SU_REGION_ET; - } - - dpcd_val |= DP_PSR_ENABLE_PSR2 | DP_PSR_IRQ_HPD_WITH_CRC_ERRORS; + val |= DP_PSR_ENABLE_PSR2 | DP_PSR_IRQ_HPD_WITH_CRC_ERRORS; } else { if (intel_dp->psr.link_standby) - dpcd_val |= DP_PSR_MAIN_LINK_ACTIVE; + val |= DP_PSR_MAIN_LINK_ACTIVE; - if (!crtc_state->has_panel_replay && DISPLAY_VER(dev_priv) >= 8) - dpcd_val |= DP_PSR_CRC_VERIFICATION; + if (DISPLAY_VER(i915) >= 8) + val |= DP_PSR_CRC_VERIFICATION; } - if (crtc_state->has_panel_replay) - dpcd_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 (crtc_state->enable_psr2_su_region_et) + val |= DP_PANEL_REPLAY_ENABLE_SU_REGION_ET; if (intel_dp->psr.entry_setup_frames > 0) - dpcd_val |= DP_PSR_FRAME_CAPTURE; + val |= DP_PSR_FRAME_CAPTURE; - drm_dp_dpcd_writeb(&intel_dp->aux, - intel_psr_get_enable_sink_offset(intel_dp), - dpcd_val); + drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, val); +} + +void intel_psr_enable_sink(struct intel_dp *intel_dp, + const struct intel_crtc_state *crtc_state) +{ + /* Enable ALPM at sink for psr2 */ + if (!crtc_state->has_panel_replay && crtc_state->has_sel_update) + drm_dp_dpcd_writeb(&intel_dp->aux, + DP_RECEIVER_ALPM_CONFIG, + DP_ALPM_ENABLE | + DP_ALPM_LOCK_ERROR_IRQ_HPD_ENABLE); + + crtc_state->has_panel_replay ? + _panel_replay_enable_sink(intel_dp, crtc_state) : + _psr_enable_sink(intel_dp, crtc_state); if (intel_dp_is_edp(intel_dp)) drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER, DP_SET_POWER_D0); @@ -1920,7 +1926,8 @@ static void intel_psr_disable_locked(struct intel_dp *intel_dp) /* Disable PSR on Sink */ drm_dp_dpcd_writeb(&intel_dp->aux, - intel_psr_get_enable_sink_offset(intel_dp), 0); + intel_dp->psr.panel_replay_enabled ? + PANEL_REPLAY_CONFIG : DP_PSR_EN_CFG, 0); if (!intel_dp->psr.panel_replay_enabled && intel_dp->psr.sel_update_enabled) From patchwork Wed Jun 5 10:25:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13686566 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 54811C27C5E for ; Wed, 5 Jun 2024 10:26:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E8FA910E749; Wed, 5 Jun 2024 10:26:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="IV6XPHVg"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 46DB110E3D8 for ; Wed, 5 Jun 2024 10:26: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=1717583192; x=1749119192; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DLILt3vu71GnTq6TnlvRGvLelgQWDeFC7XE6xHbLukU=; b=IV6XPHVg5xMhTVn3VOLQOUloridG0F6e4Vly30lSwuA3gT24YfxjJN8I IA1AhuQsEWOuu3ub+zBgdbMJwpvDwn5xk71YyQr54rhtt+Q/KyF3YYhEC uux6TlS++XCDy3KRGRjghHTYKGBEBtCbmtduRzP/wvwZCZ/iKJm+vf/mj pmGyB7r11OpcNq4yNroOAwHCipZ4pOR6eTgOfQWoI80St1Vjtsr14G9+H kC8O1/wMoGb7KhwcmWMq/BRvShMkUf8N0YsxnVfYYeDXkTYEVj/9CIOeE v+tJmzBerDaKGka/22fb9Uq9XQK65VlM9fWlTX/BqOCnbgU9M0kY8qz0/ w==; X-CSE-ConnectionGUID: CnT/T+epQtSqOrEMg6RD6Q== X-CSE-MsgGUID: sedN9fGbSXyznJUoXVIDcQ== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136098" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136098" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:32 -0700 X-CSE-ConnectionGUID: SLuCDrlzRHyHbaY5O0+i1A== X-CSE-MsgGUID: a1tPiYPMTx+KuJIeNVc32w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686139" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26: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 v6 07/26] drm/i915/alpm: Make alpm support checks non-static Date: Wed, 5 Jun 2024 13:25:34 +0300 Message-Id: <20240605102553.187309-8-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 18c1c5803670..90072f6e3a33 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 Wed Jun 5 10:25: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: 13686567 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 CF579C25B76 for ; Wed, 5 Jun 2024 10:26:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 318ED10E5C1; Wed, 5 Jun 2024 10:26:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="jrdofU1N"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3A6DD10E738 for ; Wed, 5 Jun 2024 10:26: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=1717583194; x=1749119194; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=azDS0aujQ3wRVAgzaDxd9gpPpi6TJybPIWXPCn0AEJs=; b=jrdofU1Nkxu89yvBuyl2SpK5e8qO2Xq0q4q8MPoXN9rTColaFIIxisaY dHby7zLXQi9BAuIcs+w1AFuTazrxhH5aj3djmk0xXiImdQ/w4M4Fk+b4h Me3jcOIo5lNFKhKggB32vg1I8rvnYzv5ZtYA7cDBznHJyaB9xcWOqAm7j dj5OC4f+S2G8iTSneJrDwGKIcRYi1DKxWpQpSDLlpIMTkzvBZfMcvNvBw 7ktFlSO8A32dJCscL1A99EewzxDwTeANHBE7iSI8mkVQtBFSoMRgtd1yK f40gtlvaE8MeC0OTfcZHbaryKkcMI+oeC47Lt1JGpAxVEyilMx7yA/1IA Q==; X-CSE-ConnectionGUID: 6DY6o0TfQ/iJEGMjjPlPPw== X-CSE-MsgGUID: 6lg75vOxQpO+cfdEKxnJ7Q== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136110" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136110" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:33 -0700 X-CSE-ConnectionGUID: yQBlLOlsQzKD94mK0REXhg== X-CSE-MsgGUID: FFAIdenjTMyCcP71f2+JLQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686160" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:32 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v6 08/26] drm/i915/psr: Use intel_alpm_aux_wake_supported instead of local variable Date: Wed, 5 Jun 2024 13:25:35 +0300 Message-Id: <20240605102553.187309-9-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 3cc38ba2f954..a3ad4488fcee 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); @@ -600,7 +590,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 + @@ -613,7 +602,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 Wed Jun 5 10:25: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: 13686568 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 E989DC27C5E for ; Wed, 5 Jun 2024 10:26:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 74CE410E554; Wed, 5 Jun 2024 10:26:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="lF0pqlWK"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id ABEE910E5F5 for ; Wed, 5 Jun 2024 10:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583195; x=1749119195; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rbGqiEu1utm5PMfrsUZxoHOnlYXU2d9M3UJJAd6fs1E=; b=lF0pqlWKRnK1xMghlyKreAVyuF9oIxpPg1vfgEaqoL//hOEfYpHyPC5C 4KWoJI77YYUy54JK/SHTuPzDM8Ky9kQpkgaRUsb13GrwY8uKNvZmQHMIu 40bdF9YFGr2GC125TGyi8rXeQtDhaYklAHRCxZOEcPXQJ0ANONfmkrTLz yogCEuDHGUFTRH2gXDQ3BKYVvf8bcDSsNVYb6QdzUBHtncVaDXvthjYLA ihugQCm2wCtPrs/YBmQH0Yu+Lt3M6QCIevbWFTwtjgSHGsNNMw8npRFF3 /noQWmYmLp+G2UyEkooxrgVgK8BtRekgso1GxswAJSdXEp4KysQKE9o0/ A==; X-CSE-ConnectionGUID: yudpSWqfTOmDsNhWWNpdeA== X-CSE-MsgGUID: 7TjWfP6wT2iO4kiPvMrCuA== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136112" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136112" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:35 -0700 X-CSE-ConnectionGUID: iiyOLwDnTOms49MXVwdwng== X-CSE-MsgGUID: ovwcOno7TLavapk4q5S4cQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686171" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26: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 v6 09/26] drm/i915/psr: Add Panel Replay support to intel_psr2_config_et_valid Date: Wed, 5 Jun 2024 13:25:36 +0300 Message-Id: <20240605102553.187309-10-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 Reviewed-by: Animesh Manna --- drivers/gpu/drm/i915/display/intel_psr.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index a3ad4488fcee..7bdae0d0ea45 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -664,16 +664,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 void _panel_replay_enable_sink(struct intel_dp *intel_dp, @@ -1351,7 +1352,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 Wed Jun 5 10:25: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: 13686569 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 E0605C25B76 for ; Wed, 5 Jun 2024 10:26:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D2EFF10E6C8; Wed, 5 Jun 2024 10:26:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JrxGsQQI"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 46C2C10E554 for ; Wed, 5 Jun 2024 10:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583197; x=1749119197; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QG2CUZfWmj9PfbK64NMMiEBOLW/b43I6wuEXQpSOr+U=; b=JrxGsQQIFvI0Nqwh129vbnt7OyVcPey8Eb7TBoBF/NFkyRiXk9meE87X NGU6NyQbFd4qGbo/qoICVMo9XDAJlOjhkTNPkI18PFqipTT8T85a16upJ SFH9aPvwEDHhfS0P0EEa3mus+hU6PtlFAYZAJbSNslMhqKRCeFlIylx0b 2coDOjVsUc6iMTJ06Lg0rcOD1ShAADT56GGgFcGI9SpuLRiDlHOa/D0eC XJUrGBBlrthesZ2STefe+V88JdTHiExzR7Z1kBlSfSWIfSbOo9L3FxthB zPB/gTXELA7nrgz5i947TNMbAeK3rrYfreaa5JWlLn3XF4xWVYreEBD7H Q==; X-CSE-ConnectionGUID: +mrkZJo9QvqAGrmyLxoRIQ== X-CSE-MsgGUID: VGEP3ZKFQImRlAna8i8tvA== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136115" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136115" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:37 -0700 X-CSE-ConnectionGUID: QYvcXBflTK+dCBh+V4fpUw== X-CSE-MsgGUID: 024lm79tRCSDsoutTD0diQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686183" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26: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 v6 10/26] drm/i915/psr: Print Panel Replay status instead of frame lock status Date: Wed, 5 Jun 2024 13:25:37 +0300 Message-Id: <20240605102553.187309-11-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 Panel Replay status printout is printing frame lock status. It should print Panel Replay status instead. Panel Replay status register field follows PSR status register field. Use existing PSR code for that. Fixes: ef75c25e8fed ("drm/i915/panelreplay: Debugfs support for panel replay") Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna --- drivers/gpu/drm/i915/display/intel_psr.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 7bdae0d0ea45..3530e5f44096 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3579,16 +3579,9 @@ static int i915_psr_sink_status_show(struct seq_file *m, void *data) "reserved", "sink internal error", }; - static const char * const panel_replay_status[] = { - "Sink device frame is locked to the Source device", - "Sink device is coasting, using the VTotal target", - "Sink device is governing the frame rate (frame rate unlock is granted)", - "Sink device in the process of re-locking with the Source device", - }; const char *str; int ret; u8 status, error_status; - u32 idx; if (!(CAN_PSR(intel_dp) || CAN_PANEL_REPLAY(intel_dp))) { seq_puts(m, "PSR/Panel-Replay Unsupported\n"); @@ -3602,16 +3595,11 @@ static int i915_psr_sink_status_show(struct seq_file *m, void *data) if (ret) return ret; - str = "unknown"; - if (intel_dp->psr.panel_replay_enabled) { - idx = (status & DP_SINK_FRAME_LOCKED_MASK) >> DP_SINK_FRAME_LOCKED_SHIFT; - if (idx < ARRAY_SIZE(panel_replay_status)) - str = panel_replay_status[idx]; - } else if (intel_dp->psr.enabled) { - idx = status & DP_PSR_SINK_STATE_MASK; - if (idx < ARRAY_SIZE(sink_status)) - str = sink_status[idx]; - } + status &= DP_PSR_SINK_STATE_MASK; + if (status < ARRAY_SIZE(sink_status)) + str = sink_status[status]; + else + str = "unknown"; seq_printf(m, "Sink %s status: 0x%x [%s]\n", psr_mode_str(intel_dp), status, str); From patchwork Wed Jun 5 10:25: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: 13686578 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 EC101C25B76 for ; Wed, 5 Jun 2024 10:26:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8595010E5F0; Wed, 5 Jun 2024 10:26:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="k7jhXjhR"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id C33EC10E554 for ; Wed, 5 Jun 2024 10:26: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=1717583198; x=1749119198; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NKCHC2Fl18VDdR/ibKuKHdkqhOSn+CJgqXaZFs5g0S0=; b=k7jhXjhRjQFE7Zok21KAJ1fEDTbicUX+SFFKQ+E7xEHXZJ2ZuML+FdcY ayaEFV8LXV/KN2O5PQEemYbJ/j8gLR23aHX2Kgh+A+py+uHr047uC8NuT FJ2e+97+pY+fSQYElQJqMsIxSd8DjWsNInEUr62N7vVtT9bsE1SEgc8wx EowPaZ5cAdiRMjn9qZkJtpk19BMqCKXEkgLrlQsitPOaw8ppUVAIBF7oW u4Eh6PICaSMkJuvPNugu2XeD2DKmfdlwgDCIG6xvKSSYOxPJd+iCo37sJ VbvaZOoB4ls4i5P8pyAAff2dngO+XQTdr26pnKZ+uN0KPeAdOfkJPiG6a g==; X-CSE-ConnectionGUID: tKk2uvaqSneCVdGg+Sf10A== X-CSE-MsgGUID: jEuJeg+tToKSyEMrM9X2jQ== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136117" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136117" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:38 -0700 X-CSE-ConnectionGUID: Yb7hRnsqTxun8z0LxQVTZg== X-CSE-MsgGUID: Pub5DF42RimGxGSMjkss/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686202" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:37 -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 v6 11/26] drm/i915/psr: Move vblank length check to separate function Date: Wed, 5 Jun 2024 13:25:38 +0300 Message-Id: <20240605102553.187309-12-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 complexity to vblank length check. It makes sense to move it to separate function for sake of clarity. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 3530e5f44096..23c3fed1f983 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1243,6 +1243,20 @@ static int intel_psr_entry_setup_frames(struct intel_dp *intel_dp, return entry_setup_frames; } +static bool vblank_length_valid(struct intel_dp *intel_dp, + const struct intel_crtc_state *crtc_state) +{ + int vblank = crtc_state->hw.adjusted_mode.crtc_vblank_end - + crtc_state->hw.adjusted_mode.crtc_vblank_start; + int wake_lines = psr2_block_count_lines(intel_dp); + + /* Vblank >= PSR2_CTL Block Count Number maximum line count */ + if (vblank < wake_lines) + return false; + + return true; +} + static bool intel_psr2_config_valid(struct intel_dp *intel_dp, struct intel_crtc_state *crtc_state) { @@ -1333,9 +1347,7 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp, } /* 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)) { + if (!vblank_length_valid(intel_dp, crtc_state)) { drm_dbg_kms(&dev_priv->drm, "PSR2 not enabled, too short vblank time\n"); return false; From patchwork Wed Jun 5 10:25: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: 13686579 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 E87DAC25B76 for ; Wed, 5 Jun 2024 10:26:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4785E10E3D8; Wed, 5 Jun 2024 10:26:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="R9G4Frpf"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 67BF910E3D8 for ; Wed, 5 Jun 2024 10:26:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583200; x=1749119200; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+/CKhtos6P/n8COk0QZ4Dq0+UazEE99bZVZGtMhPTS4=; b=R9G4FrpfkKP52yMxPOySw0k1CoJKFDIjQJ85cjoJYcJ0SNkrA5mxyDi6 FGMkv3hH7hxmyYjWSgSefsFXBb0ocR+IZGuHb2n3NkB9ozgCBD64PqSkR CqUFux2LLCgR/JQDfsCVeTtuox9kyz4lCDajzvhNOyr1iAvOb6mVMKT8x ylBljR/HMP0Kn1U34csKh+QIXYINZshE2kFh1xg+fT4xtJ7GQKmqQXnIv uuJfCbTf1sgwNn4Qswc5jw6RQt2beQvhwKDn/3H3CkUcvRcoOAkKcENQx vEq8UpBdgw8XhMYtlS9JYL/r0I7GLBTdV9L1t1fsXhdAdrIfM4yoo3Noi g==; X-CSE-ConnectionGUID: uRZy1nqNTVmxJA+coq/AUg== X-CSE-MsgGUID: wxiElLckQ72U7pRxcF/43w== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136118" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136118" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:40 -0700 X-CSE-ConnectionGUID: f5RQrisMRtWIvL2By/eFSg== X-CSE-MsgGUID: IgQwbSsbTNyyPq0z7VBlqg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686209" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:39 -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 v6 12/26] drm/i915/psr: Take into account SU SDP scanline indication in vblank check Date: Wed, 5 Jun 2024 13:25:39 +0300 Message-Id: <20240605102553.187309-13-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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" SU SDP scanline indication should be taken into account when checking vblank length. In Bspec we have: PSR2_CTL[ SU SDP scanline indication ] = 0: (TRANS_VBLANK Vertical Blank End- TRANS_VBLANK Vertical Blank Start) > PSR2_CTL Block Count Number value in lines PSR2_CTL[ SU SDP scanline indication ] = 1: (TRANS_VBLANK Vertical Blank End- TRANS_VBLANK Vertical Blank Start- 1) > PSR2_CTL Block Count Number value in lines Bspec: 49274 Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna --- drivers/gpu/drm/i915/display/intel_psr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 23c3fed1f983..471b60032304 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1250,6 +1250,9 @@ static bool vblank_length_valid(struct intel_dp *intel_dp, crtc_state->hw.adjusted_mode.crtc_vblank_start; int wake_lines = psr2_block_count_lines(intel_dp); + if (crtc_state->req_psr2_sdp_prior_scanline) + vblank -= 1; + /* Vblank >= PSR2_CTL Block Count Number maximum line count */ if (vblank < wake_lines) return false; From patchwork Wed Jun 5 10:25: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: 13686580 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 51278C25B76 for ; Wed, 5 Jun 2024 10:26:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E3C1410E5F5; Wed, 5 Jun 2024 10:26:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="R8WC7dKX"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1BEFF10E719 for ; Wed, 5 Jun 2024 10:26:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583202; x=1749119202; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hEcKMlOmb7xTiDuD9eMC5s0Shb9U2e2nVNvoTszouHM=; b=R8WC7dKXWEcwtsOANhJa/TiyfQOyqtkZ1Pdqk+Mec7M2KPOkwjLkZ8Ua A1K9afr1NX3ugj/p6md1OS4NFw/zpoi1Fu6pbSE0lVOUOawqGmZn9DBtU d62D+H3j8+gtomHV5Ljj3u/II8yMtguYMbPi87hen5MgdYmZ21TL6C/Yo LF+AkLwyJ7jhAP4aZwSeg1eq+vpZsXGDbLygtnWXtxXCRJoolFNcipkCP APxqUuzP4zNNF6XZ0JYRReRRIYKvNCGXHHAtA/R4SBERWoJE3S/+98ByO Z2Ua91KumBRhaHuVtII/4szGj0pw+dIHCat/Rz3mIOoLmrMFYWy1JjC0/ g==; X-CSE-ConnectionGUID: eSEZOcyDRJGB/XP6d8BKKQ== X-CSE-MsgGUID: W8tE8JVCQfWCuuCKkyBfVQ== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136121" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136121" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:42 -0700 X-CSE-ConnectionGUID: gmilG4vSTeWJQGea/K0EWw== X-CSE-MsgGUID: iQEGMO1WS86Zh9P7jxi00Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686221" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26: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 v6 13/26] drm/i915/psr: Check vblank against IO buffer wake time on Lunarlake Date: Wed, 5 Jun 2024 13:25:40 +0300 Message-Id: <20240605102553.187309-14-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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" As Lunarlake doesn't have block count configuration vblank should be checked against IO buffer wake time. Bspec: 68920 Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna --- drivers/gpu/drm/i915/display/intel_psr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 471b60032304..c9fcb25184ee 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1246,9 +1246,13 @@ static int intel_psr_entry_setup_frames(struct intel_dp *intel_dp, static bool vblank_length_valid(struct intel_dp *intel_dp, const struct intel_crtc_state *crtc_state) { + struct drm_i915_private *i915 = dp_to_i915(intel_dp); int vblank = crtc_state->hw.adjusted_mode.crtc_vblank_end - crtc_state->hw.adjusted_mode.crtc_vblank_start; - int wake_lines = psr2_block_count_lines(intel_dp); + int wake_lines; + + wake_lines = DISPLAY_VER(i915) < 20 ? psr2_block_count_lines(intel_dp) : + intel_dp->alpm_parameters.io_wake_lines; if (crtc_state->req_psr2_sdp_prior_scanline) vblank -= 1; From patchwork Wed Jun 5 10:25: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: 13686581 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 2B645C27C5E for ; Wed, 5 Jun 2024 10:26:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0983A10E738; Wed, 5 Jun 2024 10:26:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ntryr2yx"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id B694F10E628 for ; Wed, 5 Jun 2024 10:26: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=1717583203; x=1749119203; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kMHvmwYnFPF2hPW6YAq6SfAyV2czFiJNVwxHTPSOjwg=; b=ntryr2yxPbCLYLNpg4LSIn0f9cmgDdacRYQTvrzTyk33UIOD4gGWeUfj fef2y048muDfdtkCoyPRjmzJu8B9mdUuunPfpfDMEnA0Omna4Nt06hV46 /btQiBOttwMubn0gXnQFQu75X657Uxhiej+z6h2YRfOQ7wK7ZirwhFyP/ Nagm+Q0ElZMA8rhj1G5gkD+6IeHNAMMONxeBuRdxPFhuMXPmWprZ2JV+q i88/0pY71eQksweXOAdadFnYQzJHdo8hsbQdO1pGSeQVvLxAmQcBL8BdN a4tjmdleuKEb4hcDyczldgXmbDKEh0xNVlt8j+DmBZPEb/VVeRt8eeoLx g==; X-CSE-ConnectionGUID: 1SJuaHBUT0aU7W+LTvCTxw== X-CSE-MsgGUID: BEGw6gXoSSyJg4L2RO1VEg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136124" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136124" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:43 -0700 X-CSE-ConnectionGUID: 4ZIuzhE9QIit623kQkwVAA== X-CSE-MsgGUID: bthwrPxlQfOzhsgj+5UPjA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686232" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:42 -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 v6 14/26] dmr/i915/psr: Wake time is aux less wake time for Panel Replay Date: Wed, 5 Jun 2024 13:25:41 +0300 Message-Id: <20240605102553.187309-15-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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" When checking vblank length used wake time is aux less wake time for eDP Panel Replay (vblank length is not checked for DP2.0 Panel Replay). Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna --- drivers/gpu/drm/i915/display/intel_psr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index c9fcb25184ee..ccb7c022e364 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1251,8 +1251,12 @@ static bool vblank_length_valid(struct intel_dp *intel_dp, crtc_state->hw.adjusted_mode.crtc_vblank_start; int wake_lines; - wake_lines = DISPLAY_VER(i915) < 20 ? psr2_block_count_lines(intel_dp) : - intel_dp->alpm_parameters.io_wake_lines; + if (crtc_state->has_panel_replay) + wake_lines = intel_dp->alpm_parameters.aux_less_wake_lines; + else + wake_lines = DISPLAY_VER(i915) < 20 ? + psr2_block_count_lines(intel_dp) : + intel_dp->alpm_parameters.io_wake_lines; if (crtc_state->req_psr2_sdp_prior_scanline) vblank -= 1; From patchwork Wed Jun 5 10:25: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: 13686582 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 DA63FC27C53 for ; Wed, 5 Jun 2024 10:26:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 15EAA10E690; Wed, 5 Jun 2024 10:26:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JqJhBGFt"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8969F10E628 for ; Wed, 5 Jun 2024 10:26: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=1717583205; x=1749119205; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Uzl4xVKRZlO4LvieRY88b4LtpRhTv3r6d3ldncFtJis=; b=JqJhBGFtJ2V+WNYBUqKsA+mPTW7llgATP5qXo3O11MsTLevwaYWbyFKI EIXZunQSS2GTfC6ufaKMdwBdJ8Qt/JKTBrpGchgrXQrYAPEbLvWrpZBTu t2oCNAZ3z1T3vApARJMrHmsjU/sSgroGJnup1ph+OOFP+KiCo5OBsekDk caBKTWYIbqfEXdULmz4JJx7CgVFhkazW/r9/Qd5VX7BWOyyg4ibGufzjr IbCftmzRc3EPqjaBdowGNSavi6zg7xsYVcgg+TQHTThavZzLSBVMlSOrt Yo9Tk/U0UL1tFog5WusVrv8bAZ/EImG3VkpExj5KodpzLQM+xGRZyLQPs A==; X-CSE-ConnectionGUID: QaaFoVa3QcyRyCUE+Dp6Ag== X-CSE-MsgGUID: ZmtyOVmeQOevjjlSzacRQg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136130" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136130" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:45 -0700 X-CSE-ConnectionGUID: qlMePZddS3az8S5ic4PNDw== X-CSE-MsgGUID: QAt0xMBbSQKgGck9XTAc0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686245" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:44 -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 v6 15/26] drm/i915/psr: Check panel ALPM capability for eDP Panel Replay Date: Wed, 5 Jun 2024 13:25:42 +0300 Message-Id: <20240605102553.187309-16-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 ccb7c022e364..839171635b97 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -551,6 +551,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 Wed Jun 5 10:25: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: 13686583 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 A2E25C25B76 for ; Wed, 5 Jun 2024 10:26:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 59BB610E739; Wed, 5 Jun 2024 10:26:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="bN696uj6"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1A7FE10E5F5 for ; Wed, 5 Jun 2024 10:26:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583207; x=1749119207; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0X5vpbowAkR5SKUSVyHB+HKWxJhXJ5W1X2XO+yscsT4=; b=bN696uj6GwE0+sWnx3px7J1NR6NOwDIcNIglIAwOe4HIs0beeal4pCeO 7ylSfSG6H4LJwBUp+8UvIgi0rWlLyG5Vm4V8aIY09E6zs9wWmjlxAlBOy AOBogzarg8IIJOorhCXimRb693Lz/EQWV7l/18Xroxv1qWh1GUP2B2lAX YbZnZwpDEgXN9BKCGs9LoHKj7bn8oxY+Fe9SWpHvsnLUNTs8j7qG3GxPB ESowJQg2fuciL9m8hdebNunBpVHnCwCQAj4TaXUj0l0p8KNIpDMBUj04f NB3IQ+49vA23FbubR/cd6HqSL1I7yZIS7TCYpVyc+dVCNR77hEzUsY2Jy w==; X-CSE-ConnectionGUID: 2T7jpzOAQzarlRPZ8rg7Gw== X-CSE-MsgGUID: zAyYMkUBSyODA+ED+hr3xg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136137" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136137" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:47 -0700 X-CSE-ConnectionGUID: zB8Zkk/vQPaxc46Hoa5Ouw== X-CSE-MsgGUID: 1mq6BtLwSau/tZr0oSa8Ag== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686258" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26: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 v6 16/26] drm/i915/psr: Inform Panel Replay source support on eDP as well Date: Wed, 5 Jun 2024 13:25:43 +0300 Message-Id: <20240605102553.187309-17-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 839171635b97..f13eb01966f5 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3078,9 +3078,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 Wed Jun 5 10:25: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: 13686584 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 91450C27C53 for ; Wed, 5 Jun 2024 10:26:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6683110E73D; Wed, 5 Jun 2024 10:26:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="YNiQ2wf9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id C18AB10E733 for ; Wed, 5 Jun 2024 10:26: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=1717583208; x=1749119208; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hBLp/O06tw1NBxSigVjQBV//pwzdmi1wpnnBPBGtXN8=; b=YNiQ2wf9TL/iTmyfTYPOmltn1OZv5lHm7F2hzf0mrDSFU1enIY3TpSwJ blVhLOsvdodKEi6yPlpoDRra0ZobFo3SKUR7twdBA/NOOcJ6gXJ0RqF5Q +wXAN9GEuuLLxOK4higJfBwoX6HmjgIfLsq0VbEInlq/hAD8XB5/mfw5/ nB5oylHkIJzt/tRSkX0SNJx/Fvwb5hsTWjkYbpoRa12nOxuq/v3SeiYn1 6Mg29vp/Uasfo4ympNzBbmurnr8FS0Sj3O6XqRCkZYIGUO73mHHJoCDMa quYhb6ceZQ2Bi9p/VBFTKYZWR2xfFc3ANxJKQc7ag6SwUt9uMIumm8TIE A==; X-CSE-ConnectionGUID: Cjf745IYTsqvNowiGILSmg== X-CSE-MsgGUID: 7xieJ8G7Q7Ke3ZMI+XFeXg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136143" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136143" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:48 -0700 X-CSE-ConnectionGUID: vQ7p8U7ZQEugYVh3Uknc1Q== X-CSE-MsgGUID: +nzS+q34RTCY7YYk18GM2A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686266" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26: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 v6 17/26] drm/i915/psr: enable sink for eDP1.5 Panel Replay Date: Wed, 5 Jun 2024 13:25:44 +0300 Message-Id: <20240605102553.187309-18-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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. v3: - set DP_PANEL_REPLAY_CRC_VERIFICATION in PANEL_REPLAY_CONFIG2 - PANEL_REPLAY_CONFIG2 is available in DP2.1 as well v2: do not configure ALPM for DP2.0 Panel Replay Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 36 ++++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index f13eb01966f5..171ea2a03ed6 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -692,6 +692,7 @@ static void _panel_replay_enable_sink(struct intel_dp *intel_dp, DP_PANEL_REPLAY_UNRECOVERABLE_ERROR_EN | DP_PANEL_REPLAY_RFB_STORAGE_ERROR_EN | DP_PANEL_REPLAY_ACTIVE_FRAME_CRC_ERROR_EN; + u8 panel_replay_config2 = DP_PANEL_REPLAY_CRC_VERIFICATION; if (crtc_state->has_sel_update) val |= DP_PANEL_REPLAY_SU_ENABLE; @@ -699,7 +700,14 @@ static void _panel_replay_enable_sink(struct intel_dp *intel_dp, if (crtc_state->enable_psr2_su_region_et) val |= DP_PANEL_REPLAY_ENABLE_SU_REGION_ET; + if (crtc_state->req_psr2_sdp_prior_scanline) + panel_replay_config2 |= + DP_PANEL_REPLAY_SU_REGION_SCANLINE_CAPTURE; + drm_dp_dpcd_writeb(&intel_dp->aux, PANEL_REPLAY_CONFIG, val); + + drm_dp_dpcd_writeb(&intel_dp->aux, PANEL_REPLAY_CONFIG2, + panel_replay_config2); } static void _psr_enable_sink(struct intel_dp *intel_dp, @@ -727,15 +735,31 @@ static void _psr_enable_sink(struct intel_dp *intel_dp, drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, val); } +static void intel_psr_enable_sink_alpm(struct intel_dp *intel_dp, + const struct intel_crtc_state *crtc_state) +{ + u8 val; + + /* + * eDP Panel Replay uses always ALPM + * PSR2 uses ALPM but PSR1 doesn't + */ + if (!intel_dp_is_edp(intel_dp) || (!crtc_state->has_panel_replay && + !crtc_state->has_sel_update)) + 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); +} + void intel_psr_enable_sink(struct intel_dp *intel_dp, const struct intel_crtc_state *crtc_state) { - /* Enable ALPM at sink for psr2 */ - if (!crtc_state->has_panel_replay && crtc_state->has_sel_update) - drm_dp_dpcd_writeb(&intel_dp->aux, - DP_RECEIVER_ALPM_CONFIG, - DP_ALPM_ENABLE | - DP_ALPM_LOCK_ERROR_IRQ_HPD_ENABLE); + intel_psr_enable_sink_alpm(intel_dp, crtc_state); crtc_state->has_panel_replay ? _panel_replay_enable_sink(intel_dp, crtc_state) : From patchwork Wed Jun 5 10:25: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: 13686585 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 B3C4CC27C53 for ; Wed, 5 Jun 2024 10:27:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9C3D10E754; Wed, 5 Jun 2024 10:26:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ZfuvQqTO"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7CAEB10E729 for ; Wed, 5 Jun 2024 10:26:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583210; x=1749119210; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MW/jkEPCuwK2pOG11BwGOwUCUEh3wwlmYU5psbYuXi4=; b=ZfuvQqTOh1jzNI4kL2xYFcyNybInWqKK0yK0o1PAFbzzBFaQ0AeGcqOx BdLlzQHP1a+tmm1tYpJiZpT6mYRRsYkTgkOHw0Yj+qmEhXNI7yxPzXaaM WNrVjENddnqQ4XtOVdRyaySeJS8IDUNVf4tR8TrrklmTp7D7Vo3xV6CBj oOVo4Gbio0hAZXM2uKhvJxNGx+Sx4J2/Cz/J+iDWOQFz3hPIE/oXZdhkO jK2tcFJqNpi5Eq7rVzOyFtB9RlClhLa+zx0Ba+hI+AKIzEJ5iVL+SKgbp vgL4cLo5GK3U4EeHWttnysa7SPBpu8lSGIGUMkMdspU1S1V6WDpp4gbyw A==; X-CSE-ConnectionGUID: bIT6WBPkSOOT9jFUjM8wsA== X-CSE-MsgGUID: cqjzUewZTKicfv9Eu0AMMA== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136148" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136148" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:50 -0700 X-CSE-ConnectionGUID: KrCUxqcrQAGPxluNtTurQA== X-CSE-MsgGUID: +2Af/aEMSTS1cQmz+e/G0w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686278" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:49 -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 v6 18/26] drm/i915/psr: Check panel Early Transport capability for eDP PR Date: Wed, 5 Jun 2024 13:25:45 +0300 Message-Id: <20240605102553.187309-19-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 171ea2a03ed6..bc8c822094e7 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 Wed Jun 5 10:25: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: 13686590 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 127B2C27C53 for ; Wed, 5 Jun 2024 10:27:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02E2210E75E; Wed, 5 Jun 2024 10:27:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Gu+V9jFn"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id A211510E74B for ; Wed, 5 Jun 2024 10:26:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583212; x=1749119212; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=W8Vo4JqUYzoBapM2TMjseyGtiN3Q4m3I2Z701z1SfTA=; b=Gu+V9jFnkh6960KjMsvapJQ5TWpfdhOLlreBvntiUSQSBPjz+YUTnInp hcyya839mbqXkVpZoVB3ms8lp/Rhykkr2oqErHPJbBi6WQndLHTD3mMFw LKYPOECaiBlf4MLQF7wTB1j4Mw2juXLG1AK03Ao1HdYtu31RGnh2uJeAF wqDWK2DHC1iO74GLTGaTUdhz9+DbqJKj1IYsURMxXO5zTn8mrMgOm8l2D +pQQpTGAY6JUyPLbB23AgzcF1Aa4ewb989vKBOYRUvTk2OUriLNkVWal3 CcUcVaonvsUPKjVNHarHyuAg/CnxGqiZ7Sux9xn8zTlQy3wcqM9cp9eLS Q==; X-CSE-ConnectionGUID: eaiPx5kSQleLzNAqrwQX2Q== X-CSE-MsgGUID: zIjr0k++Sr6q1b182+d2lw== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136152" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136152" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:51 -0700 X-CSE-ConnectionGUID: P3dXwZEsQv2gR21ECkfyOg== X-CSE-MsgGUID: RAKdC6P+QPilRIbA2iA92w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686288" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:50 -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 v6 19/26] drm/i915/psr: Perfrom psr2 checks related to ALPM for Panel Replay Date: Wed, 5 Jun 2024 13:25:46 +0300 Message-Id: <20240605102553.187309-20-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 v3: move vblank check as well v2: do not move Vblank >= PSR2_CTL Block Count Number maximum line count check Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 40 +++++++++++++----------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index bc8c822094e7..f8a8f98eb44e 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1383,25 +1383,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 (!vblank_length_valid(intel_dp, crtc_state)) { - 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, @@ -1440,6 +1421,27 @@ 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; + } + + if (!vblank_length_valid(intel_dp, crtc_state)) { + 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 Wed Jun 5 10:25: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: 13686586 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 ADD9BC25B76 for ; Wed, 5 Jun 2024 10:27:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A174610E733; Wed, 5 Jun 2024 10:27:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="kNB/2AiW"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id BAAB510E729 for ; Wed, 5 Jun 2024 10:26:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583214; x=1749119214; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=X0hG33rM5V/6zi4dyO/aACcTKffFcYrOAI1Eay41GRk=; b=kNB/2AiWWA2LSOHB1DA3eHZmXQmgfpjep1A2CAJxuauWQTDDu+S3jov0 1Nva1rKOJg61IZMGQAOTToNu6k7PytQvcYoiM4Z6xW/ZYlx6Uzycghyjn Xz+WmNY003Mnom7IaNSGpToz5a1d7F9kDvqWFs3Mvm59L1uEYvY8GKt+o oixHzvhh8tkdO8s2ns4/IaqwPf3Of1lqROVMDFffKdaUtBZSo/KLck9lx /hJA7Ej5DJL/JYfLBdP7m7sl1wBEOcXhutbpg5/Go4xU23RK7RfJfviDI i7PH1mWSNJFYMHDjT+CmgmrXOhWWINWNaTNLK6dSk9doYrKHJTf0i2LtE g==; X-CSE-ConnectionGUID: xoHXeBWDSR+bxEawtiSDdw== X-CSE-MsgGUID: LFELbkrfRCG9uWH1L/sWVg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136155" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136155" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:54 -0700 X-CSE-ConnectionGUID: hHi/0q1PSyGAjvR1vKsxcQ== X-CSE-MsgGUID: 7K+q1FG5RaOiNLVdpZWgaQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686299" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:52 -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 v6 20/26] drm/i915/psr: Add Panel Replay compute_config helper Date: Wed, 5 Jun 2024 13:25:47 +0300 Message-Id: <20240605102553.187309-21-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 f8a8f98eb44e..8c881a7cad3f 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1495,6 +1495,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) @@ -1530,8 +1538,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 Wed Jun 5 10:25: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: 13686591 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 EB072C25B76 for ; Wed, 5 Jun 2024 10:27:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D5C210E628; Wed, 5 Jun 2024 10:27:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="PnPvBc8o"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id B106A10E754 for ; Wed, 5 Jun 2024 10:26:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583216; x=1749119216; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jLT7G1J96p1wWwRuE44PE2JzhiT9GfvveIDq1uij+Z8=; b=PnPvBc8om3U0pMNoyempX6aoyZeC+LeoPF5zX4LJkW0b3RHvekODuU2m gC4W8xWC/DzSCbpREU39JIixfbMnKbp8NbjL0bjBN0GbgeDUGtoMJ4cAD qzZDhaufTRSx6duq5c3vu7zQ2TEg5Rpb4wWYLP13TOBqyn3T3gYphOYkq mvSNKRkJDA1iZeWkcuPHZo1IJZV3tZ+8htxbyeAWiKEwLXXohbIkn73gV Ctvd7eGA8SxzRfJsqePtuRL1jkK+m06ErCys7QCDOexX0s1ZvY8gbnOg7 Utujr7GabVRAohY58f431uBxG9HmFRKYQif2/jixW1Tjl93pEpwjs9MTU w==; X-CSE-ConnectionGUID: iG1eDEtERxuHUTuUxEVSQA== X-CSE-MsgGUID: v0Ru1/S9TkKB7njwcUUkiw== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136158" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136158" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:56 -0700 X-CSE-ConnectionGUID: xj4lcY4hTtKhjUuWM4ZQKg== X-CSE-MsgGUID: mJmvLTWBTLOxY71wTft8mg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686303" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:55 -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 v6 21/26] drm/i915/psr: 128b/132b Panel Replay is not supported on eDP Date: Wed, 5 Jun 2024 13:25:48 +0300 Message-Id: <20240605102553.187309-22-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 8c881a7cad3f..01bc5b76d398 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1495,11 +1495,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; } @@ -1538,7 +1549,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 Wed Jun 5 10:25: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: 13686588 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 83D7CC27C53 for ; Wed, 5 Jun 2024 10:27:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 23F6E10E729; Wed, 5 Jun 2024 10:27:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Nx0D6LFC"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id D609910E729 for ; Wed, 5 Jun 2024 10:26:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583218; x=1749119218; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rmiPsgHBcxzuUphFiEUjwo3hbHTrURSwlpbh/x++Qt4=; b=Nx0D6LFCNK/E5Vyc1/O5wpX17G94JN/wiyxjh+HQu9x/NTobjmoW5NcE WrmF6Bgr5IrGw3xOHfbGy3jmQm5Jo79+wbfl1ydtfpfXvRlTLXpeSdXky NYwqEOzoFL9r/V2ECg3DtWTGkENa52gon+RIcW8qxM2HV+huoYSVY+sdH tTXOuGPQh00NSCUAyELNoM4c/MVmTIojMGcegvtvuA/akyetpKEku+w7n rHHO30IgdzuwKR7zgOH+O5+UDJwznNCAcLC670cHPR9H0BKCVjGY4ebsT iWEp9gLtTX+WnaDzr/TiLiqxvw8u2oTC/Pzz84o2WjD+GMjfbsOM2iM0u Q==; X-CSE-ConnectionGUID: Zz3PKgcZRu+42ItLABg3NA== X-CSE-MsgGUID: Jho57NPfRXqjxrQPMWj0qQ== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136159" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136159" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:57 -0700 X-CSE-ConnectionGUID: ObAICDcvQfmbe1u7rzSwCg== X-CSE-MsgGUID: 0vb4xXznR+2XRHZ1aemiuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686311" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:56 -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 v6 22/26] drm/i915/psr: HW will not allow PR on eDP when HDCP enabled Date: Wed, 5 Jun 2024 13:25:49 +0300 Message-Id: <20240605102553.187309-23-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 01bc5b76d398..3aec56d005ef 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1497,8 +1497,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; @@ -1511,6 +1516,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; } @@ -1550,7 +1563,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 Wed Jun 5 10:25: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: 13686592 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 DEEA4C27C5E for ; Wed, 5 Jun 2024 10:27:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 58DCD10E752; Wed, 5 Jun 2024 10:27:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Kz/BNDgA"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 708C610E733 for ; Wed, 5 Jun 2024 10:26:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583219; x=1749119219; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QzbaYwNku9+IYGziluxOY2fTMxqcKTHwAR6eo3qXjlY=; b=Kz/BNDgA6/1t2kSfa8cPaiTE6Bg4l3DXMABW3GZH4DWsL7TI1djlokND 19ZfdzBBnChGX5jukAzb+AVNw+3Cj19+OYok4wZg3FymrX5lHhOa3iX40 BYeeF9uPy7haa6Z8IHRcnXXfcT1q1BJoT/sVUyyjA5+v3BJ0faCDRDEqp kYCR+xT4+A/krKVlmQgS0r8Qcu++pASdEF0ZfRRRDRI9wV0a4+VZvbYfd CGCuxH8i3hHIMVxqHvUMKKchXc3F2F13Lv80Vur1jFdckimGQh1do4oT3 Qf9330OmbsMBo3AH9JaO26+PxuzN1ZUjMZl+F0pBAQo8io8S6eI3fahrp g==; X-CSE-ConnectionGUID: YsQdMVqpQ0ascoH0LTuLYA== X-CSE-MsgGUID: OallDe6qT663gND5FbyhRw== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136164" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136164" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:59 -0700 X-CSE-ConnectionGUID: HqbmqeT9TNusEX+xmyACsA== X-CSE-MsgGUID: RcLutANORf+rgHLmlptoYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686317" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:58 -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 v6 23/26] drm/i915/psr: Check Early Transport for Panel Replay as well Date: Wed, 5 Jun 2024 13:25:50 +0300 Message-Id: <20240605102553.187309-24-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 3aec56d005ef..97d1e4ef6ca5 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1394,9 +1394,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; } @@ -1458,6 +1455,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 Wed Jun 5 10:25: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: 13686587 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 710D3C27C53 for ; Wed, 5 Jun 2024 10:27:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D7BB10E76A; Wed, 5 Jun 2024 10:27:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="k15UWg4C"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0866F10E412 for ; Wed, 5 Jun 2024 10:27:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583221; x=1749119221; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+Pzt17YDRqOMtSgJQEVh6XZJTtm6E+R8UuH+l2Uad9M=; b=k15UWg4CCHFqufBjEGuT+KOYQ2h7/yUgVAkkQNFxF9uKVS+5YXzaCYxL yNN1mPkTfpgrXjIWTkRPxUFt/em3onvScb25XnWKMnfrZVxMSDoIlrIoX TV8ghC1Q4hOpdnXT6oqlZbzSKBULTZFos68mcY0anUaxcoAgop+YuFQTs yH11VWB9ZgwxiKadKs0UTJ/MQf2p2Xjl5Z21fLQ8CqY9JQB413UxkBchk 6y0Cm+V5bVKB2hI9h4JuBTfRS+5Vuhs0/uiCXM7O/e5BxBvsT+ZOBPySe kRY8Mrmhbo1CfwGKxqyX5cTAdmvsGmpe0jN3xAUwRojUg5yRQHGESXL7E Q==; X-CSE-ConnectionGUID: ihS30axFT82C0jLpseTV2g== X-CSE-MsgGUID: M42wOpDJQmikxUD2VAKt1A== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136168" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136168" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:27:01 -0700 X-CSE-ConnectionGUID: x1Fm+607ROeW4eU8Oc1H0A== X-CSE-MsgGUID: f/nHX0SDR6C3nsnZDJyU6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686321" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:26:59 -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 v6 24/26] drm/i915/psr: Modify dg2_activate_panel_replay to support eDP Date: Wed, 5 Jun 2024 13:25:51 +0300 Message-Id: <20240605102553.187309-25-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 v2: use boolean instead of assuming eDP Panel Replay mean Early Transport Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 97d1e4ef6ca5..a10d9383cc87 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -927,6 +927,19 @@ 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 = psr->su_region_et_enabled ? + LNL_EDP_PSR2_SU_REGION_ET_ENABLE : 0; + + 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 Wed Jun 5 10:25: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: 13686593 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 DD28AC25B76 for ; Wed, 5 Jun 2024 10:27:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D06D10E74C; Wed, 5 Jun 2024 10:27:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="UWNevm63"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id A984E10E76D for ; Wed, 5 Jun 2024 10:27:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583222; x=1749119222; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Lk4cvOzHDfvvdnCD26C3lRMjQmo1PUicvjmkb0UZOok=; b=UWNevm63ynZtlESIxQrhD670NpKDp6y/jPwBsumOa6Q1fBvVOo8EVIAd t1fLZiQSD2xO/C1kHTi5mpKsaYLtt2rFNE03ECXbzMVlM/QLjh9WT0N9D RcNv4yHuLRvHdJi2lQXC2dH7EESZiqOHfM/jP/gdhwRmiroAXPtiPu/mn zi+kXd/8WJPDJMEfEvvHLGVjyLq5wVETd38jdrkzT6hb9KYCmZx4agm/G BKMscol89YunVHJKn7nGxCheMDGBmXKUMrO1zhbz2OqsFI6gL1tgxLm3m QnRQAwOoUArZpdogrHca7nFYLqnoO45mq/AdCTT/jxaaB2/zJ+FuCaSWr w==; X-CSE-ConnectionGUID: HA/wUhnWSN656jbnQF5kJg== X-CSE-MsgGUID: 5Dl5c3ClQoyos2BRgVdNKg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136169" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136169" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:27:02 -0700 X-CSE-ConnectionGUID: HLjjjAm9RNGbw1P0lG8dUQ== X-CSE-MsgGUID: ZE+O0uIiQD+s3DQ0KdnFYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686331" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:27:01 -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 v6 25/26] drm/i915/psr: Add new debug bit to disable Panel Replay Date: Wed, 5 Jun 2024 13:25:52 +0300 Message-Id: <20240605102553.187309-26-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index df29ec37ef28..089c53d5f3c9 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 a10d9383cc87..b4cd7a8b17bc 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1520,6 +1520,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; @@ -2845,11 +2848,13 @@ 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; - const u32 disable_bits = val & I915_PSR_DEBUG_SU_REGION_ET_DISABLE; + const u32 disable_bits = val & (I915_PSR_DEBUG_SU_REGION_ET_DISABLE | + I915_PSR_DEBUG_PANEL_REPLAY_DISABLE); u32 old_mode, old_disable_bits; int ret; if (val & ~(I915_PSR_DEBUG_IRQ | I915_PSR_DEBUG_SU_REGION_ET_DISABLE | + 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); @@ -2862,7 +2867,9 @@ int intel_psr_debug_set(struct intel_dp *intel_dp, u64 val) 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_SU_REGION_ET_DISABLE | + I915_PSR_DEBUG_PANEL_REPLAY_DISABLE); + intel_dp->psr.debug = val; /* From patchwork Wed Jun 5 10:25: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: 13686589 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 88284C41513 for ; Wed, 5 Jun 2024 10:27:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D71DA10E719; Wed, 5 Jun 2024 10:27:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Dua8SLzF"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 592AB10E719 for ; Wed, 5 Jun 2024 10:27:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717583224; x=1749119224; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=b90fgyFR5s3KD0ajF2iEbGbCu7z2gm71T4dbszjxJk0=; b=Dua8SLzFPPNId0qkowPzqze//C48u4gpG+6QeOwO6Wqxr39nUk5Y6Y5u XRMwxXLCJMpYCqseVkhFNB6k6sI/v2ngJ5e76Rpgn6PJKGmCRE4kyl/6l aYrPgwQOQPxXNPCtJY83t2+qAb9nqm0R4nLaB7tgp97uYq5UV/qOQyMvn ue99OGHX2tWX62H/MDOvztNWZnOn1jbcviprWYePvoeV+eLWxSOpKSFmz OYz+QTqX/VUhMfsokaG42rnYwK+6gOY1oMSaW18/VWKld1GLtzJeVXv9Z KSHPyQA7ygVZiBRMDAFdFGn+k5jeklx/Tfbhstv+N8nu0EziuclqJRSHI w==; X-CSE-ConnectionGUID: n92qaN5zQEaNXBssmEM7dg== X-CSE-MsgGUID: eDPUojGRTAisj1Na9nS/eg== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="14136170" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="14136170" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:27:04 -0700 X-CSE-ConnectionGUID: Az5xst2WTvehBp5saf8QxA== X-CSE-MsgGUID: zvKceSQbR2entRZR1ykcvg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="68686335" Received: from amokrov-mobl1.ccr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.37.49]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 03:27:03 -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 v6 26/26] Revert "drm/i915/psr: Disable early transport by default" Date: Wed, 5 Jun 2024 13:25:53 +0300 Message-Id: <20240605102553.187309-27-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605102553.187309-1-jouni.hogander@intel.com> References: <20240605102553.187309-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 b4cd7a8b17bc..36dedd8e9a9c 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3171,9 +3171,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 */