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 C1E8BC4167B for ; Thu, 30 Nov 2023 20:53:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FC1410E79C; Thu, 30 Nov 2023 20:53:52 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2805A10E782 for ; Thu, 30 Nov 2023 20:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701377631; x=1732913631; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=vTFusqKJ9hIZW4WP8BTgK4sJcVkSgCYOLXGjI0vPuNo=; b=CULLXr5Bgxt+dnxXWTucyq8VoI2EdPb3RK0IAnVLF2aT1YmRbVTM3wzL qVgCiTuPRfTr43L8vyWwmc/94tipO43xF7sBhqi58onP14/fB0LrTbckF bxB3J90EKga2xnivadxVBu3Dh8YvoJyY9J55tqh4fep33xJuXm9uYSdRb Y/tXvgALKbnl0l3i3WrCJtrvAWrSn0UkaHE3qil4UmYKDUyZkqBB69vCU DEE3FF3P8P9EBm1loHDJI2Np3XsaBlvIX5YOYp/nN5EIgVrPuf6NIK9FN g3TOOORwK51Y9I6AXxKy9tqIzBtI8KQm9xo5eJ61WWr1LuaPqr0ebP/N1 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="390555629" X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="390555629" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 12:53:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="17227214" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.212.192.252]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 12:53:50 -0800 Date: Thu, 30 Nov 2023 12:53:29 -0800 Message-ID: <8734wnyncm.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Francois Dugast In-Reply-To: <20231122143833.7-6-francois.dugast@intel.com> References: <20231122143833.7-1-francois.dugast@intel.com> <20231122143833.7-6-francois.dugast@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 v2 05/14] drm/xe/uapi: Align on a common way to return arrays (memory regions) 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, Rodrigo Vivi Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Wed, 22 Nov 2023 06:38:24 -0800, Francois Dugast wrote: > > diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h > index da10d946930b..a9bbdf141fe2 100644 > --- a/include/uapi/drm/xe_drm.h > +++ b/include/uapi/drm/xe_drm.h > @@ -182,10 +182,10 @@ enum drm_xe_memory_class { > }; > > /** > - * struct drm_xe_query_mem_region - Describes some region as known to > + * struct drm_xe_mem_region - Describes some region as known to > * the driver. > */ > -struct drm_xe_query_mem_region { > +struct drm_xe_mem_region { > /** > * @mem_class: The memory class describing this region. > * > @@ -322,12 +322,12 @@ struct drm_xe_query_engine_cycles { > * struct drm_xe_query_mem_regions in .data. > */ > struct drm_xe_query_mem_regions { > - /** @num_regions: number of memory regions returned in @regions */ > - __u32 num_regions; > + /** @num_mem_regions: number of memory regions returned in @mem_regions */ > + __u32 num_mem_regions; > /** @pad: MBZ */ > __u32 pad; > - /** @regions: The returned regions for this device */ > - struct drm_xe_query_mem_region regions[]; > + /** @mem_regions: The returned memory regions for this device */ > + struct drm_xe_mem_region mem_regions[]; General question/comment about these query struct's. We have stuck xe_user_extension's into struct's going into the kernel but haven't done that for data coming out of the kernel (i.e. these kinds of query structs). There are basically two options here: * If the query data struct needs to change, invent a new query, e.g. instead of DRM_XE_DEVICE_QUERY_MEM_REGIONS have a new DRM_XE_DEVICE_QUERY_MEM_REGIONS_v2. * The other option is to have xe_user_extension's in these query struct's too and provide the new query struct via the xe_user_extension (rather than add DRM_XE_DEVICE_QUERY_MEM_REGIONS_v2). So slight difference I think. Comments? Incidentally for some reason 'struct drm_xe_exec_queue_get_property' does have an 'extensions' field.