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 35121E9B265 for ; Tue, 24 Feb 2026 13:52:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BEEAB10E589; Tue, 24 Feb 2026 13:52:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Iix0sAp9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id C85ED10E587; Tue, 24 Feb 2026 13:52:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1771941157; x=1803477157; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y4E5mFxCUbo9pmidmfbhaGXPXHspo6XFteQBxfwlKK8=; b=Iix0sAp9xKjkr+O0Kn/JBuLz5+KqfhDBWt+mNq496oW2XWasirS18qYb v2IFfdJ5ByGrj5f0iYP+uHS5aJAhtHZ1l4aCxS9ke4+o6G5SP5TRYVLAg Z3nfZmylB5XCdne7WA79X3vVdQAJu3zT84uxgn+TgbmlEJjAm61Mry67t o75QUOXEV2b4LtBN4f9vSARtJapYD6+xfxaCLT5gGP2edTWuiNGCAxwAe dJlZR8C2VuBwUf0BN3u9Wc6xoKkCaugmwxgKib33Vk7G6VlKjPg6zUTcS uuZSS7FlSg7Pg/4d1yzuTcOS+4s+2JecC7D0uiQlRcjOS3NtZluWU/RMf w==; X-CSE-ConnectionGUID: 2v5HSKVSTlKZWu7g0+MwFg== X-CSE-MsgGUID: j8S/wn4ETK+xXmLiPkWjMA== X-IronPort-AV: E=McAfee;i="6800,10657,11710"; a="60531000" X-IronPort-AV: E=Sophos;i="6.21,308,1763452800"; d="scan'208";a="60531000" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2026 05:52:37 -0800 X-CSE-ConnectionGUID: Nylu6tJnRd+o+AGKymhuxA== X-CSE-MsgGUID: p81mpatzQuaxNJHfhvTzZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,308,1763452800"; d="scan'208";a="215925226" Received: from dhhellew-desk2.ger.corp.intel.com (HELO hazy.intel.com) ([10.245.244.201]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2026 05:52:35 -0800 From: Luca Coelho To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org, suraj.kandpal@intel.com Subject: [PATCH v4 04/16] drm/i915/display: convert W/As in intel_cdclk.c to new framework Date: Tue, 24 Feb 2026 15:49:51 +0200 Message-ID: <20260224135208.140752-5-luciano.coelho@intel.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260224135208.140752-1-luciano.coelho@intel.com> References: <20260224135208.140752-1-luciano.coelho@intel.com> 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Convert the low-hanging fruits of workaround checks to the workaround framework. Instead of having display structure checks for the workarounds all over, concentrate the checks in intel_display_wa.c. Acked-by: Jani Nikula Reviewed-by: Suraj Kandpal Signed-off-by: Luca Coelho --- drivers/gpu/drm/i915/display/intel_cdclk.c | 2 +- drivers/gpu/drm/i915/display/intel_display_wa.c | 3 +++ drivers/gpu/drm/i915/display/intel_display_wa.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c index 7767f8c198da..121a12c5b8ac 100644 --- a/drivers/gpu/drm/i915/display/intel_cdclk.c +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c @@ -4007,7 +4007,7 @@ void intel_init_cdclk_hooks(struct intel_display *display) display->cdclk.table = dg2_cdclk_table; } else if (display->platform.alderlake_p) { /* Wa_22011320316:adl-p[a0] */ - if (display->platform.alderlake_p && IS_DISPLAY_STEP(display, STEP_A0, STEP_B0)) { + if (intel_display_wa(display, INTEL_DISPLAY_WA_22011320316)) { display->cdclk.table = adlp_a_step_cdclk_table; display->funcs.cdclk = &tgl_cdclk_funcs; } else if (display->platform.alderlake_p_raptorlake_u) { diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.c b/drivers/gpu/drm/i915/display/intel_display_wa.c index 011749b680e8..aef6eca51119 100644 --- a/drivers/gpu/drm/i915/display/intel_display_wa.c +++ b/drivers/gpu/drm/i915/display/intel_display_wa.c @@ -104,6 +104,9 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa, return intel_display_needs_wa_16025573575(display); case INTEL_DISPLAY_WA_22010178259: return DISPLAY_VER(display) == 12; + case INTEL_DISPLAY_WA_22011320316: + return display->platform.alderlake_p && + IS_DISPLAY_STEP(display, STEP_A0, STEP_B0); case INTEL_DISPLAY_WA_22014263786: return IS_DISPLAY_VERx100(display, 1100, 1400); case INTEL_DISPLAY_WA_22021048059: diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.h b/drivers/gpu/drm/i915/display/intel_display_wa.h index 380cb64cf774..aa96d111111c 100644 --- a/drivers/gpu/drm/i915/display/intel_display_wa.h +++ b/drivers/gpu/drm/i915/display/intel_display_wa.h @@ -41,6 +41,7 @@ enum intel_display_wa { INTEL_DISPLAY_WA_16023588340, INTEL_DISPLAY_WA_16025573575, INTEL_DISPLAY_WA_22010178259, + INTEL_DISPLAY_WA_22011320316, INTEL_DISPLAY_WA_22014263786, INTEL_DISPLAY_WA_22021048059, }; -- 2.51.0