From patchwork Fri May 3 06:06:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13652439 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 7D07AC4345F for ; Fri, 3 May 2024 06:06:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 412C610F158; Fri, 3 May 2024 06:06:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="nbEimZ5V"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 92E0710F7AC for ; Fri, 3 May 2024 06:06:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714716397; x=1746252397; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1UPZE0KtDqj5e7Yg2hNQ4FWNpTO9fwYOGXBh4jW8QWY=; b=nbEimZ5VmMbTsOC9UKHxIBRWmx3QM2etrBZAuFGusfgq9MLNw3zcioKy hM2NjVRJt893ZAn3leVvSqMHXw1g6a0Kp1Fch1iASAH6/u0kgbvO6shD1 Qm+sjuTLikI3WlSMq+4cdLhixCOLPEehYp+/Y3KYgdarhad1ZeVnMvf3r 3Fl+zK2ZOLmNNTUee7jcECmoAvdJI9n35Dst7NZTor2AJFYhTbXy5Bm98 tEiF5vpIaLKuuHsVpqrtSuxDSidV83bx9/fHLc0/ym+n0ECDlhu1xwwzU 5tsDAE96yKuP/LIiTA9Gv90Ovksw42w7yWhB2Fbl3WKsB69wBlX1wHOPb w==; X-CSE-ConnectionGUID: hG11HTnSRRCucijE77sdHQ== X-CSE-MsgGUID: v0cSmcgXQzadhX0UJPFdzA== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10644606" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10644606" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 23:06:37 -0700 X-CSE-ConnectionGUID: jvj7ktjCQmu5bghvbK29+g== X-CSE-MsgGUID: EgAX7xTTRyKiqXqlAHpN1w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="27875575" Received: from azaki-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.32.146]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 23:06:36 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: =?utf-8?q?Jouni_H=C3=B6gander?= Subject: [PATCH 1/3] drm/i915/psr: LunarLake IO and Fast Wake time line count maximums are 63 Date: Fri, 3 May 2024 09:06:19 +0300 Message-Id: <20240503060621.987820-2-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240503060621.987820-1-jouni.hogander@intel.com> References: <20240503060621.987820-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" On LunarLake maximum for IO and Fast Wake times are 63. Take this into account in calculation and when writing the IO Wake lines. Bspec: 69885, 70294 Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index f5b33335a9ae..678987bbe168 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1364,8 +1364,9 @@ static bool _compute_alpm_params(struct intel_dp *intel_dp, fast_wake_time = precharge + preamble + phy_wake + tfw_exit_latency; - if (DISPLAY_VER(i915) >= 12) - /* TODO: Check how we can use ALPM_CTL fast wake extended field */ + if (DISPLAY_VER(i915) >= 20) + max_wake_lines = 63; + else if (DISPLAY_VER(i915) >= 12) max_wake_lines = 12; else max_wake_lines = 8; From patchwork Fri May 3 06:06:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13652440 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 2CCD4C25B10 for ; Fri, 3 May 2024 06:06:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B1BA10F7AC; Fri, 3 May 2024 06:06:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="M1tBrFCp"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id EF60310F158 for ; Fri, 3 May 2024 06:06: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=1714716398; x=1746252398; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=65uXdMb18ex9nwqH/aNuW6T5OH5ANub0vq2Qvxx4l0c=; b=M1tBrFCpl2JA1JDcTkZLx3Qe3touHOQsQBa3BO0NUtmR21YEK6SfB9C0 X+/2DmnZFdAvVKAbDd5CUPKKAtf5HpioloiOsUynFU3SY4Vkxj5yNU1Xi Umw0C6rXhtkR5i6mq1H2K0GX0aWQjd6hqrvTdJQIpeP+LBGDMiLcFyVMu pnQrWJukhQS/Nv30zjMpTJEdI6RcZ6RjF0sVqwhwjcecvLfGdG5nnInbX 0QFIRd8CkWtZzXAIB2Xcuqjbqw9XdQTY13I97jO0lmWvFQxLBvbYlkx4N 57AFdUWUB0jsgLj5I3Uf3ch+ZDIBuZ95VNp7OfWQ+6AseV1xwtwpnOZUr w==; X-CSE-ConnectionGUID: P0AoM/MTQziJV4248ii7hQ== X-CSE-MsgGUID: cpA+RSWWSfWyVPPS0Sg3qA== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10644607" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10644607" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 23:06:38 -0700 X-CSE-ConnectionGUID: tqhc0/UxSMCxHvaZP8Xzbw== X-CSE-MsgGUID: V/h4IHR6SFiflMax1gHRxA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="27875579" Received: from azaki-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.32.146]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 23:06:37 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: =?utf-8?q?Jouni_H=C3=B6gander?= Subject: [PATCH 2/3] drm/i915/psr: LunarLake PSR2_CTL[IO Wake Lines] is 6 bits wide Date: Fri, 3 May 2024 09:06:20 +0300 Message-Id: <20240503060621.987820-3-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240503060621.987820-1-jouni.hogander@intel.com> References: <20240503060621.987820-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" On LunarLake PSR2_CTL[IO Wake Lines] contains now bit 13:18. Take this into account when enabling PSR2_CTL. Bspec: 69885 Signed-off-by: Jouni Högander Reviewed-by: Uma Shankar --- drivers/gpu/drm/i915/display/intel_psr.c | 2 ++ drivers/gpu/drm/i915/display/intel_psr_regs.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 678987bbe168..4d67a384e149 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -900,6 +900,8 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp) tmp = map[psr->alpm_parameters.fast_wake_lines - TGL_EDP_PSR2_FAST_WAKE_MIN_LINES]; val |= TGL_EDP_PSR2_FAST_WAKE(tmp + TGL_EDP_PSR2_FAST_WAKE_MIN_LINES); + } else if (DISPLAY_VER(dev_priv) >= 20) { + val |= LNL_EDP_PSR2_IO_BUFFER_WAKE(psr->alpm_parameters.io_wake_lines); } else if (DISPLAY_VER(dev_priv) >= 12) { val |= TGL_EDP_PSR2_IO_BUFFER_WAKE(psr->alpm_parameters.io_wake_lines); val |= TGL_EDP_PSR2_FAST_WAKE(psr->alpm_parameters.fast_wake_lines); diff --git a/drivers/gpu/drm/i915/display/intel_psr_regs.h b/drivers/gpu/drm/i915/display/intel_psr_regs.h index ebc22999572c..68381bbf462e 100644 --- a/drivers/gpu/drm/i915/display/intel_psr_regs.h +++ b/drivers/gpu/drm/i915/display/intel_psr_regs.h @@ -172,6 +172,10 @@ #define TGL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES 5 #define TGL_EDP_PSR2_IO_BUFFER_WAKE(lines) REG_FIELD_PREP(TGL_EDP_PSR2_IO_BUFFER_WAKE_MASK, \ (lines) - TGL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES) +#define LNL_EDP_PSR2_IO_BUFFER_WAKE_MASK REG_GENMASK(18, 13) +#define LNL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES 5 +#define LNL_EDP_PSR2_IO_BUFFER_WAKE(lines) REG_FIELD_PREP(LNL_EDP_PSR2_IO_BUFFER_WAKE_MASK, \ + (lines) - LNL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES) #define EDP_PSR2_FAST_WAKE_MASK REG_GENMASK(12, 11) #define EDP_PSR2_FAST_WAKE_MAX_LINES 8 #define EDP_PSR2_FAST_WAKE(lines) REG_FIELD_PREP(EDP_PSR2_FAST_WAKE_MASK, \ From patchwork Fri May 3 06:06:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13652441 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 63070C4345F for ; Fri, 3 May 2024 06:06:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C586B1126A1; Fri, 3 May 2024 06:06:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="lczRPJEj"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 555691126A1 for ; Fri, 3 May 2024 06:06:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714716400; x=1746252400; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uShJXmf07tNQUCxbOabQtr4CY6xW5QPHCecHbSODqWY=; b=lczRPJEjBMPe2hJVE93ipY0TM06unLZCqqrkLS0F4ZqorxeOkJMvINjK hLuVhToUzSeHJIKTAucm6flhaCdmhXChejVbgEGEAHHnn0jEhLu09YHaA lvmsmzXjl+wuRrhaH1cBaElMBGbfdDoHY3SbWElWJTWHk+fgS35+qQQ47 12LwpOoH8HMKMxyhj+5DdfwEajwpJQ3HEdRBggOfMIBxeHHP/2RIep1nq zT4w76yDCOvvvb2H/lJ5XhPp9mWSD67G/VyjI7wUx1M+NqNxd5rlYinc6 6fAlt2ndUNcbLSeJC8yFqWsGZ+uoUQ41OsDhXFJe/wMsiRp7PBvb3mDpt w==; X-CSE-ConnectionGUID: bs4fW5LVTB+nUM2roiI/HQ== X-CSE-MsgGUID: d+htnTMzQrWZnkJuhlH7Vg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10644611" X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="10644611" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 23:06:40 -0700 X-CSE-ConnectionGUID: RBHs00knRIKbY46C9IeFZA== X-CSE-MsgGUID: LdukXLsTSviyBCcNUURmqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,247,1708416000"; d="scan'208";a="27875582" Received: from azaki-mobl.amr.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.249.32.146]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2024 23:06:39 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: =?utf-8?q?Jouni_H=C3=B6gander?= Subject: [PATCH 3/3] drm/i915/psr: PSR2_CTL[Block Count Number] no needed for LunarLake Date: Fri, 3 May 2024 09:06:21 +0300 Message-Id: <20240503060621.987820-4-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240503060621.987820-1-jouni.hogander@intel.com> References: <20240503060621.987820-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" PSR2_CTL[Block Count Number] is not used by LunarLake do not configure it. Bspec: 69885 Signed-off-by: Jouni Högander Reviewed-by: Uma Shankar --- drivers/gpu/drm/i915/display/intel_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 4d67a384e149..5ebfe4244d51 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -869,7 +869,7 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp) val |= intel_psr2_get_tp_time(intel_dp); - if (DISPLAY_VER(dev_priv) >= 12) { + if (DISPLAY_VER(dev_priv) >= 12 && DISPLAY_VER(dev_priv) < 20) { if (psr2_block_count(intel_dp) > 2) val |= TGL_EDP_PSR2_BLOCK_COUNT_NUM_3; else