From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EEE8286409 for ; Thu, 21 Aug 2025 12:21:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755778918; cv=none; b=ok6MeP8TQuSpqKHwk+DKnuHAT+l9BVXZNVD9FmZKVCSqaSSM5Cj0YHjltjNetTFlwaQkANAv4Lt6Wd2GFUL7NQO0TIzMIC94asRZBtKjNbxneTTXpbtq4EDUEwaKws86mG6QsupAei8yhGfR9QshJmCv5ZO8IcS4TPYfhaMfNK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755778918; c=relaxed/simple; bh=uP1N1902khxh6xGxbKqeAltpkKMdvPiQyeNvSgMbdpg=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Y5TzhQeGX7q0mRLCuFphH90UKM0j5Kv4sLeyBRzz4m/lrRqpDRTEpn5yCdp2cxCSaBIOrMsN6vjKlF08eYWumORdxu3WdCL4FTspIc54nnVqvpgCvJut7MPB28noU3oV+Ho9ud7gUHGdAbsmUpLUsHVmJOctHm3k413bHwGcur8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=CndxvURl; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="CndxvURl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1755778915; bh=uP1N1902khxh6xGxbKqeAltpkKMdvPiQyeNvSgMbdpg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CndxvURl8YRl4ufGEM+GjYWLpYiY8hZ4yNeYQxANE//lzFpjLeQ5xBGiG8px8nN/j f1Z3jVy2MRt/k+6O3ravflwR7nc/UWJRrl/Dr+i4+YUU32FLiKFnAbY7LM6w43OANL l0UW9s8IqcV7aHW6BxrqtfnOkCi7n2w5i58kK5gx8UxwoM5yGezybxh51r6Z32cu/v Cnc2Bp+sTTIpk2i592uNy2AMrdbiF9xfFNN/WdFySQ1cgGQqWJLtzeyUHHd/r4keq7 CVbTEt+VPJjNWucyQ6MN6Rl0AZ0htZS1726XzxLERF5D2TJmrWUzZbM6Aghwf0IIkl 4hvHtF7HUB7FQ== 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 548D317E110D; Thu, 21 Aug 2025 14:21:54 +0200 (CEST) Date: Thu, 21 Aug 2025 14:21:50 +0200 From: Boris Brezillon To: Adrian Larumbe Cc: Caterina Shablia , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Frank Binns , Matt Coster , Karol Herbst , Lyude Paul , Danilo Krummrich , Steven Price , Liviu Dudau , Lucas De Marchi , Thomas =?UTF-8?B?SGVsbHN0csO2bQ==?= , Rodrigo Vivi , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, intel-xe@lists.freedesktop.org, asahi@lists.linux.dev, Asahi Lina Subject: Re: [PATCH v4 5/7] drm/gpuvm: Add a flags field to drm_gpuvm_map_req/drm_gpuva_op_map Message-ID: <20250821142150.48250375@fedora> In-Reply-To: References: <20250707170442.1437009-1-caterina.shablia@collabora.com> <20250707170442.1437009-6-caterina.shablia@collabora.com> Organization: Collabora X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: asahi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 22 Jul 2025 20:21:25 +0100 Adrian Larumbe wrote: > > /** > > @@ -1074,6 +1079,9 @@ struct drm_gpuvm_map_req { > > /** @offset: offset in the GEM */ > > u64 offset; > > } gem; > > + > > + /** @flags: combination of DRM_GPUVA_ flags describing the mapping properties. */ > > + enum drm_gpuva_flags flags; > > Wouldn't this be better expressed as a u32 combination of enum drm_gpuva_flags flags? > Calling it 'flags' makes me feel like any OR'd combination of enum values would be possible. I agree, but it's how other flags field are defined in gpuvm so I went for the same definition to keep things consistent. Luckily (or unfortunately, depending on where you place yourself), C is pretty lax about what can be assigned to an enum type.