From patchwork Wed Sep 4 10:18: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: 13790332 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 518CCCD4847 for ; Wed, 4 Sep 2024 10:18:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E36E210E4F9; Wed, 4 Sep 2024 10:18:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JP0t7HNT"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4724510E1DC for ; Wed, 4 Sep 2024 10:18: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=1725445131; x=1756981131; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TXiSQWGJPkCj6NOguhDDkKeC2E7yqoNkdLoGHUSdugU=; b=JP0t7HNT5rKswPAP1PrgrCL463Zq2vUU9hvPosSLWDSe+aYVfOaAryOa vKmPG2oYR78TaKE4ot/uR9IT7ca1IUCn1qknHZf+WnkHQ28pWbBbQy8/t kOC/kInJBnkiTY+mn8Cnd/3gEb+C+l+psdNaOgrqmckhipF+IJgxoj9gQ Ls8CsMAlaXJNDtYfkqVLtVcSZNAWb/k0H2I3p/OzYqzphcOzTn/kVmnHV 3o1N+iAi0Io9XEWRbgEbT3FUfTXW8D26EZz/wg0C9OurN0ulhXGnblWQI R2roDREoIUmyzFm/s2HyHUZSngB9j/Wj914nALbOzkIvQzxtWXL5zElio g==; X-CSE-ConnectionGUID: xi3m5PvFSCWr+G+dkN48BA== X-CSE-MsgGUID: i8KVNpRJRkq6sOuCxJHuew== X-IronPort-AV: E=McAfee;i="6700,10204,11184"; a="27982982" X-IronPort-AV: E=Sophos;i="6.10,201,1719903600"; d="scan'208";a="27982982" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 03:18:51 -0700 X-CSE-ConnectionGUID: RvdOXNFBR1mgy6BwuqlLfw== X-CSE-MsgGUID: vZd1Nr7NSaWX0c/RPNY4SA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,201,1719903600"; d="scan'208";a="69857806" Received: from dhhellew-desk2.ger.corp.intel.com.ger.corp.intel.com (HELO jhogande-mobl1..) ([10.245.245.79]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 03:18:50 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: imre.deak@intel.com, animesh.manna@intel.com, =?utf-8?q?Jouni_H=C3=B6gan?= =?utf-8?q?der?= Subject: [PATCH 1/3] drm/i915/display: Handle MST connector in intel_attached_dp Date: Wed, 4 Sep 2024 13:18:32 +0300 Message-Id: <20240904101834.2415385-2-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240904101834.2415385-1-jouni.hogander@intel.com> References: <20240904101834.2415385-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" Connector->encoder might be null for MST connector. Take this into account in intel_attached_dp. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_display_types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 868ff8976ed93..6327caa1054f2 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -2046,7 +2046,10 @@ static inline struct intel_dp *enc_to_intel_dp(struct intel_encoder *encoder) static inline struct intel_dp *intel_attached_dp(struct intel_connector *connector) { - return enc_to_intel_dp(intel_attached_encoder(connector)); + if (connector->mst_port) + return connector->mst_port; + else + return enc_to_intel_dp(intel_attached_encoder(connector)); } static inline bool intel_encoder_is_dp(struct intel_encoder *encoder) From patchwork Wed Sep 4 10:18: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: 13790333 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 B515DCD3431 for ; Wed, 4 Sep 2024 10:18:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3FF2010E1E0; Wed, 4 Sep 2024 10:18:54 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="MUyDXSU5"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id DB87210E1E0 for ; Wed, 4 Sep 2024 10:18:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725445133; x=1756981133; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Wxdf4HRsAaOmgMYvSqp4h+rVXJLZ0LF4qXByUW3LZgI=; b=MUyDXSU5Ky9cVJhAgcQs1N0eF+p0/v8hvHiHc2gDdipqaOTptcB1sjTI 0+8ATHWwM31CtZF5oYCGc5TuUBp4saSYx8U1JKtrQFu4bmZNDzWRhkmNF GwBEbQ/2mUvn5IoQlsA5zJWp0Mg5ziC/Ha/4ZQlSvKrA8OIWaFqo26r/X Bggg4PwbA68HEIYZLgmljcc3m90jsGNwvDDTzDxgixqoMozWEGU1cTQOB 8JKJ8EAMbLJXEPN9lL0xvpMJsPB27h+Q8t04hlXHM8p0vUBDQPQ7/P05V Cx9ytVKM2XF+pGNHfXUnoo2X7EbUpXd+Vnk1kWK+yMzo7eAHs3aPfPZpC w==; X-CSE-ConnectionGUID: QHz41P5XR42VeBH5jLe6Ow== X-CSE-MsgGUID: iMpQVGmjT9m3Wrl/YOE55g== X-IronPort-AV: E=McAfee;i="6700,10204,11184"; a="27982984" X-IronPort-AV: E=Sophos;i="6.10,201,1719903600"; d="scan'208";a="27982984" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 03:18:53 -0700 X-CSE-ConnectionGUID: wCzkBtTPRnyUQ4y4nnEfUQ== X-CSE-MsgGUID: w32XlRQtT3yC01JbpON66g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,201,1719903600"; d="scan'208";a="69857810" Received: from dhhellew-desk2.ger.corp.intel.com.ger.corp.intel.com (HELO jhogande-mobl1..) ([10.245.245.79]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 03:18:51 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: imre.deak@intel.com, animesh.manna@intel.com, =?utf-8?q?Jouni_H=C3=B6gan?= =?utf-8?q?der?= Subject: [PATCH 2/3] drm/i915/psr: Add connector debugfs files for MST connector as well Date: Wed, 4 Sep 2024 13:18:33 +0300 Message-Id: <20240904101834.2415385-3-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240904101834.2415385-1-jouni.hogander@intel.com> References: <20240904101834.2415385-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" Connector debugfs files are currently not add for MST connector. We can now add them as we have taken into account possibility to have NULL in connector->encoder in intel_attached_dp. Signed-off-by: Jouni Högander Reviewed-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_psr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 257526362b39a..26af8bea05d32 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3799,9 +3799,8 @@ void intel_psr_connector_debugfs_add(struct intel_connector *connector) struct dentry *root = connector->base.debugfs_entry; /* TODO: Add support for MST connectors as well. */ - if ((connector->base.connector_type != DRM_MODE_CONNECTOR_eDP && - connector->base.connector_type != DRM_MODE_CONNECTOR_DisplayPort) || - connector->mst_port) + if (connector->base.connector_type != DRM_MODE_CONNECTOR_eDP && + connector->base.connector_type != DRM_MODE_CONNECTOR_DisplayPort) return; debugfs_create_file("i915_psr_sink_status", 0444, root, From patchwork Wed Sep 4 10:18: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: 13790334 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 82896CD4847 for ; Wed, 4 Sep 2024 10:18:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 192C510E716; Wed, 4 Sep 2024 10:18:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="C8WykYNp"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7334810E716 for ; Wed, 4 Sep 2024 10:18: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=1725445134; x=1756981134; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7h/der6GCNBEDWfDcwIANYb8QdW6ZtSTH4vSqVFaq2E=; b=C8WykYNpQu9CRvRsnKqFvJKUK6CUhy33hE9LMKm9Skovn4GWQo7TZeoh 7cNpk+gNEeR4bAaSCanGFkOwSqsgC8nopwRzmSYhVmAO6lU8FStEEucUX +xxzOQMG1/CpGzQUV9/F8FxgYtAm8Larb6TcGUJVp3oBWJYHG4b8Zc4Vn zNArRMcr+fccvYYeaU+M6JsM82bvCi6/lW3SfmtbKBKFQLJoG0FlxsK+a T4h7Le/LXhKbhAwNEXzpQqBABYeOdsJJ7os+js6Rqa6joPqgT19DLi+H+ OU8rPXS5Lu3UWd39xK2kNn5VQx1Z2SPwm+EvUE0wLTiIO/tfaWIh34RbF g==; X-CSE-ConnectionGUID: 8IWi3LRrTL2HmiLZD5j4lA== X-CSE-MsgGUID: rBwxxJAVSnKV8RBnfU2xXA== X-IronPort-AV: E=McAfee;i="6700,10204,11184"; a="27982987" X-IronPort-AV: E=Sophos;i="6.10,201,1719903600"; d="scan'208";a="27982987" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 03:18:54 -0700 X-CSE-ConnectionGUID: vNtHTLJYSCuE1k5XgrVwuA== X-CSE-MsgGUID: SC71cB4tTQe33Bt4tsTuuQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,201,1719903600"; d="scan'208";a="69857818" Received: from dhhellew-desk2.ger.corp.intel.com.ger.corp.intel.com (HELO jhogande-mobl1..) ([10.245.245.79]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2024 03:18:53 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: imre.deak@intel.com, animesh.manna@intel.com, =?utf-8?q?Jouni_H=C3=B6gan?= =?utf-8?q?der?= Subject: [PATCH 3/3] drm/i915/psr: Do not wait for PSR being idle on on Panel Replay Date: Wed, 4 Sep 2024 13:18:34 +0300 Message-Id: <20240904101834.2415385-4-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240904101834.2415385-1-jouni.hogander@intel.com> References: <20240904101834.2415385-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 do not have ALPM on DP Panel Replay. Due to this SRD_STATUS[SRD State] doesn't change from SRDENT_ON after Panel Replay is enabled until it gets disabled. On eDP Panel Replay DEEP_SLEEP is not reached. _psr2_ready_for_pipe_update_locked is waiting DEEP_SLEEP bit getting reset. Take these into account in Panel Replay code by not waiting PSR getting idle after enabling VBI. Fixes: 29fb595d4875 ("drm/i915/psr: Panel replay uses SRD_STATUS to track it's status") Cc: Animesh Manna Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 26af8bea05d32..5f669654ca427 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -2752,13 +2752,6 @@ static int _psr1_ready_for_pipe_update_locked(struct intel_dp *intel_dp) EDP_PSR_STATUS_STATE_MASK, 50); } -static int _panel_replay_ready_for_pipe_update_locked(struct intel_dp *intel_dp) -{ - return intel_dp_is_edp(intel_dp) ? - _psr2_ready_for_pipe_update_locked(intel_dp) : - _psr1_ready_for_pipe_update_locked(intel_dp); -} - /** * intel_psr_wait_for_idle_locked - wait for PSR be ready for a pipe update * @new_crtc_state: new CRTC state @@ -2781,12 +2774,10 @@ void intel_psr_wait_for_idle_locked(const struct intel_crtc_state *new_crtc_stat lockdep_assert_held(&intel_dp->psr.lock); - if (!intel_dp->psr.enabled) + if (!intel_dp->psr.enabled || intel_dp->psr.panel_replay_enabled) continue; - if (intel_dp->psr.panel_replay_enabled) - ret = _panel_replay_ready_for_pipe_update_locked(intel_dp); - else if (intel_dp->psr.sel_update_enabled) + if (intel_dp->psr.sel_update_enabled) ret = _psr2_ready_for_pipe_update_locked(intel_dp); else ret = _psr1_ready_for_pipe_update_locked(intel_dp);