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 B723AC27C53 for ; Wed, 19 Jun 2024 22:57:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 779D810E296; Wed, 19 Jun 2024 22:57:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="H7g3Urdk"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 27F5D10E296 for ; Wed, 19 Jun 2024 22:57:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718837863; x=1750373863; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=RFB1YaWiU0+rby+ACYi2WC2uVR4G+59Lkf7oJVNJ6yY=; b=H7g3Urdk8gcU1bo9UylwxlDxDzXd3HFsiTQYyzOB5TvvGcYIMqF416AV uxOn3s/WFrLFlnD/+wkiyRCi9sWvzQtoOgUEJpXvORi28Xpojf4gR3A5c 5HRDZ19JGVlKCCg1jLEJI2iSJgwpZ2EtDOZ3zwOl7d0FTrqKWts/xTEfF wPV1Ao9DRuyt2D0aXFFO0IbNXZ6/Y0+VbMrAfhy4SZX+OT6OeV6i9Iftf fPJxvuTPpjC2E+mPaNAgJjAHTcWA5dzlJzoObxW+BBDZSLBPKtKWOjjCp WNcGKPr7rfDv6d4QQMtUtkX5HScZ0AKzZ1C1W4Alxx1SpKdQmDVEqyLLO w==; X-CSE-ConnectionGUID: ofFwtOtVTdO8Gj2GAmOoHg== X-CSE-MsgGUID: +1rOlgvGQomp8gkDd/ONBg== X-IronPort-AV: E=McAfee;i="6700,10204,11108"; a="18706857" X-IronPort-AV: E=Sophos;i="6.08,251,1712646000"; d="scan'208";a="18706857" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2024 15:57:42 -0700 X-CSE-ConnectionGUID: eF5+NSnDTjq+KVdYgBCRjQ== X-CSE-MsgGUID: M2IzJnoVTge4E0we0z8yvg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,251,1712646000"; d="scan'208";a="46505263" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.138]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2024 15:57:43 -0700 Date: Wed, 19 Jun 2024 15:57:42 -0700 Message-ID: <855xu4r15l.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Michal Wajdeczko Cc: Subject: Re: [PATCH 5/9] drm/xe/vf: Don't initialize OA if VF In-Reply-To: <73d602b1-6042-47b9-9b35-396ce72a3788@intel.com> References: <20240619214557.905-1-michal.wajdeczko@intel.com> <20240619214557.905-6-michal.wajdeczko@intel.com> <85a5jgr3zj.wl-ashutosh.dixit@intel.com> <858qz0r3ce.wl-ashutosh.dixit@intel.com> <73d602b1-6042-47b9-9b35-396ce72a3788@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/28.2 (x86_64-redhat-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 Wed, 19 Jun 2024 15:40:43 -0700, Michal Wajdeczko wrote: > > On 20.06.2024 00:10, Dixit, Ashutosh wrote: > > On Wed, 19 Jun 2024 14:56:32 -0700, Dixit, Ashutosh wrote: > >> > >> On Wed, 19 Jun 2024 14:45:53 -0700, Michal Wajdeczko wrote: > >>> > >>> We don't support Observation Architecture on the VF device. > >>> > >>> Signed-off-by: Michal Wajdeczko > >>> Cc: Rodrigo Vivi > >>> Cc: Ashutosh Dixit > >>> --- > >>> drivers/gpu/drm/xe/xe_oa.c | 4 ++++ > >>> 1 file changed, 4 insertions(+) > >>> > >>> diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c > >>> index 34206e0b6a08..f54a97954452 100644 > >>> --- a/drivers/gpu/drm/xe/xe_oa.c > >>> +++ b/drivers/gpu/drm/xe/xe_oa.c > >>> @@ -35,6 +35,7 @@ > >>> #include "xe_perf.h" > >>> #include "xe_pm.h" > >>> #include "xe_sched_job.h" > >>> +#include "xe_sriov.h" > >>> > >>> #define DEFAULT_POLL_FREQUENCY_HZ 200 > >>> #define DEFAULT_POLL_PERIOD_NS (NSEC_PER_SEC / DEFAULT_POLL_FREQUENCY_HZ) > >>> @@ -2385,6 +2386,9 @@ int xe_oa_init(struct xe_device *xe) > >>> if (XE_WARN_ON(!xe_device_uc_enabled(xe)) || XE_WARN_ON(GRAPHICS_VER(xe) < 12)) > >>> return 0; > >>> > >>> + if (IS_SRIOV_VF(xe)) > >>> + return 0; > >>> + > >> > >> Do we want to add XE_WARN_ON's > > > > Though maybe not, if we don't want to see the WARN_ON when loading the VF driver... > > yep, we don't want WARN on every VF boot > > and TBH IMO above XE_WARN_ON are all wrong, as: > > - why WARN if someone used legal param xe.force_execlist ? > we can rely on existing drm_dbg() when someone will attempt to use oa > > - why WARN if Xe driver by design does not support gen < 12 ? > if you want to be paranoid just add xe_assert() to document that I agree, best to get rid of these WARN_ON's (xe_assert will also cause a crash which we don't want). The ioctl's have drm_dbg's which should be sufficient as you say. I just sent a patch to do this: https://patchwork.freedesktop.org/series/135081/ Could you please take a look at this. Thanks. > > > > >> or combine this if statement with the previous one? > >> > >> In any case: > >> > >> Reviewed-by: Ashutosh Dixit > > thanks > > >> > >> > >>> oa->xe = xe; > >>> oa->oa_formats = oa_formats; > >>> > >>> -- > >>> 2.43.0 > >>>