From patchwork Thu Dec 5 15:47:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastian Brzezinka X-Patchwork-Id: 13895641 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 81866E7716D for ; Thu, 5 Dec 2024 15:47:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BE2610EED2; Thu, 5 Dec 2024 15:47:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="avpTWZwt"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8384F10EED2 for ; Thu, 5 Dec 2024 15:47:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733413670; x=1764949670; h=date:from:to:cc:subject:message-id: content-transfer-encoding:mime-version; bh=zKHdxyFdP+M7DHY2hMU06aGIqUl1ksR0HnB3aseqF30=; b=avpTWZwtGtwLTquGlmbTN6hRIe/qi+iAb2mJG9MF/fGFZJrAymDL1YVl +X0aVrOEZEuWLHsTD7FUes646oOGFqA2DyGkWvPZi8/gYtFe50YW3gqTi YvdsMd1cF31VrmeMsoCRZIxVqqyomsFuAjVsW8IChyrec4jUWDAY37XAA fFNPa+b+ylKvZ8V7kjxSr38MsjDS0UFS+VuVap34Jo85Lz6NwXnCf5/IF blL/pf2DWU90nEJdK9FxTJuDrcgn42tMlIYLZtcGUlda7/8uPnHc523e/ +Jxh5AbZ36Mq3pscJsiUnMmfy2VgDv6XY5xY9SSZBeDTZtUKnSf+IusbK Q==; X-CSE-ConnectionGUID: 4z7ZaQxcRbuT4nxbuxglOA== X-CSE-MsgGUID: tsL5TYa5TeSIKx2NCPjhNw== X-IronPort-AV: E=McAfee;i="6700,10204,11277"; a="44400312" X-IronPort-AV: E=Sophos;i="6.12,210,1728975600"; d="scan'208";a="44400312" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2024 07:47:49 -0800 X-CSE-ConnectionGUID: t1eU6UajTJO5mz5qFJuRcg== X-CSE-MsgGUID: ywsbpgr/Se6BZUQ9mzeYgA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="99165048" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 05 Dec 2024 07:47:49 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 5 Dec 2024 07:47:48 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 5 Dec 2024 07:47:48 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.41) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 5 Dec 2024 07:47:46 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GsgMlQ55L9aZ1/g9Aql96syRDJef7074qUhVxmDSZ0M2t/hNri9lABbs/Y90McPN7RfAJdk/hPHvXEhSkWgjzkwBJn9s1CdMF02stB3rfd+8BpVG6O5QeZqGD34wVdZ/AUNXWHej5k1WgOmx5bKJdczjQvVoe/DcZxgojtHp3jfULW57jCAZwidC5lMydWyBq2bDoGbLuK3RG3aXtF3PzwXWCFQaQszL157YtXqXOq2w+G0OZ1zsO5RJlHnef6kdKRoeshW+xWkeYZOrC0hkFVef+j3QgOPigdbcngBW99Yya9qlUqPUyR4bDd1xwkOqFL0SWWGhAYjHgY4aNrCICg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IK5pJNrPddYvqtku3SfHhXZLoS74T1d+zWDVuQdARtk=; b=WxC+wnmq0Z5vc+7Wj0/EwEFTCo2hp7ohn3KxR29ugqaRvlpdgJZTQFuKad7I1m+lhrrt7kibdkmH9zETlM9CZ6m3nRwA5hwWRrtCkTvoGESz8dGxLf9nSc79ZyPJPuvL3uDbDSZSHM6GKCpsnm5XPs28n15mX5Mgt5l1qAfoED1Kl40VIK1qSZ5YO5Gxpn0FIyu0wQPr5nsc78F6ZgugrNy1FHaDliPjT/+jQzc9BDrg9fGwcfpdlSW9QnLUW1VxvXYogkraADQ7IdpC46FW/xJGb0x64vKH6s4gMcBB/dC6IAQBK2iT2LnMV/5RGGJFGEo2AEbyth5hSfO4RUkf6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MW4PR11MB6909.namprd11.prod.outlook.com (2603:10b6:303:224::12) by SA2PR11MB4972.namprd11.prod.outlook.com (2603:10b6:806:fb::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.12; Thu, 5 Dec 2024 15:47:41 +0000 Received: from MW4PR11MB6909.namprd11.prod.outlook.com ([fe80::28da:9438:a3ef:19c0]) by MW4PR11MB6909.namprd11.prod.outlook.com ([fe80::28da:9438:a3ef:19c0%6]) with mapi id 15.20.8207.010; Thu, 5 Dec 2024 15:47:41 +0000 Date: Thu, 5 Dec 2024 15:47:35 +0000 From: Sebastian Brzezinka To: CC: , Subject: [RFC PATCH] i915/gt: Reapply workarounds in case the previous attempt failed. Message-ID: Content-Disposition: inline X-ClientProxiedBy: VI1PR07CA0263.eurprd07.prod.outlook.com (2603:10a6:803:b4::30) To MW4PR11MB6909.namprd11.prod.outlook.com (2603:10b6:303:224::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR11MB6909:EE_|SA2PR11MB4972:EE_ X-MS-Office365-Filtering-Correlation-Id: 0b355071-2a1c-4049-b2c0-08dd154426ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?mgWRunjK5Jx0sGATqpr3qhRyBT8Ud5i?= =?utf-8?q?W9mh2b0Ul3FwoiYvYXL5h1NGDrcjxhRnpJNlvBpcQVJCewpcV3nJm/aH071PvHgkV?= =?utf-8?q?h/d83YJk4iyjCTCSjD0W161raIoQMtq90w6pGw2Jgh0mThs+kBAwS3cUfGcLxhwdV?= =?utf-8?q?Xln/NHdvwhb/x7QbPXwOp5HKQXx3HLzT4rTKveE8+xIBwqHX76aZDi6z3cYaE85wd?= =?utf-8?q?I78hBFk1OtbeVfl72WsB+N3pyMUi8Imf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yvWwUMB5Gb5sdRldWGi1nUXEGWqthlGUCfzT?= =?utf-8?q?0vTdIxM5w91smuRE0yszGgXe2Cp29rGNg0fLhNNajxifLPOzqCzdr+LDuHlrXZ9/l?= =?utf-8?q?jAqPDLzSyFi7DPw18hfBjjz+PjD0G9sau//7qBJ49DnJdLysNwBJCSq4I=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB6909.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?sYAlAXSWDy7bjntd1mZ4jTq/4Bd+?= =?utf-8?q?65jsL9LHOXPF67Vh22PD8FoL+sbkPM2m41WEoc7lsXh9USlo1bNZS6LzGk0TZAbx0?= =?utf-8?q?iV6IxuENCsYQKJcilyIibuKAQK01Q0bBGZTWmRHkG73OzM109kBIYJ3HiJDCjhIS9?= =?utf-8?q?fIShO/sAvpe0tHFIO3XVC4KeOp68NsFEK2HNvDvfooqkhD6VRm7c+1eUnYPKbUZ5b?= =?utf-8?q?hoat+rHid42ujDMJKbptn50DtlpoHIXJLoCtxLjPYbltyl2wtXoOV+7SXugz+FtFp?= =?utf-8?q?1j5whgKriCoxc++oUda+cvdbIRetb4f9EU53DFCxMR6iL/Ut2XR4+Rzds/ZUpqZ2X?= =?utf-8?q?JFuTwNvadJB3y/FLlcG6UUzwvCS3HUwRzok6bcjpg6Yvj0hRDxcGNluokypc4Mdx3?= =?utf-8?q?DXIB7jKIf5ICdc/g9JXvkx0xyKhAfgwNC3e5KarfmhGq+OurjDXTi8tmhmcjkr8Ai?= =?utf-8?q?/SELskj+inT3EHZCaopzAHysIRAPnlkSs0fKbSiJlcsjRr24AGmKH2PFvNd2kuU0J?= =?utf-8?q?nanf5zGXLYRcFkkVvuG+MSt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unPWjkT544aKh0VS+Za8qaVyo44jldLLJil+T?= =?utf-8?q?jscSmhYiZsWtUE4VLZZVQhCS8gZUdmzrbRdOXXu9D3sqh69Kp2lGMT2UMEA2n+CSH?= =?utf-8?q?TXM5sRnLCIFFAbFcVhE1nOLSbSd3JKo6EA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0b355071-2a1c-4049-b2c0-08dd154426ed X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB6909.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2024 15:47:41.3060 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZJ8CUhVkUaG2W7k3f4M6cHOQjTsI1M/wPwhwkFNvlTChuW6DJuaV65Sgwxmk8cVBdmRHwv3YUcrfU5gEOIRVxHyol6d15k1mYeTcV8BkJns= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4972 X-OriginatorOrg: intel.com 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" `wa_verify`sporadically detects lost workaround on application; this is unusual behavior since wa are applied at `intel_gt_init_hw` and verified right away by `intel_gt_verify_workarounds`, and  `wa_verify` doesn't fail on initialization as one might suspect would happen. One approach that may be somewhat beneficial is to reapply workarounds in the event of failure, or even get rid of verify on application, since it's redundant to `intel_gt_verify_workarounds`. This patch aims to resolve: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12668 Signed-off-by: Sebastian Brzezinka --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 570c91878189..4ee623448223 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -1761,6 +1761,17 @@ static void wa_list_apply(const struct i915_wa_list *wal) intel_gt_mcr_read_any_fw(gt, wa->mcr_reg) : intel_uncore_read_fw(uncore, wa->reg); + if ((val ^ wa->set) & wa->read) { + if (wa->is_mcr) + intel_gt_mcr_multicast_write_fw(gt, wa->mcr_reg, val); + else + intel_uncore_write_fw(uncore, wa->reg, val); + } + + val = wa->is_mcr ? + intel_gt_mcr_read_any_fw(gt, wa->mcr_reg) : + intel_uncore_read_fw(uncore, wa->reg); + wa_verify(gt, wa, val, wal->name, "application"); } }