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 9B8B5E9B263 for ; Tue, 24 Feb 2026 13:52:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6171610E14D; Tue, 24 Feb 2026 13:52:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="IbJ8i33U"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8590A10E58C; Tue, 24 Feb 2026 13:52:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1771941161; x=1803477161; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=G0oCR6rGKCiESi7gWm3rVNqicGnIkmaZew5I2qzad9M=; b=IbJ8i33U5Gwg0m+Bo33AqDEAJddtNXIMVNE41keBpuPpcuGsOGPTANG6 ezP0z6f0nLG5R5ayry7P9PsJG6mXFLQr4LiSWprb86amVEK/CU/Rq3t/l n3V7zXWdaWwiRaKPWlYF1KmRWtxypwjxtZU5GEcP1/SXNlVwjlw8zaWnz a+BIDpk5qpLv/VbIQyN2c+m7upDn8I92voYOa9cf8AnXiVeeobdaVKDpJ U6GpmkwKqd3naRF+6Kc4Ur3YjMM4ifALcYflwUC03N/eM9SgMhcPyKcOX Z5oRvqMc3JKo7E+JjxwHMOjXlHkb2rXZ+AD0tQSloc7mq0L/2ofOAgyNL Q==; X-CSE-ConnectionGUID: xu6tA1DTSHClZowGGBe4TQ== X-CSE-MsgGUID: vpKqjyELRmyRtslKUKq42w== X-IronPort-AV: E=McAfee;i="6800,10657,11710"; a="60531011" X-IronPort-AV: E=Sophos;i="6.21,308,1763452800"; d="scan'208";a="60531011" 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:40 -0800 X-CSE-ConnectionGUID: 8bCDQJ/ZT7yG8fiYwb1gEA== X-CSE-MsgGUID: P8dy/8kYRdelEAyFbEgytg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,308,1763452800"; d="scan'208";a="215925237" 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:38 -0800 From: Luca Coelho To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org, suraj.kandpal@intel.com Subject: [PATCH v4 06/16] drm/i915/display: convert W/As in intel_ddi.c to new framework Date: Tue, 24 Feb 2026 15:49:53 +0200 Message-ID: <20260224135208.140752-7-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-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" 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_ddi.c | 4 ++-- drivers/gpu/drm/i915/display/intel_display_wa.c | 3 +++ drivers/gpu/drm/i915/display/intel_display_wa.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index 94ae583e907f..7f1576bfe4b0 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -52,6 +52,7 @@ #include "intel_display_regs.h" #include "intel_display_types.h" #include "intel_display_utils.h" +#include "intel_display_wa.h" #include "intel_dkl_phy.h" #include "intel_dkl_phy_regs.h" #include "intel_dp.h" @@ -1401,8 +1402,7 @@ static void tgl_dkl_phy_set_signal_levels(struct intel_encoder *encoder, int level; /* Wa_16011342517:adl-p */ - if (display->platform.alderlake_p && - IS_DISPLAY_STEP(display, STEP_A0, STEP_D0)) { + if (intel_display_wa(display, INTEL_DISPLAY_WA_16011342517)) { if ((intel_encoder_is_hdmi(encoder) && crtc_state->port_clock == 594000) || (intel_encoder_is_dp(encoder) && diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.c b/drivers/gpu/drm/i915/display/intel_display_wa.c index 207129a16713..e7243e4dba4f 100644 --- a/drivers/gpu/drm/i915/display/intel_display_wa.c +++ b/drivers/gpu/drm/i915/display/intel_display_wa.c @@ -99,6 +99,9 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa, return DISPLAY_VER(display) == 20; case INTEL_DISPLAY_WA_15018326506: return display->platform.battlemage; + case INTEL_DISPLAY_WA_16011342517: + return display->platform.alderlake_p && + IS_DISPLAY_STEP(display, STEP_A0, STEP_D0); case INTEL_DISPLAY_WA_16023588340: return intel_display_needs_wa_16023588340(display); case INTEL_DISPLAY_WA_16025573575: diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.h b/drivers/gpu/drm/i915/display/intel_display_wa.h index dff205b6492f..de0ed7698c61 100644 --- a/drivers/gpu/drm/i915/display/intel_display_wa.h +++ b/drivers/gpu/drm/i915/display/intel_display_wa.h @@ -38,6 +38,7 @@ enum intel_display_wa { INTEL_DISPLAY_WA_14025769978, INTEL_DISPLAY_WA_15013987218, INTEL_DISPLAY_WA_15018326506, + INTEL_DISPLAY_WA_16011342517, INTEL_DISPLAY_WA_16023588340, INTEL_DISPLAY_WA_16025573575, INTEL_DISPLAY_WA_22010178259, -- 2.51.0