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 08B1CC48297 for ; Tue, 6 Feb 2024 22:58:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D7F210EC13; Tue, 6 Feb 2024 22:58:28 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ldBx0u7V"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1D9A7112F17 for ; Tue, 6 Feb 2024 22:58:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707260305; x=1738796305; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=PpW4DbJFt7csAroU8MrRhTw4UOB6kdRScP5/9FDujVQ=; b=ldBx0u7VofXSVGRRQSXSKEVVdjiJztX6qnHz4AROYuLghsNszcN/0NCN MfHkLKw7PE5f21G7W7XMe7Ulzhl987fJ7bQLV+T4CTuefxzWbifxQvwj2 Tjvv5tz3khu3k4cnJBc9AxrjMnbsecW9DsEQw7CFOZbXSjyIH/nyzAXC6 rn9RSfvYHXSR9WeNHwSTOYS/UNB20qrg982JVcQokvLstld/WC9clMuHe xkD4bTUFeoUHHJs0Y3Q1WDkyXMUQkxiJGVHp/znVXOYt7esYJbYGP+1R1 OH+voh2qs5x4SjbBkVrNzjZzaTmfZ02+Cxos/VX8x7nMhNnF6CroJhAQd g==; X-IronPort-AV: E=McAfee;i="6600,9927,10976"; a="395278307" X-IronPort-AV: E=Sophos;i="6.05,248,1701158400"; d="scan'208";a="395278307" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 14:58:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,248,1701158400"; d="scan'208";a="1140846" Received: from orsosgc001.jf.intel.com (HELO unerlige-ril.intel.com) ([10.165.21.138]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 14:58:22 -0800 Date: Tue, 06 Feb 2024 14:58:21 -0800 Message-ID: <857cjhb3oy.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa Cc: intel-xe@lists.freedesktop.org Subject: Re: [PATCH 06/16] drm/xe/oa/uapi: Define and parse OA stream properties In-Reply-To: References: <20240120020026.1261201-1-ashutosh.dixit@intel.com> <20240120020026.1261201-7-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/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 Tue, 06 Feb 2024 14:25:21 -0800, Umesh Nerlige Ramappa wrote: > > On Fri, Jan 19, 2024 at 06:00:16PM -0800, Ashutosh Dixit wrote: > > Properties for OA streams are specified by user space, when the stream is > > opened, as a chain of drm_xe_ext_set_property struct's. Parse and validate > > these stream properties. > > > > v2: Remove struct drm_xe_oa_open_param (Harish Chegondi) > > Drop DRM_XE_OA_PROPERTY_POLL_OA_PERIOD_US (Umesh) > > Eliminate comparison with xe_oa_max_sample_rate (Umesh) > > Drop 'struct drm_xe_oa_record_header' (Umesh) > > > > Signed-off-by: Ashutosh Dixit > > --- > > drivers/gpu/drm/xe/xe_oa.c | 344 +++++++++++++++++++++++++++++++++++ > > drivers/gpu/drm/xe/xe_oa.h | 6 + > > drivers/gpu/drm/xe/xe_perf.c | 2 + > > include/uapi/drm/xe_drm.h | 69 +++++++ > > 4 files changed, 421 insertions(+) > > > ... > > + > > +static int xe_oa_user_extensions(struct xe_oa *oa, u64 extension, int ext_number, > > + struct xe_oa_open_param *param) > > +{ > > + u64 __user *address = u64_to_user_ptr(extension); > > + struct drm_xe_user_extension ext; > > + int err; > > + u32 idx; > > + > > + if (XE_IOCTL_DBG(oa->xe, ext_number >= DRM_XE_OA_PROPERTY_MAX)) > > + return -E2BIG; > > If we want to pass multiple exec_q id params (like discussed offline), this > check will limit it. I think, for now, we can leave it as is until such a > use case arises. Correct, there are other limitations in the code today e.g. there is a single hwe associated with a stream. So if say we want to have both a render and a compute exec_q associated with a stream, other changes in the code are needed to make it work. I am tracking this task but it will need to be discussed and done after we merge the initial code. The uapi supports this use case today (except for the check above) but the implementation doesn't. > rest lgtm, > > Reviewed-by: Umesh Nerlige Ramappa Thanks. -- Ashutosh