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 A6569CD8CAC for ; Mon, 8 Jun 2026 22:36:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DFF610FA0B; Mon, 8 Jun 2026 22:36:38 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="UrR96N7E"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6B9F910F9EC for ; Mon, 8 Jun 2026 22:36:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1780958189; x=1812494189; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=q1V5LyDlYrkVCXITC+2MXQo6rOK99s+JLBYqqFh+VjY=; b=UrR96N7EWfJFBxiFtmx20pSYpMbXHS+1600g3bLTA3BKNKiL44g72qLP EakIF0FTIUXe2bPRNbbersQcmSNMwCY5ZGPsn9vCLd1TwsHoc5KKYHdX6 6FXo3cGO6mVedoGu8tn/1332m4TcW5773r3nZQd834Jhp8RQnIiKIszas u3d9Y3SHOikzkhyyo6C/ZpWJyCfUED4XqFWhsQMHh/DSP9bpLExCQz/ro 99+9UnoxHFL/hh2Q++ehUF0gwhGzxNvk9Xj05rMSWY5W2VHMBl+G1/0br AyAjdFapwWoXJsPH0DK4xm/bfU3ZNzFB8e0bExIG4UoZSw33p8M6vPMKa w==; X-CSE-ConnectionGUID: +CmlSYw/TeCo2n5/ZSbGsA== X-CSE-MsgGUID: JEHDDHN7TOmk0/t1Lly6zw== X-IronPort-AV: E=McAfee;i="6800,10657,11811"; a="81750977" X-IronPort-AV: E=Sophos;i="6.24,195,1774335600"; d="scan'208";a="81750977" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2026 15:36:29 -0700 X-CSE-ConnectionGUID: QXd1FV21SyybfKLjQwS+OA== X-CSE-MsgGUID: FkHIz45/R2OI83FfDZo2zg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,195,1774335600"; d="scan'208";a="269684752" Received: from orsosgc001.jf.intel.com ([10.88.27.185]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2026 15:36:28 -0700 From: Ashutosh Dixit To: intel-xe@lists.freedesktop.org Cc: Umesh Nerlige Ramappa Subject: [PATCH v2 5/9] drm/xe/rtp: Save OA nonpriv registers to register save/restore lists Date: Mon, 8 Jun 2026 15:36:20 -0700 Message-ID: <20260608223624.3711760-6-ashutosh.dixit@intel.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260608223624.3711760-1-ashutosh.dixit@intel.com> References: <20260608223624.3711760-1-ashutosh.dixit@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" Now we can save OA whitelisting nonpriv registers to register save/restore lists. OA nonpriv registers are saved to both hwe->oa_sr as well as hwe->reg_sr. During probe, resume and gt-reset flows KMD will apply hwe->reg_sr, ensuring OA registers are de-whitelisted after these events. For engine-reset, hwe->reg_sr is registered with GuC and GuC will apply these registers, ensuring OA registers are de-whitelisted after engine resets. hwe->oa_sr is used for whitelisting or de-whitelisting OA registers during OA operation, by toggling the 'deny' bit on oa stream open/close. v2: Provide more details in commit message (Umesh) Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/xe/xe_reg_whitelist.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_reg_whitelist.c b/drivers/gpu/drm/xe/xe_reg_whitelist.c index 0c01e289dc4bc..3925331348bff 100644 --- a/drivers/gpu/drm/xe/xe_reg_whitelist.c +++ b/drivers/gpu/drm/xe/xe_reg_whitelist.c @@ -216,6 +216,18 @@ void xe_reg_whitelist_process_engine(struct xe_hw_engine *hwe) first_oa_slot = whitelist_apply_to_hwe(hwe, &hwe->reg_whitelist, &hwe->reg_sr, 0); xe_rtp_process_to_sr(&ctx, &oa_whitelist, &hwe->oa_whitelist, false); + + /* + * Save oa nonpriv registers to hwe->oa_sr, from which oa registers are whitelisted + * or de-whitelisted, by toggling the 'deny' bit on oa stream open/close + */ + whitelist_apply_to_hwe(hwe, &hwe->oa_whitelist, &hwe->oa_sr, first_oa_slot); + + /* + * Also save oa nonpriv registers to hwe->reg_sr, to ensure oa registers are not + * whitelisted by default after probe, gt reset, resume and engine reset + */ + whitelist_apply_to_hwe(hwe, &hwe->oa_whitelist, &hwe->reg_sr, first_oa_slot); } /** -- 2.54.0