From patchwork Wed Jun 19 06:21: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: 13703428 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 24C7EC27C53 for ; Wed, 19 Jun 2024 06:22:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CBFC10E85B; Wed, 19 Jun 2024 06:22:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="b8EzkQhH"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id C54E010E887 for ; Wed, 19 Jun 2024 06:22: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=1718778122; x=1750314122; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bH1TJFUxKDs9yyyenGk9WhH/U+YXH5ygcjrv70/IjS8=; b=b8EzkQhHhgOBsDzCdgAg+ZCiTg0O/ODgDpsT4307i87GjOHshp1wDrdN O9gvS1kG6pASz8CnczYp2kHLVtZdh9wWrDaUxaZi0E2WCofXm4rUjnjAs OOjSWQulgm9hfuCkFG26p1osRDy4NFHfbuESCVrzvD030RNkdq4UBvCtt mJqqP37YXr92dkhO4Eizqmay9xjshxbGn7tn5xACwZ35hh+eyNY+y+vbU AI8Ii6rscshYjtHjDbAYImOUi0hc129EzZZ9i+Ohp7enETETZDyDim4L3 iUEWzQ/sYFs4jxkQFXDz3ov1VUCqE+L4rfXnkWiQ1toqrA00gC/gMUvEi w==; X-CSE-ConnectionGUID: KqE/qLkJTn24KzLWa85O1Q== X-CSE-MsgGUID: djrbDZsvSN6cv6m0DyO8PA== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26377379" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="26377379" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:01 -0700 X-CSE-ConnectionGUID: v14Jd6vCTTqBxgJBD9jBCQ== X-CSE-MsgGUID: TBH1GIIYRBuRA1vDez6+Zw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="41905934" Received: from unknown (HELO jhogande-mobl1..) ([10.245.245.109]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:00 -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 v9 01/11] drm/i915/psr: Check panel ALPM capability for eDP Panel Replay Date: Wed, 19 Jun 2024 09:21:21 +0300 Message-Id: <20240619062131.4021196-2-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619062131.4021196-1-jouni.hogander@intel.com> References: <20240619062131.4021196-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 a9d9383e4ee5..20e6717a5215 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -571,6 +571,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 19 06:21:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13703430 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 DB0D4C27C53 for ; Wed, 19 Jun 2024 06:22:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3ED6410E887; Wed, 19 Jun 2024 06:22:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="UEOPS0rn"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D25C10E887 for ; Wed, 19 Jun 2024 06:22:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718778124; x=1750314124; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=la3ij45Pam6JcOTA+EmacFgtcA45M66WL8vcBLnywI8=; b=UEOPS0rn5K0QnDXc1AMS6+fwgEuFcHpuGVCkNiZ4iFMDyNCT+lKyHgzS Qj/TaZMbtsMpnfAc+5BbaG0HP1yJg6Wr/vHWbp2F3oRdEzGbpsyZyj05G CM9Dc/bMuVyWv0r1ehEANSr6UeCiOyjFcfnktdWUkFRyUbkkZk+V3tSgQ pfbj1O5do/f1vuVMe9k2EfNdVpyeML+NNy6L+Qc1Pj8gTWKg/p05PfnoI nF06GuGmlTrNc+9XM8M+u15xHyw0i57RLEgwSfwFGtvXUvLWhOp8PgnWQ JhJklVnvAKt3qFq9ulRTHQIMsVrzAcIV/D4s5bWLoUFZdhduWwlHPCOV3 g==; X-CSE-ConnectionGUID: dz4bLVEcTI+5WVYX9zcotQ== X-CSE-MsgGUID: xubrKxRMS3OFL3HBkojgwg== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26377381" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="26377381" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:03 -0700 X-CSE-ConnectionGUID: yBqW4DIVQq+aDaa4XWymfw== X-CSE-MsgGUID: TNOhu11ZSy6Q0LljrzMjTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="41905947" Received: from unknown (HELO jhogande-mobl1..) ([10.245.245.109]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22: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 v9 02/11] drm/i915/psr: Inform Panel Replay source support on eDP as well Date: Wed, 19 Jun 2024 09:21:22 +0300 Message-Id: <20240619062131.4021196-3-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619062131.4021196-1-jouni.hogander@intel.com> References: <20240619062131.4021196-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 20e6717a5215..277e8c484985 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3112,9 +3112,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; /* Set link_standby x link_off defaults */ From patchwork Wed Jun 19 06:21:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13703431 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 32EAAC27C79 for ; Wed, 19 Jun 2024 06:22:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01FED10E89A; Wed, 19 Jun 2024 06:22:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Qt3+ciL/"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id DDD4E10E887 for ; Wed, 19 Jun 2024 06:22: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=1718778125; x=1750314125; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uzFrTbeRdFwvQd2MRUi779sWqAsWpYb7JznVKwTWPKU=; b=Qt3+ciL/hPs3WdT7V3UbCJFmo97F8xiLvqtk5KcCudZ27pX6YezLB8+r OGwvp/I9jBls4qTmpjIem4xYs/krh28faJYp8LyvspJlDLFB/W2a8NdGP esWcLOcwfTCp5Dl+FiTxIXWWwK6GEuo0WXSVpmZaMy+1C3aAg6txcJ592 9916W8gM1iEmxVxWriu0AEMji8GA9ZuEm99h7GFbAU2tTeQ4NpOxviNJ+ JRjkkY7dkUkroFg+FbOSCGg2jqUZSw9dR/xGssY0K9LEIXDj34FutuUOD ir0mGAlmuk+QlDDUBuOtg7tux3HHXgSwu4c8sOnCcDWXFsNUWIj7IdJTh g==; X-CSE-ConnectionGUID: Tt02+FsvT+27a+rK/bdaYg== X-CSE-MsgGUID: gsfgfHg1RZaXJzTn0q32mw== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26377383" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="26377383" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:05 -0700 X-CSE-ConnectionGUID: vysULAu3Tw6KLlDgnvnb5Q== X-CSE-MsgGUID: cSxRZUedRMyB5N+rNEBpoA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="41905963" Received: from unknown (HELO jhogande-mobl1..) ([10.245.245.109]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22: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 v9 03/11] drm/i915/psr: enable sink for eDP1.5 Panel Replay Date: Wed, 19 Jun 2024 09:21:23 +0300 Message-Id: <20240619062131.4021196-4-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619062131.4021196-1-jouni.hogander@intel.com> References: <20240619062131.4021196-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 277e8c484985..a9bd7e379470 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -713,6 +713,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; @@ -720,7 +721,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, @@ -748,15 +756,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 19 06:21:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13703432 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 761E6C2BB85 for ; Wed, 19 Jun 2024 06:22:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 153A910E89D; Wed, 19 Jun 2024 06:22:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="BDl/9UpG"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 90D8E10E887 for ; Wed, 19 Jun 2024 06:22:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718778127; x=1750314127; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=psCLqssx13c57mwi7fK+66sD66lszRRl4nuuLtUQOdY=; b=BDl/9UpGbgKGRKJLRmCVPxVnzhUGd5mZjYGfCPRHqMbIiMA7rO3qoxhX CXLWhrm3pQAJobKqE97dHBhz43L+ZiQK+iVQ5TNSpBoUlAXMDTj3r/+KX WjPhES5wyeKveMA54eDpzTNfHyL27+ck3+ZlNTXhKHGtJuWMq+z+G5zP3 LbXDkjhwIsht1aG/INHbDu9ZLzTshAb1wVqzqVZL0v8Q0NFiveDocPSef UxjV0/r8aFWJbjrQaLgoYvxVyWMaj3UB+buiQTwlsgxZsnpQqMiWD3kJM UWCUwhfJ5wrQmyti461uPPVTmcgC90Qg+lt+yC4yZ8AAMvzhexZ+zsLIL w==; X-CSE-ConnectionGUID: 9lfi4yh2T2qEsJpf8HPjtw== X-CSE-MsgGUID: nvB/+zhXQqO4tsrizKF+bA== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26377384" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="26377384" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:06 -0700 X-CSE-ConnectionGUID: J4GuX7zBRJmSqyeTumnhag== X-CSE-MsgGUID: QDNXWaHVT+6QJOvrlJK3mg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="41905974" Received: from unknown (HELO jhogande-mobl1..) ([10.245.245.109]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:05 -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 v9 04/11] drm/i915/psr: Check panel Early Transport capability for eDP PR Date: Wed, 19 Jun 2024 09:21:24 +0300 Message-Id: <20240619062131.4021196-5-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619062131.4021196-1-jouni.hogander@intel.com> References: <20240619062131.4021196-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 a9bd7e379470..601b39204ef8 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -571,11 +571,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 19 06:21:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13703435 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 EA775C27C79 for ; Wed, 19 Jun 2024 06:22:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 681E210E8C2; Wed, 19 Jun 2024 06:22:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="LCw3r2Yh"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2471110E8A4 for ; Wed, 19 Jun 2024 06:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718778128; x=1750314128; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BTwR6GMCSi3GJR+XUi15/kT/kkusXmK3AOgO47ZEMKE=; b=LCw3r2YhLKrCC33jcqHadWnv8SMsC1tgjkGqTx6gF6WzYRojmjPxcHUf hb26VIcMgdG9g9MUd3qPQNwVvmr8NVkc6BM8MpJhhZGPrF0UCN3ELrHfx OW8U24mXN++oM7hAf7IyYIEdqACFjLauyXIWaRsXZjp5bkix2lM5a82hY TnbBBAfVp2SDVPsEEzByjgVS/gHojQr/gTxPzHQaLGdPIVKGdjz4xkAFq j6fygjLPJFCM+qW2DME1hRQBxWgSqihzEJb8yq/Vdz548HukNvWwNHEHo GQybjigeSnHBcv3a/aWmRfKzas5HIL+YM//r3WO4jnLX8WxAhr1jz2wuf Q==; X-CSE-ConnectionGUID: oiCRq6szTTSzdB/H06RxUg== X-CSE-MsgGUID: Y4XB629zTDC37afxHllhZA== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26377386" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="26377386" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:08 -0700 X-CSE-ConnectionGUID: vsNoLLLdTHupYmgONpXtHQ== X-CSE-MsgGUID: /0pODq6OSdakHXunBBmBVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="41905992" Received: from unknown (HELO jhogande-mobl1..) ([10.245.245.109]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:06 -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 v9 05/11] drm/i915/psr: 128b/132b Panel Replay is not supported on eDP Date: Wed, 19 Jun 2024 09:21:25 +0300 Message-Id: <20240619062131.4021196-6-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619062131.4021196-1-jouni.hogander@intel.com> References: <20240619062131.4021196-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 v2: - make crtc_state as const - add debug message to print out why Panel Replay is not possible Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 601b39204ef8..9ff54f08b6ab 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1514,7 +1514,10 @@ 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, + const struct drm_connector_state *conn_state) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); @@ -1526,6 +1529,18 @@ static bool _panel_replay_compute_config(struct intel_dp *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)) { + drm_dbg_kms(&i915->drm, + "Panel Replay is not supported with 128b/132b\n"); + return false; + } + return true; } @@ -1564,7 +1579,9 @@ 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, + conn_state); crtc_state->has_psr = crtc_state->has_panel_replay ? true : _psr_compute_config(intel_dp, crtc_state); From patchwork Wed Jun 19 06:21:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13703434 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 8376EC2BB85 for ; Wed, 19 Jun 2024 06:22:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A256310E8C5; Wed, 19 Jun 2024 06:22:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="NJV64WmE"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id BEBC510E8B2 for ; Wed, 19 Jun 2024 06:22:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718778130; x=1750314130; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=c0eZXsJ9mKE50SQ0XGbxe3oHC0ze8F39jOL7aJ86AOc=; b=NJV64WmEiy42MRMgGja4qpVaCzDXZEpH+sL8LoUdDk6M1aq+eDo/E8vv 1RVBCF1v+0j7yMkglhbcTAjnwxCH7X+rogxPLGK553n0OsVaH9lD/fYdV ssJhz42tEnwJIC3sUE5QmeH9NH31BQQfqOTce55stPUyQP6m4/pvualuh qnFjaEJdHadyYrLnUJCMDMcUWVHMbbuYGEN4o3Gr/eQ+Q8sjycVotPUB2 uZMVretEpAh52QoerH+8KkiGnjD/oCuFHLucN1Fyhd3jSOu2qUc1oAUsC GEdDW1cjnFT0GPGUIe6G7jQrh4QiAkyEZfNVb/iyOBOZfi22ouxDnBdFG A==; X-CSE-ConnectionGUID: qmnPy2pwS4O2xEqWgZ5Xxw== X-CSE-MsgGUID: DTg4tIMlR8m3pjISgVwPTg== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26377387" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="26377387" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:10 -0700 X-CSE-ConnectionGUID: +SJnbF8vRl+PSBUaBBWbig== X-CSE-MsgGUID: BW0IspdPQbWjcbPYM7jnNQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="41906000" Received: from unknown (HELO jhogande-mobl1..) ([10.245.245.109]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:08 -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 v9 06/11] drm/i915/psr: HW will not allow PR on eDP when HDCP enabled Date: Wed, 19 Jun 2024 09:21:26 +0300 Message-Id: <20240619062131.4021196-7-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619062131.4021196-1-jouni.hogander@intel.com> References: <20240619062131.4021196-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. v2: add debug message to print out why Panel Replay is not possible Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 9ff54f08b6ab..cd9755b7b550 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, const struct drm_connector_state *conn_state) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); + struct intel_connector *connector = + to_intel_connector(conn_state->connector); + struct intel_hdcp *hdcp = &connector->hdcp; if (!CAN_PANEL_REPLAY(intel_dp)) return false; @@ -1541,6 +1544,17 @@ _panel_replay_compute_config(struct intel_dp *intel_dp, 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)) { + drm_dbg_kms(&i915->drm, + "Panel Replay is not supported with HDCP\n"); + return false; + } + return true; } From patchwork Wed Jun 19 06:21:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13703433 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 8994FC27C53 for ; Wed, 19 Jun 2024 06:22:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CE9BE10E8A4; Wed, 19 Jun 2024 06:22:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="gjS4unfQ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7621A10E8A4 for ; Wed, 19 Jun 2024 06:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718778131; x=1750314131; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2zEBqKSlqtNXEqvES8K4yMOMeEsxr/OQg7rrwQh7ZWg=; b=gjS4unfQ76wLWU78uqHSg+GxB/vPOgH8E9M6qTZa1xUvSgvPIt/d7EnJ kndvwJUMvwn6FtsAvEfucCA1ZYxk9FNqbRVqr8mCtvAdeKULTlx/GjVH6 tAxeigD328pHzmVYyfEXN5a8Oh/vIBbcyYjcpsDHUpk9KCTfYcjeGM5Gw EQOCGGu3/XiiEgZbfScYeAJ1uLUTtbfKoy/7WRwPk16a5BsRK4Wk516Q2 QVKeWYJaM/G0AEfXEAov+uJBkpTzww5/7+OLX5kox465US85DlSKvk6UE cwfpk1kJct9Tjq+T+ssvNSizQtcmKtnlEzjHvhKjW/vXyqs2ERhZTgRQv Q==; X-CSE-ConnectionGUID: hVnchhAQQMu+Yjhejxgi1Q== X-CSE-MsgGUID: /943P8KDTpi7KN/KghE89w== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26377388" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="26377388" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:11 -0700 X-CSE-ConnectionGUID: IaIv//EiRGyuZMcPKrEjYQ== X-CSE-MsgGUID: wvunTHKVQrKXanNAZj2W/Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="41906009" Received: from unknown (HELO jhogande-mobl1..) ([10.245.245.109]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:10 -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 v9 07/11] drm/i915/alpm: Make crtc_state as const in intel_alpm_compute_params Date: Wed, 19 Jun 2024 09:21:27 +0300 Message-Id: <20240619062131.4021196-8-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619062131.4021196-1-jouni.hogander@intel.com> References: <20240619062131.4021196-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Intel_alpm_compute_params doesn't change crtc_state. Let's convert it as const. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_alpm.c | 9 +++++---- drivers/gpu/drm/i915/display/intel_alpm.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c index c7092af7da33..866b3b409c4d 100644 --- a/drivers/gpu/drm/i915/display/intel_alpm.c +++ b/drivers/gpu/drm/i915/display/intel_alpm.c @@ -135,8 +135,9 @@ static int _lnl_compute_aux_less_wake_time(int port_clock) t1 + tcds, 1000); } -static int _lnl_compute_aux_less_alpm_params(struct intel_dp *intel_dp, - struct intel_crtc_state *crtc_state) +static int +_lnl_compute_aux_less_alpm_params(struct intel_dp *intel_dp, + const struct intel_crtc_state *crtc_state) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); int aux_less_wake_time, aux_less_wake_lines, silence_period, @@ -168,7 +169,7 @@ static int _lnl_compute_aux_less_alpm_params(struct intel_dp *intel_dp, } static bool _lnl_compute_alpm_params(struct intel_dp *intel_dp, - struct intel_crtc_state *crtc_state) + const struct intel_crtc_state *crtc_state) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); int check_entry_lines; @@ -220,7 +221,7 @@ static int io_buffer_wake_time(const struct intel_crtc_state *crtc_state) } bool intel_alpm_compute_params(struct intel_dp *intel_dp, - struct intel_crtc_state *crtc_state) + const struct intel_crtc_state *crtc_state) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); int io_wake_lines, io_wake_time, fast_wake_lines, fast_wake_time; diff --git a/drivers/gpu/drm/i915/display/intel_alpm.h b/drivers/gpu/drm/i915/display/intel_alpm.h index d4fb60393c91..8c409b10dce6 100644 --- a/drivers/gpu/drm/i915/display/intel_alpm.h +++ b/drivers/gpu/drm/i915/display/intel_alpm.h @@ -15,7 +15,7 @@ struct intel_connector; void intel_alpm_init_dpcd(struct intel_dp *intel_dp); bool intel_alpm_compute_params(struct intel_dp *intel_dp, - struct intel_crtc_state *crtc_state); + const struct intel_crtc_state *crtc_state); void intel_alpm_lobf_compute_config(struct intel_dp *intel_dp, struct intel_crtc_state *crtc_state, struct drm_connector_state *conn_state); From patchwork Wed Jun 19 06:21: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: 13703438 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 DF1BAC27C53 for ; Wed, 19 Jun 2024 06:22:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D64E710E8EC; Wed, 19 Jun 2024 06:22:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="D2sGGKxm"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0658810E8B8 for ; Wed, 19 Jun 2024 06:22:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718778133; x=1750314133; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=L5fNonGOY3fzclpT8+RG67cCf4c+iaCqkfONgz8H5Yc=; b=D2sGGKxmldc8Q8ykBh9NhVYp72KrI8pD2VYQ1S6qIo9hVLkvudtJg9WL MNoOqoUHrzibuq8Wt+AM9JQ6DlJCfUmqN52ape//ESl7Q1WQizeuwZTr2 HUWHY/IY5/C3pzkL3dwkr0uvL0cMq1RUEaVyiltsoGPwW/F5sfBHaPAWD bCo/DJnIDsRH3QZljCYvCsn884mcwE0ZS4CQ0g0zZ6u/ID4me84JJd3u3 zScSvuNNQiKYvzH7tI1qbv9zOzW3Q4W/bcHiWJIU248NFQeIezU12a3fk LbjH/17Ptb0Y2Dko4A8I/TGg3AsxUfLO4zaZvw7/0nUpPogxyLM60Gw+2 A==; X-CSE-ConnectionGUID: mwhSFsuPRTmVsrnEQzuPTQ== X-CSE-MsgGUID: 3rz6lJrITU+WVNB5xXsXwQ== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26377389" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="26377389" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:13 -0700 X-CSE-ConnectionGUID: Kb5srHanSIyxyeVKt5vvRA== X-CSE-MsgGUID: JCGaMWauRxifgMCHqvtrVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="41906013" Received: from unknown (HELO jhogande-mobl1..) ([10.245.245.109]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:11 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v9 08/11] drm/i915/psr: Perform psr2 checks related to ALPM for Panel Replay Date: Wed, 19 Jun 2024 09:21:28 +0300 Message-Id: <20240619062131.4021196-9-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619062131.4021196-1-jouni.hogander@intel.com> References: <20240619062131.4021196-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 v5: - instead of using crtc_state->has_panel_replay provide aux_less flag v4: - do not move _compute_psr2_sdp_prior_scanline_indication - move ALPM related checks to separate function 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 | 41 ++++++++++++++++-------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index cd9755b7b550..ae1728d2a15c 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1303,14 +1303,15 @@ static int intel_psr_entry_setup_frames(struct intel_dp *intel_dp, } static bool wake_lines_fit_into_vblank(struct intel_dp *intel_dp, - const struct intel_crtc_state *crtc_state) + const struct intel_crtc_state *crtc_state, + bool aux_less) { 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; - if (crtc_state->has_panel_replay) + if (aux_less) wake_lines = intel_dp->alpm_parameters.aux_less_wake_lines; else wake_lines = DISPLAY_VER(i915) < 20 ? @@ -1327,6 +1328,27 @@ static bool wake_lines_fit_into_vblank(struct intel_dp *intel_dp, return true; } +static bool alpm_config_valid(struct intel_dp *intel_dp, + const struct intel_crtc_state *crtc_state, + bool aux_less) +{ + struct drm_i915_private *i915 = dp_to_i915(intel_dp); + + if (!intel_alpm_compute_params(intel_dp, crtc_state)) { + drm_dbg_kms(&i915->drm, + "PSR2/Panel Replay not enabled, Unable to use long enough wake times\n"); + return false; + } + + if (!wake_lines_fit_into_vblank(intel_dp, crtc_state, aux_less)) { + drm_dbg_kms(&i915->drm, + "PSR2/Panel Replay not enabled, too short vblank time\n"); + return false; + } + + return true; +} + static bool intel_psr2_config_valid(struct intel_dp *intel_dp, struct intel_crtc_state *crtc_state) { @@ -1410,18 +1432,8 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp, 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"); + if (!alpm_config_valid(intel_dp, crtc_state, false)) return false; - } - - /* Vblank >= PSR2_CTL Block Count Number maximum line count */ - if (!wake_lines_fit_into_vblank(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)) { @@ -1555,6 +1567,9 @@ _panel_replay_compute_config(struct intel_dp *intel_dp, return false; } + if (!alpm_config_valid(intel_dp, crtc_state, true)) + return false; + return true; } From patchwork Wed Jun 19 06:21: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: 13703437 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 25C83C2BB85 for ; Wed, 19 Jun 2024 06:22:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B69E610E8DD; Wed, 19 Jun 2024 06:22:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CcKlZtAn"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9F67B10E8C2 for ; Wed, 19 Jun 2024 06:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718778135; x=1750314135; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WeGtvwMkT5ecRTXH626RwPfYilBbHEx828PF5KdnZ18=; b=CcKlZtAnPHLvwN8IubWvY39EhbOCv3CSK/jWzPZpaegq14BS1lEBnKDL m0djqW37vJx7UENOG6pIn62JqX95mPokYAomB0per23h17lB7zthrnu0Q Pbnt3kbuVXE44rCFPnPEQolYycAs4W9BOt53wLtmJnakce3zkaf6yEonE l1tGj78Ed2i2Cd5ACb3jb/d7jfDpZjKmMwGSlqOJ4PDbThm0/5tsGRXZm Wdk7D1PiwNgs4ZSMEkK1HDvMangbRPF75/7YnzRsxnUPurh/ixIB/Kf4c VoPyQkUWRbzqWCjLrDUHeOpY2pMT+hvNo7xPzLKQur36Cm57LAaVevp37 w==; X-CSE-ConnectionGUID: 7lRQVMNCSceDU9LWHq8mOg== X-CSE-MsgGUID: c6Vfv04JQbK4Btc0pZBgVQ== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26377391" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="26377391" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:15 -0700 X-CSE-ConnectionGUID: taviQDQUQs2wparZdzvdCQ== X-CSE-MsgGUID: r3yN3+iqSRmVlxw3qm5p0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="41906018" Received: from unknown (HELO jhogande-mobl1..) ([10.245.245.109]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:13 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v9 09/11] drm/i915/psr: Perform scanline indication check for Panel Replay as well Date: Wed, 19 Jun 2024 09:21:29 +0300 Message-Id: <20240619062131.4021196-10-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619062131.4021196-1-jouni.hogander@intel.com> References: <20240619062131.4021196-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" Scanline indication needs to be checked and configure for both PSR2 and Panel Replay Selective Update. Move this check to intel_sel_update_config_valid. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index ae1728d2a15c..35425567005d 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1426,12 +1426,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 (!alpm_config_valid(intel_dp, crtc_state, false)) return false; @@ -1473,6 +1467,12 @@ 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 (!_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 (crtc_state->has_panel_replay && (DISPLAY_VER(dev_priv) < 14 || !intel_dp->psr.sink_panel_replay_su_support)) goto unsupported; From patchwork Wed Jun 19 06:21: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: 13703436 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 00CF7C41513 for ; Wed, 19 Jun 2024 06:22:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4ADA810E8B8; Wed, 19 Jun 2024 06:22:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="M7VReAdM"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4825110E8B8 for ; Wed, 19 Jun 2024 06:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718778136; x=1750314136; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UBEla/a80ECRpZccNJIPNfxFjXvViudMnzBw0QRb6L0=; b=M7VReAdMehBXgcPhw0lvMc53b4wUQI74DPyzdF1+hlT6WSNU/Xgosc48 F5J9RE5EKRo1TbXQHTGIxHbTPwPmXbRgQ1I+/fYdXMjRRW/0O4iyRx0qm zwL1F+djRffzW8l+1hUYYa68sytPy3WxH/PPA8K+4qiZE3f1AJZEg3q9B 0yhSgDhWX+E4v1elHa6ZRlgrNZsOqmFhvBQ8ANMwv5w2jis1YFVEgk5ms iJPuXfiGf3tiqItgU5owWWRtjU311ruZ8MeYhN6BmUGHsTeHzoUye2gmo XqWOyjyBFPn9N/9Hy1BQx4kYniEFIQPAi+N9fOOC413YulgbvLt+/RPLG g==; X-CSE-ConnectionGUID: weddnkASRqCazbPh9Wh6oQ== X-CSE-MsgGUID: 4G+WGFcFQCy0ZXiXbpsw+g== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26377397" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="26377397" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:16 -0700 X-CSE-ConnectionGUID: TsHHAcmHSBC+WxgNBdIAKQ== X-CSE-MsgGUID: gwsMv4zaT/m71Gn9YiAn+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="41906028" Received: from unknown (HELO jhogande-mobl1..) ([10.245.245.109]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:15 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, mika.kahola@intel.com, =?utf-8?q?Jouni_H=C3=B6g?= =?utf-8?q?ander?= Subject: [PATCH v9 10/11] drm/i915/psr: Check Early Transport for Panel Replay as well Date: Wed, 19 Jun 2024 09:21:30 +0300 Message-Id: <20240619062131.4021196-11-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619062131.4021196-1-jouni.hogander@intel.com> References: <20240619062131.4021196-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 35425567005d..03b90b06d64a 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -1440,9 +1440,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; } @@ -1489,6 +1486,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 19 06:21: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: 13703439 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 9E4EDC27C53 for ; Wed, 19 Jun 2024 06:22:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EA79D10E8F2; Wed, 19 Jun 2024 06:22:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="VlomscE/"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id E937510E8F2 for ; Wed, 19 Jun 2024 06:22:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718778138; x=1750314138; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KyxaereafQbcUdc8/tYSP2KG3XE8cuWnIJ6sYep95D8=; b=VlomscE/GwjDuHbML1pcOQm/meImWnnKKYx3eZswnFKGJ16cBXasm/Ua vaB2cOED0gE5QuDcaS+B/Xne/NiKjofNAY7Q5tSTnBTLF5Azj2cgumOki KaUINOLZ0oH2YiEqJiIcDz6KmCbWR4anP0/alGxqQPCxfPkBUdOG6O0zP XwWR1C4iN7jAvXIbr/R5V/EvmFG7gHngrgMYH+VXLAU3Yl7TEMYd6ANN4 eJO7dKTPqf6PKy9H1yaK2HrelGSC6DBKmWj4jne2thOP+V7+h9y5njrfJ RJmijEBgGN7ra3jI1mVBlZjm6lXg0UrP9s5GNbWsk/nrcrnVc51sCBD9s w==; X-CSE-ConnectionGUID: i3o8cM78Tgez+/TUkmeDnw== X-CSE-MsgGUID: uwPdTk58TkyK8bkJ91O4Zg== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26377402" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="26377402" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:18 -0700 X-CSE-ConnectionGUID: img8rsyvR86QeUElY0UxrA== X-CSE-MsgGUID: r/AkKIwpTs6RfDcDEsZciA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="41906035" Received: from unknown (HELO jhogande-mobl1..) ([10.245.245.109]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 23:22:16 -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 v9 11/11] drm/i915/psr: Modify dg2_activate_panel_replay to support eDP Date: Wed, 19 Jun 2024 09:21:31 +0300 Message-Id: <20240619062131.4021196-12-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619062131.4021196-1-jouni.hogander@intel.com> References: <20240619062131.4021196-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 03b90b06d64a..3df6d2ee3cd8 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -948,6 +948,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),