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 A32D0E9B265 for ; Tue, 24 Feb 2026 13:52:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3972010E58F; Tue, 24 Feb 2026 13:52:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="gGvQ3PaF"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 88B8510E58D; Tue, 24 Feb 2026 13:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1771941159; x=1803477159; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fXh9YBOSnXLtAG3xCfLiKOzjiF8a10Oiks6ZvzJK2xw=; b=gGvQ3PaFPnGRqrCSjvyzA9rA/lzVCDyUon/y39NSEWpponArwKV9OXEh 8OIEyc/Jpd1K8/BkdoJekNYYYmOMSdGmw7iWyiql9h9cwLiyKtuVfi5V9 fh7MUPkyg1bY1kHUutBYJXzWFYAfmzXonSfeTDGjxKqKS7EW1COx+n2w/ XvumQ8FoUpgpBgLyhoKy2ROPWligWDHO9r6jk6VJ8VTCwus3aIE7e9rte S0ikhSu5njEn69hPxNvQpH0UKfChG6ktiKUkbV7VLZsBBjFEJ2gznarcN oUNqW9LhdOe6fZn6Qqo26v5ndnP3O9D17OTphVm9TTVTt/KN/CQVTCHWb Q==; X-CSE-ConnectionGUID: ZaW26iotSSKJXcrtRFukpA== X-CSE-MsgGUID: LVK9PKjYTB63tk4j/pytHQ== X-IronPort-AV: E=McAfee;i="6800,10657,11710"; a="60531008" X-IronPort-AV: E=Sophos;i="6.21,308,1763452800"; d="scan'208";a="60531008" 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:38 -0800 X-CSE-ConnectionGUID: INbZLtI7TQ6QFWSbvFK5XQ== X-CSE-MsgGUID: G2U9c89/Tfql4f4PVE3JUw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,308,1763452800"; d="scan'208";a="215925232" 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:37 -0800 From: Luca Coelho To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org, suraj.kandpal@intel.com Subject: [PATCH v4 05/16] drm/i915/display: convert W/As in intel_cursor.c to new framework Date: Tue, 24 Feb 2026 15:49:52 +0200 Message-ID: <20260224135208.140752-6-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_cursor.c | 3 ++- drivers/gpu/drm/i915/display/intel_display_wa.c | 1 + drivers/gpu/drm/i915/display/intel_display_wa.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c index 2c5d917fbd7e..18d1014de361 100644 --- a/drivers/gpu/drm/i915/display/intel_cursor.c +++ b/drivers/gpu/drm/i915/display/intel_cursor.c @@ -19,6 +19,7 @@ #include "intel_display.h" #include "intel_display_types.h" #include "intel_display_utils.h" +#include "intel_display_wa.h" #include "intel_fb.h" #include "intel_fb_pin.h" #include "intel_frontbuffer.h" @@ -424,7 +425,7 @@ static u32 i9xx_cursor_ctl(const struct intel_plane_state *plane_state) cntl |= MCURSOR_ROTATE_180; /* Wa_22012358565:adl-p */ - if (DISPLAY_VER(display) == 13) + if (intel_display_wa(display, INTEL_DISPLAY_WA_22012358565)) cntl |= MCURSOR_ARB_SLOTS(1); return cntl; diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.c b/drivers/gpu/drm/i915/display/intel_display_wa.c index aef6eca51119..207129a16713 100644 --- a/drivers/gpu/drm/i915/display/intel_display_wa.c +++ b/drivers/gpu/drm/i915/display/intel_display_wa.c @@ -85,6 +85,7 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa, INTEL_PCH_TYPE(display) < PCH_DG1; case INTEL_DISPLAY_WA_14011503030: case INTEL_DISPLAY_WA_14011503117: + case INTEL_DISPLAY_WA_22012358565: return DISPLAY_VER(display) == 13; case INTEL_DISPLAY_WA_14011508470: return (IS_DISPLAY_VERx100(display, 1200, 1300)); diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.h b/drivers/gpu/drm/i915/display/intel_display_wa.h index aa96d111111c..dff205b6492f 100644 --- a/drivers/gpu/drm/i915/display/intel_display_wa.h +++ b/drivers/gpu/drm/i915/display/intel_display_wa.h @@ -42,6 +42,7 @@ enum intel_display_wa { INTEL_DISPLAY_WA_16025573575, INTEL_DISPLAY_WA_22010178259, INTEL_DISPLAY_WA_22011320316, + INTEL_DISPLAY_WA_22012358565, INTEL_DISPLAY_WA_22014263786, INTEL_DISPLAY_WA_22021048059, }; -- 2.51.0