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 265D7CA0EEB for ; Thu, 21 Aug 2025 11:53:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 068A610E946; Thu, 21 Aug 2025 11:53:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="OtMwwDtm"; dkim-atps=neutral Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id BBC7F10E00B; Thu, 21 Aug 2025 11:53:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1755777206; bh=gj8Ewp98g6KH3AuYkRIp4/z6BIYMV5RScmMuaTBfZz0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OtMwwDtmwa/O7ggrird2cGFI/hroLbmib4VzTSaghb7/uOklbpvCSFe9mZZoGodol 7NYNjM26c0+wW/QA95kR/E6UCcsSpc5wcVo90h5eEXfV9nKxlSEyuarkJw+5jIEOU4 ugO/IkuZjikRGQsSnH+MiASOer3itiHp2tsSVYiCWsjkZXTQd960IYyen1pEYg137H aBi9t7TDJUNqSHuPrhu0mIGBArA9MD1h7M79wC0HyvCkG2vjFu5bBxpuJEtIb1Mssd brpaYAQPly2x+LErjxR16y0mXIXd7rZG9nRoledFXM9guZnoyiZML7x1DidHwZjJ0Z VkBIHzzD9MLPA== Received: from fedora (unknown [IPv6:2a01:e0a:2c:6930:d919:a6e:5ea1:8a9f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id 8EBAB17E127B; Thu, 21 Aug 2025 13:53:25 +0200 (CEST) Date: Thu, 21 Aug 2025 13:53:20 +0200 From: Boris Brezillon To: "Danilo Krummrich" Cc: "Caterina Shablia" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Frank Binns" , "Matt Coster" , "Karol Herbst" , "Lyude Paul" , "Steven Price" , "Liviu Dudau" , "Lucas De Marchi" , Thomas =?UTF-8?B?SGVsbHN0csO2bQ==?= , "Rodrigo Vivi" , , , , , , "Asahi Lina" Subject: Re: [PATCH v4 3/7] drm/gpuvm: Pass map arguments through a struct Message-ID: <20250821135320.670f2409@fedora> In-Reply-To: References: <20250707170442.1437009-1-caterina.shablia@collabora.com> <20250707170442.1437009-4-caterina.shablia@collabora.com> Organization: Collabora X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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, 07 Jul 2025 20:44:49 +0200 "Danilo Krummrich" wrote: > On Mon Jul 7, 2025 at 7:04 PM CEST, Caterina Shablia wrote: > > +/** > > + * struct drm_gpuvm_map_req - arguments passed to drm_gpuvm_sm_map[_ops_create]() > > + */ > > +struct drm_gpuvm_map_req { > > + /** @va: virtual address related fields */ > > + struct { > > + /** @va.addr: start of the virtual address range to map to */ > > + u64 addr; > > + > > + /** @va.size: size of the virtual address range to map to */ > > + u64 range; > > + } va; > > + > > + /** @gem: GEM related fields */ > > + struct { > > + /** > > + * @obj: GEM object to map. > > + * > > + * Can be NULL if the virtual range is not backed by a GEM object. > > + */ > > + struct drm_gem_object *obj; > > + > > + /** @offset: offset in the GEM */ > > + u64 offset; > > + } gem; > > +}; > > Can't we just use struct drm_gpuva_op_map instead? The structure is identical > and represents exactly what we want, a map operation. Sure, we can do that. The only reason I didn't is because I thought it was preferable to distinguish a map request from the sub-operation it might be split into (the latter being described by drm_gpuva_op_map). > > Let's use that instead of redefining an identical structure. > > With that, > > Acked-by: Danilo Krummrich