From patchwork Fri Sep 6 07:00: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: 13793474 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 D4A6CCE7AB8 for ; Fri, 6 Sep 2024 07:00:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6683610E805; Fri, 6 Sep 2024 07:00:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="hgUuvC93"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC44010E803 for ; Fri, 6 Sep 2024 07:00: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=1725606049; x=1757142049; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HC2uD07/vVb7ktFeSppFK0JB8YonrNF/Cz3BbXhUxpg=; b=hgUuvC93GQh2T9aU3aKPBh+YvFXzcj8JrzeTsbxQWQ9NtMHy2poH+IND FhdjNKw8q4WLGSpvZOZ9VQ6au7D7ps9q0Ks4EUSn0yWTENfaHYh6KbddI uZaJRS4YCN8J+xzRDQDhLxFnRqbhyjRAJoQTg1nKsv+qUl/eCr7oecM63 HNrUUxFS7oF77XRAtcgoWJYBtWKedkTg0Ehw4jxK24ykm3wWgOBb3sr6l GmhcDdGaVxBWl57pw8a9WnlAytDv0KgTRAbVmZYV/rU+O5DlWcfiIwtfY cNudjzf/zCXF/bohEn5wsbFdXSMdfRV/rpkpawcTWHkkzYw1CAiiUgBe5 w==; X-CSE-ConnectionGUID: 7AmgzyLeSSmeaWJbB7KfQQ== X-CSE-MsgGUID: 6KR5E2pySMKW87oY/twT7Q== X-IronPort-AV: E=McAfee;i="6700,10204,11186"; a="28103038" X-IronPort-AV: E=Sophos;i="6.10,207,1719903600"; d="scan'208";a="28103038" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 00:00:49 -0700 X-CSE-ConnectionGUID: l6XUU/9DTA6juBo7tWuOvw== X-CSE-MsgGUID: ll+d0/BuROGbNm6sHWEwMw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,207,1719903600"; d="scan'208";a="70292505" Received: from dhhellew-desk2.ger.corp.intel.com.ger.corp.intel.com (HELO jhogande-mobl1..) ([10.245.244.116]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 00:00:47 -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 v2 1/4] drm/i915/display: Handle MST connector in intel_attached_dp Date: Fri, 6 Sep 2024 10:00:30 +0300 Message-Id: <20240906070033.289015-2-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240906070033.289015-1-jouni.hogander@intel.com> References: <20240906070033.289015-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 Reviewed-by: Imre Deak --- 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 733de5edcfdb3..000ab373c8879 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1913,7 +1913,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 Fri Sep 6 07:00: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: 13793475 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 D498FCE7AB9 for ; Fri, 6 Sep 2024 07:00:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DEC110E806; Fri, 6 Sep 2024 07:00:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="jem1Gz1Y"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 72B6610E806 for ; Fri, 6 Sep 2024 07:00: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=1725606051; x=1757142051; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z/EBtKgep5pavTTb1v1kbnE2O/HcJjr8GyZ6vGCgk9Y=; b=jem1Gz1Yibvj/cADVP0z0x+DD62N9PrgX5eAlRNuPbqwLuWGuhrVcPOm 3JW34ZWR1ux34l9m9N4ga4Qh7MYNwJkCOE8UyL9QczJRyY0KuyJ/zV5Jm lu+yXxyfK09hkgvhsQBg4MNhYYS+qC2Y0t2U/NcE0gkHv7FU7KxXwyDqr ic7WQ3KISjzqm1dcO6a3F0qZfVpEO0WvE5cBdaYbOVibVRlANbY9CvcCs ivskJLNh+iTM71lmUfwZPJxHzy9reFfrktQzGEJwlAdnxPb60/WKKLYKG 3+AKBLAGjjErrAUUnRFtsEvNbXBawZt1WwH5GucJQOCx8jWoBDqqhAkaG A==; X-CSE-ConnectionGUID: sLIgd7zjSgiVAowYVhTLpQ== X-CSE-MsgGUID: T+YFIj2ySNqeBBlTEENmyw== X-IronPort-AV: E=McAfee;i="6700,10204,11186"; a="28103040" X-IronPort-AV: E=Sophos;i="6.10,207,1719903600"; d="scan'208";a="28103040" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 00:00:51 -0700 X-CSE-ConnectionGUID: dfGro8rtSbq57VwAcITNFg== X-CSE-MsgGUID: JUbA5qTKRQeT+wkgGKYWrQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,207,1719903600"; d="scan'208";a="70292513" Received: from dhhellew-desk2.ger.corp.intel.com.ger.corp.intel.com (HELO jhogande-mobl1..) ([10.245.244.116]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 00:00:49 -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 v2 2/4] drm/i915/display: Use intel_attached_dp instead of local implementation Date: Fri, 6 Sep 2024 10:00:31 +0300 Message-Id: <20240906070033.289015-3-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240906070033.289015-1-jouni.hogander@intel.com> References: <20240906070033.289015-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" Link training code contains local "connector to intel_dp" implementation. This was added due to missing MST handling in intel_attached_dp. Missing MST support is now fixed in intel_attached_dp. We can now change link training code to use that instead of local intel_connector_to_intel_dp. Signed-off-by: Jouni Högander Reviewed-by: Imre Deak --- .../drm/i915/display/intel_dp_link_training.c | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c index f45797c1a2051..28f6b7bb816e2 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c @@ -1679,19 +1679,11 @@ void intel_dp_128b132b_sdp_crc16(struct intel_dp *intel_dp, lt_dbg(intel_dp, DP_PHY_DPRX, "DP2.0 SDP CRC16 for 128b/132b enabled\n"); } -static struct intel_dp *intel_connector_to_intel_dp(struct intel_connector *connector) -{ - if (connector->mst_port) - return connector->mst_port; - else - return enc_to_intel_dp(intel_attached_encoder(connector)); -} - static int i915_dp_force_link_rate_show(struct seq_file *m, void *data) { struct intel_connector *connector = to_intel_connector(m->private); struct intel_display *display = to_intel_display(connector); - struct intel_dp *intel_dp = intel_connector_to_intel_dp(connector); + struct intel_dp *intel_dp = intel_attached_dp(connector); int current_rate = -1; int force_rate; int err; @@ -1762,7 +1754,7 @@ static ssize_t i915_dp_force_link_rate_write(struct file *file, struct seq_file *m = file->private_data; struct intel_connector *connector = to_intel_connector(m->private); struct intel_display *display = to_intel_display(connector); - struct intel_dp *intel_dp = intel_connector_to_intel_dp(connector); + struct intel_dp *intel_dp = intel_attached_dp(connector); int rate; int err; @@ -1789,7 +1781,7 @@ static int i915_dp_force_lane_count_show(struct seq_file *m, void *data) { struct intel_connector *connector = to_intel_connector(m->private); struct intel_display *display = to_intel_display(connector); - struct intel_dp *intel_dp = intel_connector_to_intel_dp(connector); + struct intel_dp *intel_dp = intel_attached_dp(connector); int current_lane_count = -1; int force_lane_count; int err; @@ -1864,7 +1856,7 @@ static ssize_t i915_dp_force_lane_count_write(struct file *file, struct seq_file *m = file->private_data; struct intel_connector *connector = to_intel_connector(m->private); struct intel_display *display = to_intel_display(connector); - struct intel_dp *intel_dp = intel_connector_to_intel_dp(connector); + struct intel_dp *intel_dp = intel_attached_dp(connector); int lane_count; int err; @@ -1891,7 +1883,7 @@ static int i915_dp_max_link_rate_show(void *data, u64 *val) { struct intel_connector *connector = to_intel_connector(data); struct intel_display *display = to_intel_display(connector); - struct intel_dp *intel_dp = intel_connector_to_intel_dp(connector); + struct intel_dp *intel_dp = intel_attached_dp(connector); int err; err = drm_modeset_lock_single_interruptible(&display->drm->mode_config.connection_mutex); @@ -1910,7 +1902,7 @@ static int i915_dp_max_lane_count_show(void *data, u64 *val) { struct intel_connector *connector = to_intel_connector(data); struct intel_display *display = to_intel_display(connector); - struct intel_dp *intel_dp = intel_connector_to_intel_dp(connector); + struct intel_dp *intel_dp = intel_attached_dp(connector); int err; err = drm_modeset_lock_single_interruptible(&display->drm->mode_config.connection_mutex); @@ -1929,7 +1921,7 @@ static int i915_dp_force_link_training_failure_show(void *data, u64 *val) { struct intel_connector *connector = to_intel_connector(data); struct intel_display *display = to_intel_display(connector); - struct intel_dp *intel_dp = intel_connector_to_intel_dp(connector); + struct intel_dp *intel_dp = intel_attached_dp(connector); int err; err = drm_modeset_lock_single_interruptible(&display->drm->mode_config.connection_mutex); @@ -1947,7 +1939,7 @@ static int i915_dp_force_link_training_failure_write(void *data, u64 val) { struct intel_connector *connector = to_intel_connector(data); struct intel_display *display = to_intel_display(connector); - struct intel_dp *intel_dp = intel_connector_to_intel_dp(connector); + struct intel_dp *intel_dp = intel_attached_dp(connector); int err; if (val > 2) @@ -1971,7 +1963,7 @@ static int i915_dp_force_link_retrain_show(void *data, u64 *val) { struct intel_connector *connector = to_intel_connector(data); struct intel_display *display = to_intel_display(connector); - struct intel_dp *intel_dp = intel_connector_to_intel_dp(connector); + struct intel_dp *intel_dp = intel_attached_dp(connector); int err; err = drm_modeset_lock_single_interruptible(&display->drm->mode_config.connection_mutex); @@ -1989,7 +1981,7 @@ static int i915_dp_force_link_retrain_write(void *data, u64 val) { struct intel_connector *connector = to_intel_connector(data); struct intel_display *display = to_intel_display(connector); - struct intel_dp *intel_dp = intel_connector_to_intel_dp(connector); + struct intel_dp *intel_dp = intel_attached_dp(connector); int err; err = drm_modeset_lock_single_interruptible(&display->drm->mode_config.connection_mutex); @@ -2012,7 +2004,7 @@ static int i915_dp_link_retrain_disabled_show(struct seq_file *m, void *data) { struct intel_connector *connector = to_intel_connector(m->private); struct intel_display *display = to_intel_display(connector); - struct intel_dp *intel_dp = intel_connector_to_intel_dp(connector); + struct intel_dp *intel_dp = intel_attached_dp(connector); int err; err = drm_modeset_lock_single_interruptible(&display->drm->mode_config.connection_mutex); From patchwork Fri Sep 6 07:00: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: 13793476 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 AD2EFCE7AE2 for ; Fri, 6 Sep 2024 07:00:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 40BF610E813; Fri, 6 Sep 2024 07:00:53 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="NpkHNKeB"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1779A10E806 for ; Fri, 6 Sep 2024 07:00: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=1725606053; x=1757142053; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=B+AkGGKdBW5AdcphGZh/WYPUVS8UdCB6dHN64Q9NU44=; b=NpkHNKeBY1wcdFN7EfFKcVucs1t72siJOwmn7ex3ghTvkYyphXIN7iUb nyUxUc5iSERdt/bhMZdDdcvOvWo0wE6d7gM7bX5xC6wynKla6nblDze1a RgjdGqECpAB5qkZKtDD5+trA5BRS5sX6d/rTVemsz0APWEGA2e5qctE74 CD1pAk3eZJfZMTsRQLE5SDeyuE4zLnk7AZYvPjXQOIcA8LCKI/iqAEC/D k1wS16yzbQvucN4X29ystDUaCxTs8XMLwMOyYGGrzegm4h4y/dnialrAY fyZ+mz8cT/K1KeEfa0lbSYR0RexOYOpM3XAY+4DWFBJh95osyZGyj8hCX g==; X-CSE-ConnectionGUID: ByX5J6T6RLyr4v7u9rsrgA== X-CSE-MsgGUID: t6YzxIIrQqGL/MHOAa4MSg== X-IronPort-AV: E=McAfee;i="6700,10204,11186"; a="28103042" X-IronPort-AV: E=Sophos;i="6.10,207,1719903600"; d="scan'208";a="28103042" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 00:00:53 -0700 X-CSE-ConnectionGUID: tQnOKigQTOquuT1r1RClhw== X-CSE-MsgGUID: fR6nUPeLRuKNctNfaxmWYQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,207,1719903600"; d="scan'208";a="70292518" Received: from dhhellew-desk2.ger.corp.intel.com.ger.corp.intel.com (HELO jhogande-mobl1..) ([10.245.244.116]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 00:00: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 v2 3/4] drm/i915/psr: Add connector debugfs files for MST connector as well Date: Fri, 6 Sep 2024 10:00:32 +0300 Message-Id: <20240906070033.289015-4-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240906070033.289015-1-jouni.hogander@intel.com> References: <20240906070033.289015-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. v2: remove TODO comment Reviewed-by: Imre Deak Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index b30fa067ce6e3..581c409ce7309 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -3840,10 +3840,8 @@ void intel_psr_connector_debugfs_add(struct intel_connector *connector) struct drm_i915_private *i915 = to_i915(connector->base.dev); 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 Fri Sep 6 07:00: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: 13793477 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 40CA0CE7AE3 for ; Fri, 6 Sep 2024 07:00:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B850010E816; Fri, 6 Sep 2024 07:00:54 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="R3bBQlW9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id B926710E816 for ; Fri, 6 Sep 2024 07:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725606054; x=1757142054; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IDcq4wlscYdL9z9vMeXIpRX5v5qRtnAIAJvXRmHdOBI=; b=R3bBQlW9WGYpLb87oshrQNlcXBsKYb4T/9zmJ+Vk5qxprMM2eWRUjx0M iEAAlElwZmH7EJXJIfkjPeuB+HkKIlvDbdHr+pS0r+rIBzDLsOJ63b3af KptsRBxK2qIShovugTQi2PSmbMjdgx2BenFMBu6WdPBWCoVgFUjOksrPK jgp47cmjVYzYckAfBtLiOVWXoGeUex5awEHAYRc3Vx89k5YMtibYY6QIs DKhSLnQjsaTQr8QA8mCe7n3cCQa9aAHPxeBOaMLp8YiONhsrFiLfaO8Q7 JMC+Y7tlrfpqGnN3gCGT2oJ8BISnGLSyDQxG5/dFBQJKwwFWBP5hRC4R7 g==; X-CSE-ConnectionGUID: Y6ZvMgGlT8uCzuW1cKmMFw== X-CSE-MsgGUID: dmgpiUGYRayUtVFlnzfAtg== X-IronPort-AV: E=McAfee;i="6700,10204,11186"; a="28103043" X-IronPort-AV: E=Sophos;i="6.10,207,1719903600"; d="scan'208";a="28103043" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 00:00:54 -0700 X-CSE-ConnectionGUID: 1Szyd7MSSfmK2dafy905zA== X-CSE-MsgGUID: FFdcppSoTIKSFt2lTp6kdg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,207,1719903600"; d="scan'208";a="70292523" Received: from dhhellew-desk2.ger.corp.intel.com.ger.corp.intel.com (HELO jhogande-mobl1..) ([10.245.244.116]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 00:00:52 -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 v2 4/4] drm/i915/psr: Do not wait for PSR being idle on on Panel Replay Date: Fri, 6 Sep 2024 10:00:33 +0300 Message-Id: <20240906070033.289015-5-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240906070033.289015-1-jouni.hogander@intel.com> References: <20240906070033.289015-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 Reviewed-by: Animesh Manna --- 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 581c409ce7309..1a4ef231a53ca 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -2786,13 +2786,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 @@ -2815,12 +2808,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);