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 18166C61DA4 for ; Thu, 16 Feb 2023 04:11:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5555A10E311; Thu, 16 Feb 2023 04:11:38 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3EFD410E311 for ; Thu, 16 Feb 2023 04:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676520696; x=1708056696; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=emOzbc6KbibHRZAPwd4JfOMNhYx/9K/lIq0kaGvjSBg=; b=fqKGB7NmLgTK6kenW/6fYGx8Rf6bgcVy5E4y50+t1KDnMu9YN0lrFuh9 NzBwfbR5JQiQl8c4cJO3KKt+gOxnfEfstjeVNXm0micCWiiIT6T+OdnKm 4Ha+KklzKcLOreSePSXeEy83YL6jTiWHmFTu4FbUllI/hhkGIgGJs5k8u myCR6mXVFcfkGCYr3a2+l69b7HFVDbfCenzKcOrS1vQzbEMUk7JB28Btb H9rWNyssrxcOdJLo3UdfeOZpnJBAGZGEtB92mPDHYKfWhrbbumCOaNWxZ bP2M0Mnfzmo+5mW1aak4GNc1+SQozpXuLevXMWA8wE01Z0i5lNb7vlOVA A==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="330260167" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="330260167" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 20:11:34 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="619858457" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="619858457" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.251.28.186]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 20:11:34 -0800 Date: Wed, 15 Feb 2023 19:58:02 -0800 Message-ID: <871qmqntx1.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa In-Reply-To: <20230215005419.2100887-3-umesh.nerlige.ramappa@intel.com> References: <20230215005419.2100887-1-umesh.nerlige.ramappa@intel.com> <20230215005419.2100887-3-umesh.nerlige.ramappa@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-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 Subject: Re: [Intel-gfx] [PATCH 2/9] drm/i915/perf: Add helper to check supported OA engines X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lionel G Landwerlin , intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, 14 Feb 2023 16:54:12 -0800, Umesh Nerlige Ramappa wrote: > > Add helper to check for supported OA engines. > > Signed-off-by: Umesh Nerlige Ramappa > --- > drivers/gpu/drm/i915/i915_perf.c | 19 ++++++++++++++++--- > 1 file changed, 16 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c > index 393a0da8b7c8..a879ae4bf8d7 100644 > --- a/drivers/gpu/drm/i915/i915_perf.c > +++ b/drivers/gpu/drm/i915/i915_perf.c > @@ -1570,6 +1570,19 @@ free_noa_wait(struct i915_perf_stream *stream) > i915_vma_unpin_and_release(&stream->noa_wait, 0); > } > > +static bool engine_supports_oa(const struct intel_engine_cs *engine) > +{ > + enum intel_platform platform = INTEL_INFO(engine->i915)->platform; > + > + if (intel_engine_is_virtual(engine)) > + return false; Let's move this check to a different (or a separate) patch (with explanation about OA and virtual engines in case of separate patch). It is strange to see this check in this patch since previously we have only supported render (I think there is only a single render engine so no virtual render engines are possible, correct?). With the changes above this is: Reviewed-by: Ashutosh Dixit Is there anything intrinsically wrong with virtual engines that we cannot get OA data for them? Since we get OA data from an OA unit not engines so wondering why this restriction. So if I have a virtual engine consisting of two VDBOX engines attached to a single OAM unit we cannot get OA data for this virtual engine? Or is just that we haven't handled such cases? In that case it is fine to disallow virtual engines till we can support them. Sorry just trying to understand the restriction.