]> Gentwo Git Trees - linux/.git/commitdiff
Merge tag 'drm-rust-next-2025-11-18' of https://gitlab.freedesktop.org/drm/rust/kerne...
authorDave Airlie <airlied@redhat.com>
Thu, 20 Nov 2025 00:42:50 +0000 (10:42 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 20 Nov 2025 00:44:50 +0000 (10:44 +1000)
Cross-subsystem Changes:

Rust
  - Make slice::as_flattened usable on all supported versions of rustc.
  - Add FromBytes::from_bytes_prefix() method.

Core Changes:

  - Update Tyr in MAINTAINERS file.
  - Remove redundant device ptr from Rust GEM object.
  - Change how AlwaysRefCounted is implemented for GEM objects.
  - Add deferred vm_bo cleanup to GPUVM and use it in Panthor.

Driver Changes:

Nova Core
  - Introduction of bitfield! macro, with support for different storage sizes
    and custom visibility.
  - Introduction of safe converters between integer types for which the
    conversion is lossless.
  - GSP initialized up to fully booted state on Ampere.
  - Use more future-proof register for GPU identification.
  - Various simplifications and optimizations.

Nova
  - Select NOVA_CORE.
  - Depend on CONFIG_64BIT.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/aRxtJC0D1pQUepF4@google.com
1  2 
MAINTAINERS
drivers/gpu/drm/drm_gpuvm.c
drivers/gpu/drm/panthor/panthor_mmu.c

diff --cc MAINTAINERS
Simple merge
Simple merge
index 6a41dfd7aaf339a32c2b6feef77dc0445c5c00c1,9f5f4ddf291024121f3fd5644f2fdeba354fa67c..2ec745ffdeff5f7f90a3a66d34925b64ca88eeb1
@@@ -1140,27 -1096,9 +1097,23 @@@ static void panthor_vm_cleanup_op_ctx(s
        for (u32 i = 0; i < ARRAY_SIZE(op_ctx->preallocated_vmas); i++)
                kfree(op_ctx->preallocated_vmas[i]);
  
-       list_for_each_entry_safe(vma, tmp_vma, &op_ctx->returned_vmas, node) {
-               list_del(&vma->node);
-               panthor_vm_bo_put(vma->base.vm_bo);
-               kfree(vma);
-       }
+       drm_gpuvm_bo_deferred_cleanup(&vm->base);
  }
  
 +static void
 +panthor_vm_op_ctx_return_vma(struct panthor_vm_op_ctx *op_ctx,
 +                           struct panthor_vma *vma)
 +{
 +      for (u32 i = 0; i < ARRAY_SIZE(op_ctx->preallocated_vmas); i++) {
 +              if (!op_ctx->preallocated_vmas[i]) {
 +                      op_ctx->preallocated_vmas[i] = vma;
 +                      return;
 +              }
 +      }
 +
 +      WARN_ON_ONCE(1);
 +}
 +
  static struct panthor_vma *
  panthor_vm_op_ctx_get_vma(struct panthor_vm_op_ctx *op_ctx)
  {
@@@ -2096,17 -2010,15 +2025,17 @@@ static int panthor_gpuva_sm_step_map(st
        ret = panthor_vm_map_pages(vm, op->map.va.addr, flags_to_prot(vma->flags),
                                   op_ctx->map.sgt, op->map.gem.offset,
                                   op->map.va.range);
 -      if (ret)
 +      if (ret) {
 +              panthor_vm_op_ctx_return_vma(op_ctx, vma);
                return ret;
 +      }
  
-       /* Ref owned by the mapping now, clear the obj field so we don't release the
-        * pinning/obj ref behind GPUVA's back.
-        */
        drm_gpuva_map(&vm->base, &vma->base, &op->map);
        panthor_vma_link(vm, vma, op_ctx->map.vm_bo);
+       drm_gpuvm_bo_put_deferred(op_ctx->map.vm_bo);
        op_ctx->map.vm_bo = NULL;
        return 0;
  }