[PATCH v5 01/25] drm/gpuvm: Pass map arguments through a struct

Danilo Krummrich dakr at kernel.org
Tue Aug 5 10:10:11 UTC 2025


On Tue Aug 5, 2025 at 7:24 AM CEST, Himal Prasad Ghimiray wrote:
> On 05-08-2025 09:26, Matthew Brost wrote:
>> Also I believe Danilo's suggestion here was to define drm_gpuvm_map_req
>> as the argument and then embed drm_gpuva_op_map within
>> drm_gpuvm_map_req. So in patch [1], flags would be added to
>> drm_gpuvm_map_req rather than drm_gpuva_op_map.
>> 
>> Matt
>> 
>> [1] https://patchwork.freedesktop.org/patch/666211/?series=149550&rev=5
>
> Hi Matt,
>
> Thanks for the review. Initially, I considered using drm_gpuvm_map_req 
> struct instead of passing drm_gpuva_op_map directly to the gpuvm layer, 
> allowing it to handle split/merge decisions independently.

Generally, we should only have the flags field on struct drm_gpuva_op_map if we
need to let GPUVM pass flags for (re)map operations to drivers.

> However, the upcoming patch [1] relies on this flag to determine 
> driver-side behavior. So at the end drm_gpuva_op_map and 
> drm_gpuvm_map_req might end up identical. Based on that—and Danilo’s 
> feedback on this patch [2] I thought It will be better to keep a single 
> op_map struct with the flag included.

Let's leave this to the upcoming patches, we can always adjust. For now, let's
go with what Matt summarized above please.

> Boris, could you please confirm if the flag will be useful on the driver 
> side [1]?
>
> [1] https://patchwork.freedesktop.org/patch/662832/?series=151264&rev=2
> [2] https://patchwork.freedesktop.org/patch/662819/?series=151264&rev=2


More information about the dri-devel mailing list