Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F375606A319 for ; Fri, 23 Oct 2026 05:03:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=aicKdqwq Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E513611298F; Fri, 23 Oct 2026 05:03:00 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id E2BDD112985; Fri, 23 Oct 2026 05:02: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=1792731774; x=1824267774; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QKdrPKCHXgUpGjxVq9p1+EgvmmV0SF42V60QXR60NvY=; b=aicKdqwq6Ep3ik+f17R9t6p/0/WNCMl3Yp5Ub3RUGqhMnQnXdZpJJ2xZ ToqvTH1ISRJqFsWd95FGEGLRP9fv94HQfAyuePuXFnDrnJqsxjgEjWEqB RTSuI0F+IGyEE7DO2a3SDGbwD9taAc2GL/1zV8k6y6R6kxLthu524rD7P eoULDDY5WEU0f84TTJA9ZHCZ83eKC0RKt8oHOcc9P2KwMInt/78OGdzSU XiDX3ED/ARWEHNAhGfzj3sYc28q/QhNLZnQYnm+JcqTmoHJByvEbadOxG zXeJfkzNWeiSo7w0LoBeMuE6rederijLYBXAgn3rg4zMdl0SkR1K0Tr3b A==; X-CSE-ConnectionGUID: VROOTYNsT6W1ICOoHMp9fw== X-CSE-MsgGUID: GLnE5/rJT9GLciDoy+fhjQ== X-IronPort-AV: E=McAfee;i="6800,10657,11943"; a="1499171" X-IronPort-AV: E=Sophos;i="6.27,173,1787036400"; d="scan'208";a="1499171" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2026 22:02:53 -0700 X-CSE-ConnectionGUID: xERFjJUpQkygf6aC2xf0oQ== X-CSE-MsgGUID: WRb+9AlpQ+i7Foc6LwoXeg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,173,1787036400"; d="scan'208";a="3926667" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.10]) by fmviesa006.fm.intel.com with ESMTP; 22 Oct 2026 22:02:51 -0700 From: Suraj Kandpal To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: mitulkumar.ajitkumar.golani@intel.com, Ankit Nautiyal , Suraj Kandpal Subject: [PATCH v8 12/14] drm/i915/display: Implement Wa_14021768792 for BMG DP for link_m/n ratio > 10 Date: Fri, 23 Oct 2026 10:32:25 +0530 Message-Id: <20261023050227.2068466-13-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261023050227.2068466-1-suraj.kandpal@intel.com> References: <20261023050227.2068466-1-suraj.kandpal@intel.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-gfx" X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Ankit Nautiyal Handle the bypass logic for the M/N ratio limit for DP. Calculate the M/N ratio, check if it can bypass the limit, and set the appropriate flags for the workaround. v2: -Restrict the workaround to 128b/132b links. -Clear bypass_m_n_ratio_limit on entry, so a rejected link rate cannot leave it set for the rate that gets used. (Sashiko) v3: -Rebase on the reworked M/N ratio check, which no longer checks m_n and link_n. m_n is no longer const, as the flag is set through it. (Mitul) -Pass the cpu transcoder to intel_display_can_bypass_m_n_limit() instead of the pipe. (Mitul) Bspec: 49266 Signed-off-by: Ankit Nautiyal Co-developed-by: Suraj Kandpal Signed-off-by: Suraj Kandpal Reviewed-by: Mitul Golani --- drivers/gpu/drm/i915/display/intel_dp.c | 28 ++++++++++++++++++++----- drivers/gpu/drm/i915/display/intel_dp.h | 2 +- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index db5747338b57..73c67565a329 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -1302,18 +1302,32 @@ bool intel_dp_can_support_m_n(struct intel_display *display, } void intel_dp_check_m_n_ratio(const struct intel_crtc_state *crtc_state, - const struct intel_link_m_n *m_n) + struct intel_link_m_n *m_n) { struct intel_display *display = to_intel_display(crtc_state); int max_m_n_ratio = intel_dp_get_max_m_n_ratio(display); int m_n_ratio; + m_n->bypass_m_n_ratio_limit = false; + m_n_ratio = intel_dp_link_m_n_ratio(m_n->link_m, m_n->link_n); - if (m_n_ratio > max_m_n_ratio) + if (m_n_ratio <= max_m_n_ratio) + return; + + if (intel_dp_is_uhbr(crtc_state) && + intel_display_can_bypass_m_n_limit(display, m_n_ratio, + crtc_state->cpu_transcoder)) { + m_n->bypass_m_n_ratio_limit = true; drm_dbg_kms(display->drm, - "Link M/N ratio (%d) exceeds max allowed (%d)\n", - m_n_ratio, max_m_n_ratio); + "Bypassing Link_m/Link_n ratio limit (ratio %d)\n", + m_n_ratio); + return; + } + + drm_dbg_kms(display->drm, + "Link M/N ratio (%d) exceeds max allowed (%d)\n", + m_n_ratio, max_m_n_ratio); } static int intel_dp_mso_pixel_clock(struct intel_dp *intel_dp, int pixel_clock) @@ -3395,6 +3409,9 @@ static bool can_enable_drrs(struct intel_connector *connector, if (pipe_config->vrr.enable) return false; + if (pipe_config->dp_m_n.bypass_m_n_ratio_limit) + return false; + /* * DRRS and PSR can't be enable together, so giving preference to PSR * as it allows more power-savings by complete shutting down display, @@ -3429,7 +3446,8 @@ intel_dp_drrs_compute_config(struct intel_connector *connector, * FIXME all joined pipes share the same transcoder. * Need to account for that when updating M/N live. */ - if (has_seamless_m_n(connector) && !pipe_config->joiner_pipes) + if (has_seamless_m_n(connector) && !pipe_config->joiner_pipes && + !pipe_config->dp_m_n.bypass_m_n_ratio_limit) pipe_config->update_m_n = true; if (!can_enable_drrs(connector, pipe_config, downclock_mode)) { diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h index 0f045f2df534..ef5aa28617f0 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.h +++ b/drivers/gpu/drm/i915/display/intel_dp.h @@ -247,6 +247,6 @@ int intel_dp_link_init(struct intel_dp *intel_dp); void intel_dp_link_cleanup(struct intel_dp *intel_dp); void intel_dp_check_m_n_ratio(const struct intel_crtc_state *crtc_state, - const struct intel_link_m_n *m_n); + struct intel_link_m_n *m_n); #endif /* __INTEL_DP_H__ */ -- 2.34.1