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 B8E8EC48260 for ; Tue, 13 Feb 2024 07:09:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7149710E662; Tue, 13 Feb 2024 07:09:44 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="mASYxsVx"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id BA6E710E244 for ; Tue, 13 Feb 2024 07:09:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707808183; x=1739344183; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=5o37nxg3cjWxDZ7PhH2qryef/l4dTfiJ4H4dGASiCXo=; b=mASYxsVxkrByjCiUiOFQjWcyVhJW8sd1KlhOliJtpIjLzeGjHpWgyZ34 WgB3FCwaojqhRlTZ3jChfNxdqvfn/iT+OQTBJFs6knc3lGzrmYDc5crwe FcsH/w6DcuCCxpsln71lPHGrDrqKiyC3eKyOEiVowH1nuFyQActNes3bt 7McFaPEQzq90txGfcmrOQtANt+HL8eetDmkf1k09rszjT36zuUmOVIOz3 JrWpa3WQzqG654AQ0cCAgLBHwuNBnyIqTUzBdxu9s8Qt5GjpotO1gES3x EImwFFFKtuf/jf93h8Qv2DMuVkAuPXaHlY4wVVbqtvubhTEqViAFlcumQ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="4769628" X-IronPort-AV: E=Sophos;i="6.06,156,1705392000"; d="scan'208";a="4769628" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2024 23:09:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,156,1705392000"; d="scan'208";a="3185060" Received: from orsosgc001.jf.intel.com (HELO unerlige-ril.intel.com) ([10.165.21.138]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2024 23:09:41 -0800 Date: Mon, 12 Feb 2024 23:09:41 -0800 Message-ID: <85ttmcvo0a.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa Cc: intel-xe@lists.freedesktop.org Subject: Re: [PATCH 13/16] drm/xe/oa/uapi: Query OA unit properties In-Reply-To: References: <20240208054916.3788133-1-ashutosh.dixit@intel.com> <20240208054916.3788133-14-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 Mon, 12 Feb 2024 11:59:30 -0800, Umesh Nerlige Ramappa wrote: > Hi Umesh, > On Wed, Feb 07, 2024 at 09:49:13PM -0800, Ashutosh Dixit wrote: > > @@ -1411,6 +1412,68 @@ enum drm_xe_oa_unit_type { > > DRM_XE_OA_UNIT_TYPE_OAM, > > }; > > > > +/** > > + * struct drm_xe_oa_unit - describe OA unit > > + */ > > +struct drm_xe_oa_unit { > > + /** @oa_unit_id: OA unit ID */ > > + __u32 oa_unit_id; > > + > > + /** @oa_unit_type: OA unit type of @drm_xe_oa_unit_type */ > > + __u32 oa_unit_type; > > + > > + /** > > + * @capabilities: OA capabilities bit-mask: this is a bit-mask of > > + * property id's in enum @drm_xe_oa_property_id > > + */ > > + __u64 capabilities; > > IMO, this should be a specific set of flags that are defined as and when we > add new features so that it helps UMDs detect them. Some features or > behaviors may be independent of the properties, so a 1:1 mapping to > properties may not be the best solution. In the past we have had i915 perf > revision bumps even when we haven't added a new property (For ex: when we > supported media engines in i915 - class:instance properties were already > present and we just added support for OAM in that case. For such cases > capabilities would define a new bit, but not properties). > > The first set of properties defined with this series should not need a > capabilities entry. If the uApi changes in future or adds new features, we > need to use these bits. OK, I went ahead and implemented this. Though after this, this seems more like a version to me, rather than capabilities. The only difference being, instead of incrementing the version, we add bits to the capabilities. Which seems fine. I did pick a DRM_XE_OA_CAPS_BASE value of 1: https://patchwork.freedesktop.org/patch/578014/?series=121084&rev=10 Thanks. -- Ashutosh