From mboxrd@z Thu Jan 1 00:00:00 1970 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 933F4C982C5 for ; Wed, 16 Sep 2026 09:09:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3EA1310E8B3; Wed, 16 Sep 2026 09:09:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="f/ZTnqM6"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94E1B10E7CD; Wed, 16 Sep 2026 09:09:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1789549796; x=1821085796; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MXwkKswk6oXlTs6teCHPvUROCJMNPydo6QVmYZDRpMU=; b=f/ZTnqM6QFIGed7MzLn0P6WYwBxA+pzDdPRAQIJtl5CcutbJQGw3z900 7SuJacTiCGSqm9FZUUAOaE94IemKIKcn1HF8oqa95GWhsl99oZvO4SMQj 0eaIWudi3lstfvPdkXEhXX0CUAW2IJrrNrIlX0dyJ/jD8DFO8Eqo9nDm6 CxfyDsi68MhCtVOVVRyERG94JupdBd1PdHFfCVFCEHThK0/5ZwijRrCvz GX2Tnw1VEwdlsu/JFZ3gj+EcDYLWZ5HY83ZIOEOkpWxYQOMC6o9z0a0Lv 7uGBy0Xl7DWwpWWBKlS8Vte82eMuPpGAgQwtBhENeXb05cYt6fWGcpiDJ A==; X-CSE-ConnectionGUID: 58FFTl0hRSivDPi5uJyvJA== X-CSE-MsgGUID: CdNFDGi3R5K3IwdvjqlR1Q== X-IronPort-AV: E=McAfee;i="6800,10657,11905"; a="88858867" X-IronPort-AV: E=Sophos;i="6.27,103,1787036400"; d="scan'208";a="88858867" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2026 02:09:56 -0700 X-CSE-ConnectionGUID: eTVlqAlNQB+h/ALgEYqalQ== X-CSE-MsgGUID: pSathvaeSmadsY4ib4ABog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,103,1787036400"; d="scan'208";a="277030190" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.10]) by orviesa004.jf.intel.com with ESMTP; 16 Sep 2026 02:09:55 -0700 From: Suraj Kandpal To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: ankit.k.nautiyal@intel.com, arun.r.murthy@intel.com, Suraj Kandpal Subject: [PATCH v3 03/10] drm/i915/dp_mst: Limit M/N ratio for MST Date: Wed, 16 Sep 2026 14:39:39 +0530 Message-Id: <20260916090946.677564-4-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260916090946.677564-1-suraj.kandpal@intel.com> References: <20260916090946.677564-1-suraj.kandpal@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" From: Ankit Nautiyal The hardware does not support DisplayPort configurations where the ceiling of the Link M/Link N ratio exceeds the limit. Enforce this constraint for MST as well. The compute config path needs no change: MST goes through intel_dp_compute_config_limits() too, so the link config filter set up there already excludes the configurations violating the ratio limit, and MST fails there if none is left. What is still missing is pruning such modes, so add the check to mst_connector_mode_valid_ctx(), reusing the helper the SST mode_valid uses. It walks the link configurations and only rejects the mode if none of them can satisfy the ratio, rather than evaluating it at a single link rate. v2: -Drop the checks in the MST link config helpers, redundant now that the constraint is applied while computing the link config limits. (Imre) -Share the mode_valid helper with SST instead of evaluating the ratio at one link rate, since the link symbol clock is not monotonic in the link rate and there is no single best case configuration. v3: -Now that intel_dp_mode_valid_m_n checks for all configs just call that (Sashiko) Signed-off-by: Ankit Nautiyal Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index 6a869d0f6ffc..430ba1230c5a 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -1564,6 +1564,11 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector, min_link_bpp_x16, bw_overhead_flags); + if (!intel_dp_mode_valid_m_n(intel_dp, mode->clock)) { + *status = MODE_CLOCK_HIGH; + return 0; + } + /* * TODO: * - Also check if compression would allow for the mode -- 2.34.1