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 06D5ED591A9 for ; Mon, 18 Nov 2024 18:58:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C475610E111; Mon, 18 Nov 2024 18:58:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="cH5h3dyN"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id C97F610E111 for ; Mon, 18 Nov 2024 18:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731956307; x=1763492307; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=7vpKt/TS1ZskBgfpF7ZxOibCvksi9QnQbTP4ThAHmds=; b=cH5h3dyNR1ngbK71GzRSa6UdUrBqGAfYtdfbkSUuKjAx/jdZ8RmLXgFk zHkkQICG1MX50jorDtNk92HEcVY8qE9tDF9MrYOCcPjkaWp4Y/ms1BAJs QcrwUBocjYXGztqK3khX4nH7m4md4j8tMBk/5pIe7642Kg0BJ73CXXe4W go/jYZehr7KFHZ4iueRs+NF5sYfVsk16bZuVJRk1RUm/l5vo4y7V9Qttg aZ0i5StNyf+3IG8ZU/v/ndQvEm8ZlTaF5tAvqzS0ZpjdIOrpX5bqvinc4 EXTBr3WDdhf45DloHcfg2W9r48S2BCjD756/mTGtoEjv7m+ArMTfio7Ee Q==; X-CSE-ConnectionGUID: MrNhdVGmT4SdXq1UC7FEEg== X-CSE-MsgGUID: kEfDovE6T6C5VrtZUdIASw== X-IronPort-AV: E=McAfee;i="6700,10204,11260"; a="49365165" X-IronPort-AV: E=Sophos;i="6.12,164,1728975600"; d="scan'208";a="49365165" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2024 10:58:26 -0800 X-CSE-ConnectionGUID: 34G4HOn6RwaoAGlQLZ0ROw== X-CSE-MsgGUID: ol1xSd5sRfqv4jS0eyDT6A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,164,1728975600"; d="scan'208";a="89741720" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.142]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2024 10:58:26 -0800 Date: Mon, 18 Nov 2024 10:58:25 -0800 Message-ID: <85zflwwer2.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Harish Chegondi Cc: , , , , , , , , , Umesh Nerlige Ramappa Subject: Re: [PATCH v5 2/7] drm/xe/eustall: Introduce API for EU stall sampling In-Reply-To: <12a7988ff01a7b32a9705abd121f0b20a551673b.1731919693.git.harish.chegondi@intel.com> References: <12a7988ff01a7b32a9705abd121f0b20a551673b.1731919693.git.harish.chegondi@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 Mon, 18 Nov 2024 01:07:14 -0800, Harish Chegondi wrote: Hi Harish, Once again reviewing only the uapi for now. The patch title should contain uapi in it, so drm/xe/uapi, or drm/xe/eustall/uapi. Also, you are not recording version log for the patches. That needs to be added too. > diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h > index 4a8a4a63e99c..80aaa5b50c8a 100644 > --- a/include/uapi/drm/xe_drm.h > +++ b/include/uapi/drm/xe_drm.h > @@ -1397,6 +1397,8 @@ struct drm_xe_wait_user_fence { > enum drm_xe_observation_type { > /** @DRM_XE_OBSERVATION_TYPE_OA: OA observation stream type */ > DRM_XE_OBSERVATION_TYPE_OA, > + /** @DRM_XE_OBSERVATION_TYPE_EU_STALL: EU stall sampling observation stream type */ > + DRM_XE_OBSERVATION_TYPE_EU_STALL, > }; > > /** > @@ -1713,6 +1715,43 @@ struct drm_xe_oa_stream_info { > __u64 reserved[3]; > }; > > +/** > + * enum drm_xe_eu_stall_property_id - EU stall sampling input property ids. > + * > + * These properties are passed to the driver at open as a chain of > + * @drm_xe_ext_set_property structures with @property set to these > + * properties' enums and @value set to the corresponding values of these > + * properties. @drm_xe_user_extension base.name should be set to > + * @DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY. > + * > + * With the file descriptor obtained from open, user space must enable > + * the EU stall stream fd with @DRM_XE_OBSERVATION_IOCTL_ENABLE before > + * calling read. Good to add this. Maybe also add "EIO return from read() indicates buffer overflow" since EIO return is part of uapi. > + */ > +enum drm_xe_eu_stall_property_id { > +#define DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY 0 > + /** > + * @DRM_XE_EU_STALL_PROP_SAMPLE_RATE: Sampling rate > + * in multiples of 251 cycles. Valid values are 1 to 7. > + * If the value is 1, sampling interval is 251 cycles. > + * If the value is 7, sampling interval is 7 x 251 cycles. > + */ > + DRM_XE_EU_STALL_PROP_SAMPLE_RATE = 1, There is an unaddressed comment from Umesh about this (on the previous version), we need to address it. > + > + /** > + * @DRM_XE_EU_STALL_PROP_EVENT_REPORT_COUNT: Minimum number of > + * EU stall data rows to be present in the kernel buffer for > + * poll() to set POLLIN (data present). > + */ > + DRM_XE_EU_STALL_PROP_EVENT_REPORT_COUNT, > + > + /** > + * @DRM_XE_EU_STALL_PROP_GT_ID: GT ID of the GT on which > + * EU stall data will be captured. > + */ > + DRM_XE_EU_STALL_PROP_GT_ID, Maybe a nit, but I would make this the first property. > +}; > + > #if defined(__cplusplus) > } > #endif > -- > 2.45.1 > Thanks. -- Ashutosh