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 9982DE936F9 for ; Thu, 5 Oct 2023 03:32:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC46610E1A6; Thu, 5 Oct 2023 03:32:13 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E5CE10E110 for ; Thu, 5 Oct 2023 03:32: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=1696476732; x=1728012732; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=ApZca58g6C59gloNCAj02H5KyY6DVZkT4gV4ZnXrYqw=; b=RKrovqJsykFVjT2kHEZw0k6SM6/5CyZB2mP51d1aRTnmqf1QX27aqksE 79JUlN63+i+8+71Y4ZgjpvQsvCuh2x8KFYGwRRz7OTfM+rvTP4l8128Nr lbQEpurxIu6v+rCgq+UbX2C7dwwtznvkybcS9F2Zp3C1wVU7BDyAdIiyu /9oq2VACCcOrZev97kdFJe1RDmqewVqT+5cN49stiKkiNnSCqz6OEF7QL SVx8d+/QWPgCR2de5ZdrdujPDdAZiUEV/76gxqBsxZsxIUZtSOb1Bsy86 STICwM8obeKw3pnV/kx0YKhHT1ZMUKFiQ1yvf3XzFxamw2zvAw3fEXTpk A==; X-IronPort-AV: E=McAfee;i="6600,9927,10853"; a="383290516" X-IronPort-AV: E=Sophos;i="6.03,201,1694761200"; d="scan'208";a="383290516" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2023 20:32:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10853"; a="701480689" X-IronPort-AV: E=Sophos;i="6.03,201,1694761200"; d="scan'208";a="701480689" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.101.181]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2023 20:32:09 -0700 Date: Wed, 04 Oct 2023 20:28:59 -0700 Message-ID: <87r0m921dw.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa In-Reply-To: References: <20230919161049.2307855-1-ashutosh.dixit@intel.com> <20230919161049.2307855-20-ashutosh.dixit@intel.com> <87fs3axfia.wl-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 Subject: Re: [Intel-xe] [PATCH 19/21] drm/xe/uapi: Drop OA_IOCTL_VERSION 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, 03 Oct 2023 19:37:58 -0700, Umesh Nerlige Ramappa wrote: > > On Tue, Sep 19, 2023 at 10:02:53AM -0700, Dixit, Ashutosh wrote: > > On Tue, 19 Sep 2023 09:10:47 -0700, Ashutosh Dixit wrote: > >> > >> OA version was previously used to track which OA properties were introduced > >> at which version. However OA version is an outlier in that a similar > >> version is not used anywhere else in the kernel. > > > > This is not strictly true. E.g. AMD's include/uapi/linux/kfd_ioctl.h > > contains KFD_IOCTL_MAJOR_VERSION/KFD_IOCTL_MINOR_VERSION. > > > >> For XE, we will track addition of new properties by means of > >> xe_user_extension. Userland can either maintain a mapping of OA properties > >> against the kernel version, or rely on return codes (e.g. ENOTSUPP) to > >> "discover" OA properties. > > > > But let's see if we need a version for OA or the kernel version itself is > > sufficient. > > > >> > >> Suggested-by: Umesh Nerlige Ramappa > >> Signed-off-by: Ashutosh Dixit > > ok, if there is precedence for a version, no harm adding it, but I agree > that we should see if there are ways to do this with the generic OA > query. For features that are added with extensions, it's taken care of > inherently. Afaiu, in this case userland is still relying on return codes from the kernel to discover available features, whereas a version or capability flags allow userland to know available features a priori without "discovery" by means of return codes. > Sometimes there are features that are internal to the implementation that > the user might want to know. Those may need to be exposed via > capabilities/flags in the generic oa/perf query. I agree that capability flags do appear to be a better option than a version. But in i915 we could update the version without modifying the uapi header, which we cannot do if we have capability flags (we'd e.g. at least have to expose a new capability bit). Is modifying the uapi header a concern? Both the version and capability flags can be easily included in the oa_info struct we are considering now. Thanks. -- Ashutosh