[PATCH v5 03/25] drm/gpuvm: Support flags in drm_gpuva_op_map
Ghimiray, Himal Prasad
himal.prasad.ghimiray at intel.com
Tue Aug 5 11:05:17 UTC 2025
On 05-08-2025 09:28, Matthew Brost wrote:
> On Wed, Jul 30, 2025 at 06:30:28PM +0530, Himal Prasad Ghimiray wrote:
>> This change adds support for passing flags to drm_gpuvm_sm_map() and
>> sm_map_ops_create(), enabling future extensions that affect split/merge
>> logic in drm_gpuvm.
>>
>> Cc: Danilo Krummrich <dakr at redhat.com>
>> Cc: Boris Brezillon <bbrezillon at kernel.org>
>> Cc: Caterina Shablia <caterina.shablia at collabora.com>
>> Cc: Matthew Brost <matthew.brost at intel.com>
>> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
>> ---
>> include/drm/drm_gpuvm.h | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/include/drm/drm_gpuvm.h b/include/drm/drm_gpuvm.h
>> index 2d24d000f2ee..75c616fdc119 100644
>> --- a/include/drm/drm_gpuvm.h
>> +++ b/include/drm/drm_gpuvm.h
>> @@ -810,6 +810,12 @@ enum drm_gpuva_op_type {
>> DRM_GPUVA_OP_DRIVER,
>> };
>>
>> +/** DOC: flags for struct drm_gpuva_op_map
>> + * %DRM_GPUVM_SM_MAP_OPS_FLAG_NONE DEFAULT split and merge,
>> + * It cannot be combined with other flags.
>> + */
>> +#define DRM_GPUVM_SM_MAP_OPS_FLAG_NONE 0
>> +
>> /**
>> * struct drm_gpuva_op_map - GPU VA map operation
>> *
>> @@ -847,6 +853,13 @@ struct drm_gpuva_op_map {
>> */
>> struct drm_gem_object *obj;
>> } gem;
>> +
>> + /**
>> + * @flags: Bitmask of DRM_GPUVM_SM_MAP_* flags.
>> + * Use DRM_GPUVM_SM_MAP_OPS_FLAG_NONE (0) for default split merge.
>> + * It cannot be combined with other flags.
>> + */
>> + u32 flags;
>
> See my comment here [1], I think the flags should be in
> drm_gpuvm_map_req rather than drm_gpuva_op_map as the flags are only
> used gpuvm side on op creation, not driver side when consuming
> drm_gpuva_op_map.
Will update it in next version. Thanks.
>
> Matt
>
> [1] https://patchwork.freedesktop.org/patch/666205/?series=149550&rev=5#comment_1222150
>
>> };
>>
>> /**
>> --
>> 2.34.1
>>
More information about the Intel-xe
mailing list