From mboxrd@z Thu Jan 1 00:00:00 1970 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 453ACCD98E3 for ; Mon, 15 Jun 2026 22:42:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02EA210E6CC; Mon, 15 Jun 2026 22:42:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="E+4BEWlL"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C59410E54A for ; Mon, 15 Jun 2026 22:42:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1781563353; x=1813099353; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=DJfBfDK15EnpoACGDf4sb5se11MpFcv5mkXlPKEyQ3A=; b=E+4BEWlLtuGQ4eCUyo8RBr753etLuHCMqksx3s/9SblAclrn7WAhmt30 tklIGjFNvwqY9fEWtXbV1l3EyaOhX18GL3Fa9x3k35TsAY9qi/MXcma4x EauGwSQJnAOE7WSuhhkIv0TdZXwitsmoSC9SLvNl1FJ4O+Dm6nGtGlxJV jDcw31U8Kl3gnP9IdQTq8GhHq5FqTmAnlhGX2JeAGnAHNPGowhRIEDubU 4BArKSkUsE6E3QGzPY91Wzp2smVURmyRkaFwq3dhx9JEMhZxONsUjxYhc afLCYibrCQwe/pd4BjRmABfkoYSodpgtf87Cly30ugM6LxkvWFixdkebq A==; X-CSE-ConnectionGUID: FftyQ3jDTIOGpATY+mCm5w== X-CSE-MsgGUID: YHuBRjxVRquOw1J7o26XRA== X-IronPort-AV: E=McAfee;i="6800,10657,11818"; a="82513154" X-IronPort-AV: E=Sophos;i="6.24,207,1774335600"; d="scan'208";a="82513154" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2026 15:42:32 -0700 X-CSE-ConnectionGUID: uVgCk8ZoRRqvmy+mE6DDgw== X-CSE-MsgGUID: QQQ8IqVIQRqxFK4lW/QSig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,207,1774335600"; d="scan'208";a="247676800" Received: from orsosgc001.jf.intel.com ([10.88.27.185]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2026 15:42:31 -0700 From: Ashutosh Dixit To: intel-xe@lists.freedesktop.org Subject: [PATCH v3 3/9] drm/xe/rtp: Keep track of non-OA nonpriv slots Date: Mon, 15 Jun 2026 15:42:21 -0700 Message-ID: <20260615224227.34880-4-ashutosh.dixit@intel.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260615224227.34880-1-ashutosh.dixit@intel.com> References: <20260615224227.34880-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" In order to dynamically whitelist/dewhitelist OA registers on OA stream open/close, we need to keep track of nonpriv slots occupied by non-OA register whitelists. v2: Introduce hwe->nonpriv_slot (Umesh) v3: Drop hwe->nonpriv_slot (Umesh) Signed-off-by: Ashutosh Dixit Reviewed-by: Umesh Nerlige Ramappa --- drivers/gpu/drm/xe/xe_reg_whitelist.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_reg_whitelist.c b/drivers/gpu/drm/xe/xe_reg_whitelist.c index 6d642c2f6fd76..b5ae7d26e5ba3 100644 --- a/drivers/gpu/drm/xe/xe_reg_whitelist.c +++ b/drivers/gpu/drm/xe/xe_reg_whitelist.c @@ -161,7 +161,7 @@ static const struct xe_rtp_table_sr oa_whitelist = XE_RTP_TABLE_SR( }, ); -static void whitelist_apply_to_hwe(struct xe_hw_engine *hwe) +static int whitelist_apply_to_hwe(struct xe_hw_engine *hwe) { struct xe_reg_sr *sr = &hwe->reg_whitelist; struct xe_reg_sr_entry *entry; @@ -193,6 +193,8 @@ static void whitelist_apply_to_hwe(struct xe_hw_engine *hwe) slot++; } + + return slot; } /** @@ -206,9 +208,10 @@ static void whitelist_apply_to_hwe(struct xe_hw_engine *hwe) void xe_reg_whitelist_process_engine(struct xe_hw_engine *hwe) { struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(hwe); + int first_oa_slot; xe_rtp_process_to_sr(&ctx, ®ister_whitelist, &hwe->reg_whitelist, false); - whitelist_apply_to_hwe(hwe); + first_oa_slot = whitelist_apply_to_hwe(hwe); xe_rtp_process_to_sr(&ctx, &oa_whitelist, &hwe->oa_whitelist, false); } -- 2.54.0