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 18DBDC35274 for ; Tue, 19 Dec 2023 03:00:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E27AD10E16C; Tue, 19 Dec 2023 03:00:13 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 52C3110E16C for ; Tue, 19 Dec 2023 03:00:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702954813; x=1734490813; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=rS7PJJNeJnBXl/otI7vbjRjURXwyZNfnX3np46sZXDE=; b=Yr5xROVE/B6TPKkUAI5P9Z8GO/0OnYtMruqwwcR9Zb/Z1t7DJL8XZy9v CqCHoNlRyCKFvyy0eQjY9txBxUZ1IReKS5u6cS9t7jUDYLfAXP3a5asu4 USjUTLnrZM+0QiwLhF4M8hpQl1ilcvoEm4gRV7dgzsKfoyJteaq/DC2LQ mpbFeKhQ5qKrm7y8Win0tosWHqGHGG1xpX/mHHkMGtgOQ9e2fEgLFAqx9 aZqUgB9/RHDuly0QcKgU7YTrjo0my9BLF3FldM9xJEcMRruwZumH9SZFE jlNY+PZZFZNfQg3yyEsuokq8cVDyNWqnvlyWxJf8CqfcF8D/aGqVCvUA4 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="14288060" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="14288060" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 19:00:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="949021272" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="949021272" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.85.106]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 19:00:11 -0800 Date: Mon, 18 Dec 2023 18:59:57 -0800 Message-ID: <875y0uvqvm.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: intel-xe@lists.freedesktop.org Subject: Re: [PATCH 07/17] drm/xe/oa/uapi: Define and parse OA stream properties In-Reply-To: <20231208064329.2387604-8-ashutosh.dixit@intel.com> References: <20231208064329.2387604-1-ashutosh.dixit@intel.com> <20231208064329.2387604-8-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/29.1 (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 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: Harish Chegondi , gzadicario@habana.ai, Robert Krzemien Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Thu, 07 Dec 2023 22:43:19 -0800, Ashutosh Dixit wrote: > > + /** > + * @DRM_XE_OA_PROPERTY_OPEN_FLAGS: CLOEXEC and NONBLOCK flags are > + * directly applied to returned OA fd. DISABLED opens the OA stream in a > + * DISABLED state (see @DRM_XE_PERF_IOCTL_ENABLE). > + */ > + DRM_XE_OA_PROPERTY_OPEN_FLAGS, > +#define DRM_XE_OA_FLAG_FD_CLOEXEC (1 << 0) > +#define DRM_XE_OA_FLAG_FD_NONBLOCK (1 << 1) > +#define DRM_XE_OA_FLAG_DISABLED (1 << 2) I am wondering why these flags should be part of this uapi: * O_CLOEXEC and O_NONBLOCK can be set on the returned stream fd using fcntl (see man 2 fcntl) * DRM_XE_OA_FLAG_DISABLED can just be a stream open property, doesn't need to be a fd flag. Comments? Thanks. -- Ashutosh