[PATCH v4 2/7] drm/gpuvm: Kill drm_gpuva_init()
Steven Price
steven.price at arm.com
Fri Jul 11 13:30:30 UTC 2025
On 07/07/2025 18:04, Caterina Shablia wrote:
> From: Boris Brezillon <boris.brezillon at collabora.com>
>
> drm_gpuva_init() only has one internal user, and given we are about to
> add new optional fields, it only add maintenance burden for no real
> benefit, so let's kill the thing now.
Commit 111fdd2198e6 ("drm/msm: drm_gpuvm conversion") has added another
use in msm.
Steve
>
> Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
> Signed-off-by: Caterina Shablia <caterina.shablia at collabora.com>
> ---
> include/drm/drm_gpuvm.h | 15 ++++-----------
> 1 file changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/include/drm/drm_gpuvm.h b/include/drm/drm_gpuvm.h
> index 2a9629377633..6fdf2aff3e90 100644
> --- a/include/drm/drm_gpuvm.h
> +++ b/include/drm/drm_gpuvm.h
> @@ -160,15 +160,6 @@ struct drm_gpuva *drm_gpuva_find_first(struct drm_gpuvm *gpuvm,
> struct drm_gpuva *drm_gpuva_find_prev(struct drm_gpuvm *gpuvm, u64 start);
> struct drm_gpuva *drm_gpuva_find_next(struct drm_gpuvm *gpuvm, u64 end);
>
> -static inline void drm_gpuva_init(struct drm_gpuva *va, u64 addr, u64 range,
> - struct drm_gem_object *obj, u64 offset)
> -{
> - va->va.addr = addr;
> - va->va.range = range;
> - va->gem.obj = obj;
> - va->gem.offset = offset;
> -}
> -
> /**
> * drm_gpuva_invalidate() - sets whether the backing GEM of this &drm_gpuva is
> * invalidated
> @@ -1079,8 +1070,10 @@ void drm_gpuva_ops_free(struct drm_gpuvm *gpuvm,
> static inline void drm_gpuva_init_from_op(struct drm_gpuva *va,
> struct drm_gpuva_op_map *op)
> {
> - drm_gpuva_init(va, op->va.addr, op->va.range,
> - op->gem.obj, op->gem.offset);
> + va->va.addr = op->va.addr;
> + va->va.range = op->va.range;
> + va->gem.obj = op->gem.obj;
> + va->gem.offset = op->gem.offset;
> }
>
> /**
More information about the Intel-xe
mailing list