From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70D5E35677E; Fri, 7 Aug 2026 15:48:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786117724; cv=none; b=cVpQt0a7L/Xhiwe27iZp32ScegdWSf5LdqIwDjTBBoii2Tgbx85cfjRSXkpvvWFZnirjamC8jUPg4qOFfkgvoucU95cs7awIibfZzov0e9e3Vfo0ft7c1nMdqoMKGvJ6ghuqabNbkYoZtQ3LCa09coRUXPCH5SNuzFMkMdO92Zc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786117724; c=relaxed/simple; bh=yWj9fCFrHU24gLD383Tox1LqsHjAVL//OzT12nrBhtg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qDANLPfBQeUSTBQ+jlHL8UxOZ2OUNRGBa+KA51yagNgIM/M4Zj/8Htu7Ow+urptXhXwJeWBB6Qvvw2bKC+1XiqQ474qCopzcD69JMIHRe5q72UOAEckegBeU0rH7o9zDzbdWWvYemqO9SET+lQP8JQMQK5D24NrX/cznjjZtHQ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=K9tEfkNB; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="K9tEfkNB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD17A1F00A3A; Fri, 7 Aug 2026 15:48:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786117723; bh=aJM8U+hRh/d8CoTw7unlgEm7I5vCR352mTvC7yXhiPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=K9tEfkNBQWGkc7wLoE42l8ucuZ/Q0vIEqPe3fb8nXi43YVEwfaNInQNcuE9lqXihn 69U+/W7YtJ+Arhn50/sBKF3GTPQF//r9Y5dqCyEKi9l8xg1MB80hYK07EX0AGEBqGo QjFV2JYJuUaICEgEaXQJc8TAC4o4d8e9s5pF+JXY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ashutosh Dixit , Umesh Nerlige Ramappa , Sasha Levin Subject: [PATCH 7.1 419/438] drm/xe/rtp: Keep track of non-OA nonpriv slots Date: Fri, 7 Aug 2026 16:40:15 +0200 Message-ID: <20260807143436.894403471@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260807143428.008222056@linuxfoundation.org> References: <20260807143428.008222056@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ashutosh Dixit [ Upstream commit 60d49ea28bb190a640bd8dc3f4c946e0811a948c ] 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. Fixes: 828a8eaf37c3 ("drm/xe/oa: Add MMIO trigger support") Cc: stable@vger.kernel.org # v6.12+ Signed-off-by: Ashutosh Dixit Reviewed-by: Umesh Nerlige Ramappa Link: https://patch.msgid.link/20260615224227.34880-4-ashutosh.dixit@intel.com Signed-off-by: Sasha Levin --- 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 a0bbf4b745a1f..00f00002afcef 100644 --- a/drivers/gpu/drm/xe/xe_reg_whitelist.c +++ b/drivers/gpu/drm/xe/xe_reg_whitelist.c @@ -147,7 +147,7 @@ static const struct xe_rtp_entry_sr oa_whitelist[] = { }, }; -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; @@ -179,6 +179,8 @@ static void whitelist_apply_to_hwe(struct xe_hw_engine *hwe) slot++; } + + return slot; } /** @@ -192,10 +194,11 @@ 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, register_whitelist, ARRAY_SIZE(register_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, ARRAY_SIZE(oa_whitelist), &hwe->oa_whitelist, false); -- 2.53.0