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 8D62CC4725D for ; Sat, 20 Jan 2024 02:50:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A1A710EAED; Sat, 20 Jan 2024 02:50:10 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 480B710EAED for ; Sat, 20 Jan 2024 02:50:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705719008; x=1737255008; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=D/dI+Ax+i13u6HN8xBG63mY2kvYzFz3d+IDv9vPIaHg=; b=ChF/47NREwnBZuocoU+IXwWNFhUm8PppWMII01h73drvW6EliU/OEwkS 2GDEFsY09PBE6eCUKtWlRgURfF4JBa/9lfAUMHDXvFPvsgaFa6m4JwpKB Y5GiESgZdNWrKvX+AMLd+Z8qnxtTrObJrNI7e3Gb1HPDIFpoxgxdgOS9c RpB27yj0FymXNUei5XPvcH7TlpP6th3KTybvnchRpataeXJ/4TZJbYWmG q6yqFjDbsA3gCKQWbc/vQcx3cl6ZtgT5KdBQ3BjYIjwGxBlqOfdzmn8hh 6F+zxPJT4433hLAICqXrArjjiW3CMaVVoAF7XWSjcHlM8UM5GIh+14Lez w==; X-IronPort-AV: E=McAfee;i="6600,9927,10957"; a="779498" X-IronPort-AV: E=Sophos;i="6.05,206,1701158400"; d="scan'208";a="779498" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2024 18:50:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,206,1701158400"; d="scan'208";a="26912884" Received: from orsosgc001.jf.intel.com (HELO unerlige-ril.intel.com) ([10.165.21.138]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2024 18:50:08 -0800 Date: Fri, 19 Jan 2024 18:50:06 -0800 Message-ID: <85y1ckbtwh.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa Subject: Re: [PATCH 09/17] drm/xe/oa/uapi: Expose OA stream fd In-Reply-To: References: <20231208064329.2387604-1-ashutosh.dixit@intel.com> <20231208064329.2387604-10-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: , Cc: intel-xe@lists.freedesktop.org Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Tue, 19 Dec 2023 18:52:58 -0800, Umesh Nerlige Ramappa wrote: > > On Thu, Dec 07, 2023 at 10:43:21PM -0800, Ashutosh Dixit wrote: > > The OA stream open perf op returns an fd with its own file_operations for > > the newly initialized OA stream. These file_operations allow userspace to > > enable or disable the stream, as well as apply a different metric > > configuration for the OA stream. Userspace can also poll for data > > availability. OA stream initialization is completed in this commit by > > enabling the OA stream. When sampling is enabled this starts a hrtimer > > which periodically checks for data availablility. > > > > Signed-off-by: Ashutosh Dixit > > lgtm > > Reviewed-by: Umesh Nerlige Ramappa Thanks, though the question here is can we avoid introducing the read() interface and can just do with mmap. For v8, I'm assuming we need read() too, but let's revisit afterwards. Thanks. -- Ashutosh