[PATCH v4 3/7] drm/gpuvm: Pass map arguments through a struct
Danilo Krummrich
dakr at kernel.org
Mon Jul 7 18:44:49 UTC 2025
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.
Let's use that instead of redefining an identical structure.
With that,
Acked-by: Danilo Krummrich <dakr at kernel.org>
More information about the Intel-xe
mailing list