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 1E6BFCA5FDF for ; Wed, 21 Jan 2026 04:09:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BAA1910E6B4; Wed, 21 Jan 2026 04:09:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="TNQgLtK0"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8466910E6A9; Wed, 21 Jan 2026 04:09:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1768968567; x=1800504567; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FwTcrwq64EBttXYzd5TkA+5pWV0bkEXAH9ZxifaDDug=; b=TNQgLtK0Bg/pbW8Z5grXkbJaS34YYIYsddx6cI4cCQeQ4TtfaY9sYut+ iK45KBAAz8gDRKFC/hrjU1SY4sk9PP6JARlvWt8mjSOTCyzqlnxipbtnI T5e/H7OAUfmI05IM1W3A9T1SthiJa/mzHZ8nEneALuLz2oVn9bAeBeK/S +IVrHUP/s3LIWVJ6oZtm4xdJQdIehnKo3DFmIi8tvq99fy7qdfg4LXvIN g1z5iPbX6lawCujQrfKp29yewrhpL7isW+g2bCKEEl2o0uURod5RmW1tk 7QFb3c+ZZ4IgJIoGjrSAs7J1KyGttA+7tNTiiJX9oLsNFhrsR4PZmejLp w==; X-CSE-ConnectionGUID: 4z7svexKRuSMqbrYy0347g== X-CSE-MsgGUID: Oq4fewnXTeC4NwZU2JTrww== X-IronPort-AV: E=McAfee;i="6800,10657,11677"; a="81299946" X-IronPort-AV: E=Sophos;i="6.21,242,1763452800"; d="scan'208";a="81299946" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2026 20:09:27 -0800 X-CSE-ConnectionGUID: YwDsP6A+S2uvf5U2sMdK3w== X-CSE-MsgGUID: ZEs1PVqKTt+NbFPI7Gekyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,242,1763452800"; d="scan'208";a="211330938" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2026 20:09:27 -0800 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: imre.deak@intel.com, Ankit Nautiyal Subject: [PATCH 03/14] drm/i915/dp: Extract helper to get the hdisplay limit Date: Wed, 21 Jan 2026 09:23:19 +0530 Message-ID: <20260121035330.2793386-4-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260121035330.2793386-1-ankit.k.nautiyal@intel.com> References: <20260121035330.2793386-1-ankit.k.nautiyal@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" Separate out function to get the hdisplay limit for a given platform. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index c0a8ffac6312..fc7d48460a52 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -1371,6 +1371,12 @@ intel_dp_mode_valid_downstream(struct intel_connector *connector, return MODE_OK; } +static +int intel_dp_hdisplay_limit(struct intel_display *display) +{ + return DISPLAY_VER(display) >= 30 ? 6144 : 5120; +} + static bool intel_dp_needs_joiner(struct intel_dp *intel_dp, struct intel_connector *connector, @@ -1378,17 +1384,14 @@ bool intel_dp_needs_joiner(struct intel_dp *intel_dp, int num_joined_pipes) { struct intel_display *display = to_intel_display(intel_dp); - int hdisplay_limit; if (!intel_dp_has_joiner(intel_dp)) return false; num_joined_pipes /= 2; - hdisplay_limit = DISPLAY_VER(display) >= 30 ? 6144 : 5120; - return clock > num_joined_pipes * display->cdclk.max_dotclk_freq || - hdisplay > num_joined_pipes * hdisplay_limit; + hdisplay > num_joined_pipes * intel_dp_hdisplay_limit(display); } int intel_dp_num_joined_pipes(struct intel_dp *intel_dp, -- 2.45.2