]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge tag 'drm-misc-next-2025-12-12' of https://gitlab.freedesktop.org/drm/misc/kerne...
authorDave Airlie <airlied@redhat.com>
Fri, 26 Dec 2025 07:58:44 +0000 (17:58 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 26 Dec 2025 08:15:33 +0000 (18:15 +1000)
drm-misc-next for 6.19:

UAPI Changes:

  - panfrost: Add PANFROST_BO_SYNC ioctl
  - panthor: Add PANTHOR_BO_SYNC ioctl

Core Changes:

  - atomic: Add drm_device pointer to drm_private_obj
  - bridge: Introduce drm_bridge_unplug, drm_bridge_enter, and
    drm_bridge_exit
  - dma-buf: Improve sg_table debugging
  - dma-fence: Add new helpers, and use them when needed
  - dp_mst: Avoid out-of-bounds access with VCPI==0
  - gem: Reduce page table overhead with transparent huge pages
  - panic: Report invalid panic modes
  - sched: Add TODO entries
  - ttm: Various cleanups
  - vblank: Various refactoring and cleanups

  - Kconfig cleanups
  - Removed support for kdb

Driver Changes:

  - amdxdna: Fix race conditions at suspend, Improve handling of zero
    tail pointers, Fix cu_idx being overwritten during command setup
  - ast: Support imported cursor buffers
  -
  - panthor: Enable timestamp propagation, Multiple improvements and
    fixes to improve the overall robustness, notably of the scheduler.

  - panels:
    - panel-edp: Support for CSW MNE007QB3-1, AUO B140HAN06.4, AUO B140QAX01.H

Signed-off-by: Dave Airlie <airlied@redhat.com>
[airlied: fix mm conflict]
From: Maxime Ripard <mripard@redhat.com>
Link: https://patch.msgid.link/20251212-spectacular-agama-of-abracadabra-aaef32@penduick
18 files changed:
1  2 
drivers/accel/amdxdna/aie2_pci.c
drivers/dma-buf/dma-buf.c
drivers/dma-buf/dma-fence.c
drivers/gpu/drm/bridge/ti-sn65dsi83.c
drivers/gpu/drm/drm_fb_helper.c
drivers/gpu/drm/drm_gem.c
drivers/gpu/drm/drm_gem_shmem_helper.c
drivers/gpu/drm/drm_panic.c
drivers/gpu/drm/drm_plane.c
drivers/gpu/drm/drm_vblank.c
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/gem/i915_gem_object_types.h
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/panthor/panthor_gem.c
drivers/gpu/drm/panthor/panthor_mmu.c
drivers/gpu/drm/panthor/panthor_sched.c
drivers/gpu/drm/ttm/ttm_bo_vm.c
drivers/video/fbdev/core/fbcon.c

Simple merge
Simple merge
index b4f5c8635276400751af73670ef768d20ac6681a,c82aa8ae145485907ec5990cf71c8ac66d5b58a8..21c5c30b4f34f4889533b162604e38cbce88c8b9
@@@ -1140,8 -1164,8 +1164,8 @@@ const char __rcu *dma_fence_timeline_na
        RCU_LOCKDEP_WARN(!rcu_read_lock_held(),
                         "RCU protection is required for safe access to returned string");
  
-       if (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
+       if (!dma_fence_test_signaled_flag(fence))
 -              return fence->ops->get_driver_name(fence);
 +              return fence->ops->get_timeline_name(fence);
        else
                return "signaled-timeline";
  }
Simple merge
Simple merge
index e4df434273945edefd425d1bafb7b34624de9f36,ca1956608261249c6b0e0fec05c24d177e98b9f9..127fbebcf175429d4ce2ceb75d666944a4a3ca27
@@@ -1233,10 -1261,84 +1265,84 @@@ drm_gem_object_lookup_at_offset(struct 
  
        if (!drm_vma_node_is_allowed(node, priv)) {
                drm_gem_object_put(obj);
-               return -EACCES;
+               return ERR_PTR(-EACCES);
        }
  
-       ret = drm_gem_mmap_obj(obj, drm_vma_node_size(node) << PAGE_SHIFT,
+       return obj;
+ }
+ #ifdef CONFIG_MMU
+ /**
+  * drm_gem_get_unmapped_area - get memory mapping region routine for GEM objects
+  * @filp: DRM file pointer
+  * @uaddr: User address hint
+  * @len: Mapping length
+  * @pgoff: Offset (in pages)
+  * @flags: Mapping flags
+  *
+  * If a driver supports GEM object mapping, before ending up in drm_gem_mmap(),
+  * mmap calls on the DRM file descriptor will first try to find a free linear
+  * address space large enough for a mapping. Since GEM objects are backed by
+  * shmem buffers, this should preferably be handled by the shmem virtual memory
+  * filesystem which can appropriately align addresses to huge page sizes when
+  * needed.
+  *
+  * Look up the GEM object based on the offset passed in (vma->vm_pgoff will
+  * contain the fake offset we created) and call shmem_get_unmapped_area() with
+  * the right file pointer.
+  *
+  * If a GEM object is not available at the given offset or if the caller is not
+  * granted access to it, fall back to mm_get_unmapped_area().
+  */
+ unsigned long drm_gem_get_unmapped_area(struct file *filp, unsigned long uaddr,
+                                       unsigned long len, unsigned long pgoff,
+                                       unsigned long flags)
+ {
+       struct drm_gem_object *obj;
+       unsigned long ret;
+       obj = drm_gem_object_lookup_at_offset(filp, pgoff, len >> PAGE_SHIFT);
+       if (IS_ERR(obj) || !obj->filp || !obj->filp->f_op->get_unmapped_area)
 -              return mm_get_unmapped_area(current->mm, filp, uaddr, len, 0,
++              return mm_get_unmapped_area(filp, uaddr, len, 0,
+                                           flags);
+       ret = obj->filp->f_op->get_unmapped_area(obj->filp, uaddr, len, 0,
+                                                flags);
+       drm_gem_object_put(obj);
+       return ret;
+ }
+ EXPORT_SYMBOL_GPL(drm_gem_get_unmapped_area);
+ #endif
+ /**
+  * drm_gem_mmap - memory map routine for GEM objects
+  * @filp: DRM file pointer
+  * @vma: VMA for the area to be mapped
+  *
+  * If a driver supports GEM object mapping, mmap calls on the DRM file
+  * descriptor will end up here.
+  *
+  * Look up the GEM object based on the offset passed in (vma->vm_pgoff will
+  * contain the fake offset we created) and map it with a call to
+  * drm_gem_mmap_obj().
+  *
+  * If the caller is not granted access to the buffer object, the mmap will fail
+  * with EACCES. Please see the vma manager for more information.
+  */
+ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
+ {
+       struct drm_gem_object *obj;
+       int ret;
+       obj = drm_gem_object_lookup_at_offset(filp, vma->vm_pgoff,
+                                             vma_pages(vma));
+       if (IS_ERR(obj))
+               return PTR_ERR(obj);
+       ret = drm_gem_mmap_obj(obj,
+                              drm_vma_node_size(&obj->vma_node) << PAGE_SHIFT,
                               vma);
  
        drm_gem_object_put(obj);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index d4839d282689faf39b0f629ad4dfde7a949cf6fb,ca112d874ecb9b937047fddb95c9ea604b7a6e51..473a8bebd61ecdb052c76a9e8685c33652b8fa61
@@@ -2103,15 -2219,11 +2150,11 @@@ static int panthor_gpuva_sm_step_unmap(
  {
        struct panthor_vma *unmap_vma = container_of(op->unmap.va, struct panthor_vma, base);
        struct panthor_vm *vm = priv;
-       int ret;
-       ret = panthor_vm_unmap_pages(vm, unmap_vma->base.va.addr,
-                                    unmap_vma->base.va.range);
-       if (drm_WARN_ON(&vm->ptdev->base, ret))
-               return ret;
  
+       panthor_vm_unmap_pages(vm, unmap_vma->base.va.addr,
+                              unmap_vma->base.va.range);
        drm_gpuva_unmap(&op->unmap);
 -      panthor_vma_unlink(vm, unmap_vma);
 +      panthor_vma_unlink(unmap_vma);
        return 0;
  }
  
Simple merge
Simple merge