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 1448BE9A04A for ; Tue, 17 Feb 2026 21:34:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A0CAE10E137; Tue, 17 Feb 2026 21:34:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="QHAc+l5t"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id AEF6E10E137 for ; Tue, 17 Feb 2026 21:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1771364087; x=1802900087; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=2eco3Msd0jqcowzdfJ/TNHezFUUbV+8j+ur3EeXZqRg=; b=QHAc+l5tD5c54hMxKMFd+wpJzhflCIVOW+5MGXh8puKH52hkiQ7RlmxK 1baoyimF4SZ2Yeo8KrrzPA1jJHjymm/2P2UuUNDWd7IFqgg+cbp9e+1/M jcMDVgxhD6EFVwoT6k9dWCpR9fVo6ev+6NmfGwiPk8SmasLkWcsjwPVaR xE1KqvUiV3Yjn+g73iQqKB1PaQD5zyM4mtdM6kZi6Ku78uvxF1eyoHEcq 9XXtdQxAh28+PBjTR5iLpuJkKeYTGp2dCl8XdAoO0FZc5RZYeOWR/+sG1 m62Xbk+R+I/gq22r+38qn1MqvP3sxjdOvLD6IW86sO5eGW0QzhODm8xxL g==; X-CSE-ConnectionGUID: uVQ4MnW/QSGdgv8EGElmbA== X-CSE-MsgGUID: P37or4sxRX68zJrGiTyCNw== X-IronPort-AV: E=McAfee;i="6800,10657,11704"; a="83161907" X-IronPort-AV: E=Sophos;i="6.21,297,1763452800"; d="scan'208";a="83161907" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2026 13:34:47 -0800 X-CSE-ConnectionGUID: JYm0SK7jSU6nGj01gi8SAw== X-CSE-MsgGUID: zsnprwNLSAylf6Lpi7vf3Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,297,1763452800"; d="scan'208";a="213848394" Received: from unknown (HELO adixit-MOBL3.intel.com) ([10.241.243.87]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2026 13:34:47 -0800 Date: Tue, 17 Feb 2026 13:34:46 -0800 Message-ID: <87ikbvawax.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Matt Roper Cc: intel-xe@lists.freedesktop.org, Michal Wajdeczko Subject: Re: [PATCH v3 1/4] drm/xe/reg_sr: Don't process gt/hwe lists in VF In-Reply-To: <20260213000929.732113-7-matthew.d.roper@intel.com> References: <20260213000929.732113-6-matthew.d.roper@intel.com> <20260213000929.732113-7-matthew.d.roper@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII 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" On Thu, 12 Feb 2026 16:09:31 -0800, Matt Roper wrote: > Hi Matt, > diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c > index 4d3ee5226e3a..7061312ce6b5 100644 > --- a/drivers/gpu/drm/xe/xe_hw_engine.c > +++ b/drivers/gpu/drm/xe/xe_hw_engine.c > @@ -472,6 +472,9 @@ hw_engine_setup_default_state(struct xe_hw_engine *hwe) > }, > }; > > + if (IS_SRIOV_VF(gt_to_xe(gt))) > + return; > + I was thinking, instead of having this check in multiple places, this check should be moved inside xe_rtp_process_to_sr(). And then we should tell xe_rtp_process_to_sr() whether to skip or to continue somehow. We could either: a. add a "type" field (gt/hwe/lrc) to either reg_sr or to ctx, or, b. add another 'vf' argument to xe_rtp_process_to_sr() ('vf' would be say 1 for lrc and 0 for other cases). And based on this information xe_rtp_process_to_sr() would either skip or continue for VF's. Thanks. -- Ashutosh > xe_rtp_process_to_sr(&ctx, engine_entries, ARRAY_SIZE(engine_entries), &hwe->reg_sr); > } > > diff --git a/drivers/gpu/drm/xe/xe_reg_sr.c b/drivers/gpu/drm/xe/xe_reg_sr.c > index d3e13ea33123..1ac911fc6e94 100644 > --- a/drivers/gpu/drm/xe/xe_reg_sr.c > +++ b/drivers/gpu/drm/xe/xe_reg_sr.c > @@ -13,6 +13,7 @@ > #include > #include > > +#include "xe_assert.h" > #include "xe_device.h" > #include "xe_device_types.h" > #include "xe_force_wake.h" > @@ -169,8 +170,11 @@ void xe_reg_sr_apply_mmio(struct xe_reg_sr *sr, struct xe_gt *gt) > if (xa_empty(&sr->xa)) > return; > > - if (IS_SRIOV_VF(gt_to_xe(gt))) > - return; > + /* > + * We don't process non-LRC reg_sr lists in VF, so they should have > + * been empty in the check above. > + */ > + xe_gt_assert(gt, !IS_SRIOV_VF(gt_to_xe(gt))); > > xe_gt_dbg(gt, "Applying %s save-restore MMIOs\n", sr->name); > > diff --git a/drivers/gpu/drm/xe/xe_reg_whitelist.c b/drivers/gpu/drm/xe/xe_reg_whitelist.c > index 9c513778d370..83b2d1c68acf 100644 > --- a/drivers/gpu/drm/xe/xe_reg_whitelist.c > +++ b/drivers/gpu/drm/xe/xe_reg_whitelist.c > @@ -188,6 +188,9 @@ void xe_reg_whitelist_process_engine(struct xe_hw_engine *hwe) > { > struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(hwe); > > + if (IS_SRIOV_VF(gt_to_xe(hwe->gt))) > + return; > + > xe_rtp_process_to_sr(&ctx, register_whitelist, ARRAY_SIZE(register_whitelist), > &hwe->reg_whitelist); > whitelist_apply_to_hwe(hwe); > diff --git a/drivers/gpu/drm/xe/xe_tuning.c b/drivers/gpu/drm/xe/xe_tuning.c > index 316f5e2b2e48..ddd8519f3f19 100644 > --- a/drivers/gpu/drm/xe/xe_tuning.c > +++ b/drivers/gpu/drm/xe/xe_tuning.c > @@ -15,6 +15,7 @@ > #include "xe_gt_types.h" > #include "xe_platform_types.h" > #include "xe_rtp.h" > +#include "xe_sriov.h" > > #undef XE_REG_MCR > #define XE_REG_MCR(...) XE_REG(__VA_ARGS__, .mcr = 1) > @@ -197,6 +198,9 @@ void xe_tuning_process_gt(struct xe_gt *gt) > { > struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(gt); > > + if (IS_SRIOV_VF(gt_to_xe(gt))) > + return; > + > xe_rtp_process_ctx_enable_active_tracking(&ctx, > gt->tuning_active.gt, > ARRAY_SIZE(gt_tunings)); > @@ -208,6 +212,9 @@ void xe_tuning_process_engine(struct xe_hw_engine *hwe) > { > struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(hwe); > > + if (IS_SRIOV_VF(gt_to_xe(hwe->gt))) > + return; > + > xe_rtp_process_ctx_enable_active_tracking(&ctx, > hwe->gt->tuning_active.engine, > ARRAY_SIZE(engine_tunings)); > diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c > index 843ce9fe7aab..92547280a5b6 100644 > --- a/drivers/gpu/drm/xe/xe_wa.c > +++ b/drivers/gpu/drm/xe/xe_wa.c > @@ -1003,6 +1003,9 @@ void xe_wa_process_gt(struct xe_gt *gt) > { > struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(gt); > > + if (IS_SRIOV_VF(gt_to_xe(gt))) > + return; > + > xe_rtp_process_ctx_enable_active_tracking(&ctx, gt->wa_active.gt, > ARRAY_SIZE(gt_was)); > xe_rtp_process_to_sr(&ctx, gt_was, ARRAY_SIZE(gt_was), >->reg_sr); > @@ -1021,6 +1024,9 @@ void xe_wa_process_engine(struct xe_hw_engine *hwe) > { > struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(hwe); > > + if (IS_SRIOV_VF(gt_to_xe(hwe->gt))) > + return; > + > xe_rtp_process_ctx_enable_active_tracking(&ctx, hwe->gt->wa_active.engine, > ARRAY_SIZE(engine_was)); > xe_rtp_process_to_sr(&ctx, engine_was, ARRAY_SIZE(engine_was), &hwe->reg_sr); > -- > 2.53.0 >