mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 03:11:11 -04:00
Merge tag 'drm-misc-next-fixes-2026-04-09' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
Short summary of fixes pull: dma-buf: - fence: fix docs for dma_fence_unlock_irqrestore() fb-helper: - unlock in error path gem-shmem: - fix PMD write update gem-vram: - remove obsolete documentation ivpu: - fix device-recovery handling Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20260409113921.GA181028@linux.fritz.box
This commit is contained in:
@@ -221,6 +221,12 @@ static void ivpu_job_timeout_work(struct work_struct *work)
|
||||
|
||||
abort:
|
||||
atomic_set(&vdev->job_timeout_counter, 0);
|
||||
|
||||
if (vdev->fw->sched_mode == VPU_SCHEDULING_MODE_OS) {
|
||||
ivpu_pm_trigger_recovery(vdev, "Job timeout");
|
||||
return;
|
||||
}
|
||||
|
||||
ivpu_jsm_state_dump(vdev);
|
||||
ivpu_dev_coredump(vdev);
|
||||
queue_work(system_percpu_wq, &vdev->context_abort_work);
|
||||
|
||||
@@ -1627,8 +1627,10 @@ __drm_fb_helper_initial_config_and_unlock(struct drm_fb_helper *fb_helper)
|
||||
drm_client_modeset_probe(&fb_helper->client, width, height);
|
||||
|
||||
info = drm_fb_helper_alloc_info(fb_helper);
|
||||
if (IS_ERR(info))
|
||||
if (IS_ERR(info)) {
|
||||
mutex_unlock(&fb_helper->lock);
|
||||
return PTR_ERR(info);
|
||||
}
|
||||
|
||||
ret = drm_fb_helper_single_fb_probe(fb_helper);
|
||||
if (ret < 0) {
|
||||
|
||||
@@ -554,6 +554,21 @@ int drm_gem_shmem_dumb_create(struct drm_file *file, struct drm_device *dev,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(drm_gem_shmem_dumb_create);
|
||||
|
||||
static void drm_gem_shmem_record_mkwrite(struct vm_fault *vmf)
|
||||
{
|
||||
struct vm_area_struct *vma = vmf->vma;
|
||||
struct drm_gem_object *obj = vma->vm_private_data;
|
||||
struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
|
||||
loff_t num_pages = obj->size >> PAGE_SHIFT;
|
||||
pgoff_t page_offset = vmf->pgoff - vma->vm_pgoff; /* page offset within VMA */
|
||||
|
||||
if (drm_WARN_ON(obj->dev, !shmem->pages || page_offset >= num_pages))
|
||||
return;
|
||||
|
||||
file_update_time(vma->vm_file);
|
||||
folio_mark_dirty(page_folio(shmem->pages[page_offset]));
|
||||
}
|
||||
|
||||
static vm_fault_t try_insert_pfn(struct vm_fault *vmf, unsigned int order,
|
||||
unsigned long pfn)
|
||||
{
|
||||
@@ -566,8 +581,23 @@ static vm_fault_t try_insert_pfn(struct vm_fault *vmf, unsigned int order,
|
||||
|
||||
if (aligned &&
|
||||
folio_test_pmd_mappable(page_folio(pfn_to_page(pfn)))) {
|
||||
vm_fault_t ret;
|
||||
|
||||
pfn &= PMD_MASK >> PAGE_SHIFT;
|
||||
return vmf_insert_pfn_pmd(vmf, pfn, false);
|
||||
|
||||
/* Unlike PTEs which are automatically upgraded to
|
||||
* writeable entries, the PMD upgrades go through
|
||||
* .huge_fault(). Make sure we pass the "write" info
|
||||
* along in that case.
|
||||
* This also means we have to record the write fault
|
||||
* here, instead of in .pfn_mkwrite().
|
||||
*/
|
||||
ret = vmf_insert_pfn_pmd(vmf, pfn,
|
||||
vmf->flags & FAULT_FLAG_WRITE);
|
||||
if (ret == VM_FAULT_NOPAGE && (vmf->flags & FAULT_FLAG_WRITE))
|
||||
drm_gem_shmem_record_mkwrite(vmf);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -655,19 +685,7 @@ static void drm_gem_shmem_vm_close(struct vm_area_struct *vma)
|
||||
|
||||
static vm_fault_t drm_gem_shmem_pfn_mkwrite(struct vm_fault *vmf)
|
||||
{
|
||||
struct vm_area_struct *vma = vmf->vma;
|
||||
struct drm_gem_object *obj = vma->vm_private_data;
|
||||
struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
|
||||
loff_t num_pages = obj->size >> PAGE_SHIFT;
|
||||
pgoff_t page_offset = vmf->pgoff - vma->vm_pgoff; /* page offset within VMA */
|
||||
|
||||
if (drm_WARN_ON(obj->dev, !shmem->pages || page_offset >= num_pages))
|
||||
return VM_FAULT_SIGBUS;
|
||||
|
||||
file_update_time(vma->vm_file);
|
||||
|
||||
folio_mark_dirty(page_folio(shmem->pages[page_offset]));
|
||||
|
||||
drm_gem_shmem_record_mkwrite(vmf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,15 +49,12 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
|
||||
* To initialize the VRAM helper library call drmm_vram_helper_init().
|
||||
* The function allocates and initializes an instance of &struct drm_vram_mm
|
||||
* in &struct drm_device.vram_mm . Use &DRM_GEM_VRAM_DRIVER to initialize
|
||||
* &struct drm_driver and &DRM_VRAM_MM_FILE_OPERATIONS to initialize
|
||||
* &struct drm_driver and &DEFINE_DRM_GEM_FOPS to define
|
||||
* &struct file_operations; as illustrated below.
|
||||
*
|
||||
* .. code-block:: c
|
||||
*
|
||||
* struct file_operations fops ={
|
||||
* .owner = THIS_MODULE,
|
||||
* DRM_VRAM_MM_FILE_OPERATION
|
||||
* };
|
||||
* DEFINE_DRM_GEM_FOPS(fops);
|
||||
* struct drm_driver drv = {
|
||||
* .driver_feature = DRM_ ... ,
|
||||
* .fops = &fops,
|
||||
|
||||
@@ -408,9 +408,9 @@ static inline spinlock_t *dma_fence_spinlock(struct dma_fence *fence)
|
||||
/**
|
||||
* dma_fence_unlock_irqrestore - unlock the fence and irqrestore
|
||||
* @fence: the fence to unlock
|
||||
* @flags the CPU flags to restore
|
||||
* @flags: the CPU flags to restore
|
||||
*
|
||||
* Unlock the fence, allowing it to change it's state to signaled again.
|
||||
* Unlock the fence, allowing it to change its state to signaled again.
|
||||
*/
|
||||
#define dma_fence_unlock_irqrestore(fence, flags) \
|
||||
spin_unlock_irqrestore(dma_fence_spinlock(fence), flags)
|
||||
|
||||
Reference in New Issue
Block a user