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 063DBC369AB for ; Thu, 24 Apr 2025 18:27:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B67F110E0E4; Thu, 24 Apr 2025 18:27:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="S3zaksLE"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3147110E0E4 for ; Thu, 24 Apr 2025 18:27:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1745519232; x=1777055232; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=Piihgo9pp1XN/1tALXR67L70wfx78VLYUFKv/0d0lO8=; b=S3zaksLEWe/q5NS+IWC2s/ZHcD3wFaOYmh/VHdR2J5KYp75XfjwUOs71 +oylCm9PUGpaec1dvSd88triYWP23Gfv1Zk/S6sQP0QTrvUuvI3WuLCO4 QN0rpknWgWVnxLtxXmKqnbpCLlmFIhwoYIE5scj5vyWeRkG0QdqFaLoot +eI1bUZO/dLIJL2USebSGmemNXapJ/oka0KXE3hGcpvCI2mVSz+tBHdNs MwGcfVfRhNA4OAi/5noe/NCZj6IhZ6FUzugrDSLNYEs6rJFfxOOQM3qoz lC+QD8dpQJJKJ0KXrw9tWMCkDqZu6fewrbevvokIV8W/wSmOIGWKBfxYB Q==; X-CSE-ConnectionGUID: QAk65xiCQJKu+F+vhMhgQg== X-CSE-MsgGUID: Lo9hgFGSSr2Ifw+BwbHv+g== X-IronPort-AV: E=McAfee;i="6700,10204,11413"; a="47083326" X-IronPort-AV: E=Sophos;i="6.15,236,1739865600"; d="scan'208";a="47083326" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2025 11:27:11 -0700 X-CSE-ConnectionGUID: ECPA12dSRu2EkE/hP8fRYA== X-CSE-MsgGUID: FvoqUb1vSOW4P4sl3EAwKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,236,1739865600"; d="scan'208";a="163654420" Received: from makealii-mobl1.amr.corp.intel.com (HELO adixit-MOBL3.intel.com) ([10.125.57.82]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2025 11:27:10 -0700 Date: Thu, 24 Apr 2025 11:27:10 -0700 Message-ID: <87zfg54dq9.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Harish Chegondi Cc: , Subject: Re: [PATCH 1/1] drm/xe/eustall: Do not support EU stall on SRIOV VF In-Reply-To: References: <10db5d1c7e17aadca7078ff74575b7ffc0d5d6b8.1745215022.git.harish.chegondi@intel.com> <87fri1105c.wl-ashutosh.dixit@intel.com> <87ecxk256d.wl-ashutosh.dixit@intel.com> <874iye5uuu.wl-ashutosh.dixit@intel.com> <8734dy5f9n.wl-ashutosh.dixit@intel.com> <871pti5f0n.wl-ashutosh.dixit@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/29.4 (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, 24 Apr 2025 10:50:33 -0700, Harish Chegondi wrote: > > On Wed, Apr 23, 2025 at 10:01:44PM -0700, Dixit, Ashutosh wrote: > > On Wed, 23 Apr 2025 21:56:20 -0700, Dixit, Ashutosh wrote: > > > > > > On Wed, 23 Apr 2025 16:19:37 -0700, Dixit, Ashutosh wrote: > > > > > > > > On Wed, 23 Apr 2025 14:41:10 -0700, Harish Chegondi wrote: > > > > > > > > > > On Mon, Apr 21, 2025 at 09:25:46PM -0700, Dixit, Ashutosh wrote: > > > > > > On Mon, 21 Apr 2025 17:59:43 -0700, Dixit, Ashutosh wrote: > > > > > > > > > > > > > > On Sun, 20 Apr 2025 22:59:01 -0700, Harish Chegondi wrote: > > > > > > > > > > > > > > > > EU stall sampling is not supported on SRIOV VF. Do not > > > > > > > > initialize or open EU stall stream on SRIOV VF. > > > > > > > > > > > > > > > > Signed-off-by: Harish Chegondi > > > > > > > > --- > > > > > > > > drivers/gpu/drm/xe/xe_eu_stall.c | 3 +++ > > > > > > > > drivers/gpu/drm/xe/xe_eu_stall.h | 3 ++- > > > > > > > > 2 files changed, 5 insertions(+), 1 deletion(-) > > > > > > > > > > > > > > > > diff --git a/drivers/gpu/drm/xe/xe_eu_stall.c b/drivers/gpu/drm/xe/xe_eu_stall.c > > > > > > > > index f2bb9168967c..64788277ea52 100644 > > > > > > > > --- a/drivers/gpu/drm/xe/xe_eu_stall.c > > > > > > > > +++ b/drivers/gpu/drm/xe/xe_eu_stall.c > > > > > > > > @@ -208,6 +208,9 @@ int xe_eu_stall_init(struct xe_gt *gt) > > > > > > > > struct xe_device *xe = gt_to_xe(gt); > > > > > > > > int ret; > > > > > > > > > > > > > > > > + if (!xe_eu_stall_supported_on_platform(xe)) > > > > > > > > + return 0; > > > > > > > > > > > > > > This check is not strictly needed. If the check is not there, just some > > > > > > > unnecessary stuff will get initialized. > > > > > > > > > > > > > > But if you want to add this check here, you will also need to a > > > > > > > 'if (!gt->eu_stall)' check in xe_eu_stall_fini(). If you test this patch, > > > > > > > maybe you will already see oops when unloading the driver? > > > > > > > > > > > > > > So either remove this check or add the additional check in > > > > > > > xe_eu_stall_fini(). > > > > > > > > > > > > If you do retain this check, maybe change the > > > > > > xe_eu_stall_supported_on_platform() check in xe_eu_stall_stream_open() to > > > > > > also 'if (!gt->eu_stall)' check, I think. > > > > > > > > > > I can change the if check to 'if (!gt->eu_stall)', but at this point in > > > > > the function GT hasn't been determined yet. I will have to move the > > > > > check later in the function after GT has been determined. > > > > > > > > Sure, let's put it after the 'if (!props.gt)' check. > > > > > > Hi Harish, sorry for the noise, but I changed my mind on this. So need to > > > change xe_eu_stall_stream_open(), the patch is good as is, so this is: > > > > > > Reviewed-by: Ashutosh Dixit > > > > > > Though I do have a question: do media gt's also have eu stall hw? Since I > > > don't believe there are any gt's on media gt's, though I may be > > > wrong. Thanks. > > > > > > > Sorry: I meant "Since I don't believe there are any eu's on media > > gt's". > > You are correct, there are no Xecores (subslices) on media GTs and > therefore no EU stall HW on the media GTs. OK, so I think we'll need another patch to disallow EU stall streams being opened on media gt's, correct? > > > > > > > > gt->eu_stall = kzalloc(sizeof(*gt->eu_stall), GFP_KERNEL); > > > > > > > > if (!gt->eu_stall) { > > > > > > > > ret = -ENOMEM; > > > > > > > > diff --git a/drivers/gpu/drm/xe/xe_eu_stall.h b/drivers/gpu/drm/xe/xe_eu_stall.h > > > > > > > > index ed9d0f233566..d1c76e503799 100644 > > > > > > > > --- a/drivers/gpu/drm/xe/xe_eu_stall.h > > > > > > > > +++ b/drivers/gpu/drm/xe/xe_eu_stall.h > > > > > > > > @@ -7,6 +7,7 @@ > > > > > > > > #define __XE_EU_STALL_H__ > > > > > > > > > > > > > > > > #include "xe_gt_types.h" > > > > > > > > +#include "xe_sriov.h" > > > > > > > > > > > > > > > > size_t xe_eu_stall_get_per_xecore_buf_size(void); > > > > > > > > size_t xe_eu_stall_data_record_size(struct xe_device *xe); > > > > > > > > @@ -19,6 +20,6 @@ int xe_eu_stall_stream_open(struct drm_device *dev, > > > > > > > > > > > > > > > > static inline bool xe_eu_stall_supported_on_platform(struct xe_device *xe) > > > > > > > > { > > > > > > > > - return xe->info.platform == XE_PVC || GRAPHICS_VER(xe) >= 20; > > > > > > > > + return !IS_SRIOV_VF(xe) && (xe->info.platform == XE_PVC || GRAPHICS_VER(xe) >= 20); > > > > > > > > } > > > > > > > > #endif > > > > > > > > -- > > > > > > > > 2.48.1 > > > > > > > >