On 12/12, Maíra Canal wrote: > The function `vc4_queue_seqno_cb()` is no longer needed, as we are > using DMA Reservation Objects to track BOs. Using DMA Resv, we can use > `dma_fence_add_callback()` to perform the async page flip. > > Signed-off-by: Maíra Canal <mcanal@xxxxxxxxxx> > --- > drivers/gpu/drm/vc4/vc4_drv.h | 3 --- > drivers/gpu/drm/vc4/vc4_gem.c | 32 -------------------------------- > 2 files changed, 35 deletions(-) > > diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h > index ff8048991030..7e23363d008f 100644 > --- a/drivers/gpu/drm/vc4/vc4_drv.h > +++ b/drivers/gpu/drm/vc4/vc4_drv.h > @@ -1022,9 +1022,6 @@ void vc4_move_job_to_render(struct drm_device *dev, struct vc4_exec_info *exec); > int vc4_wait_for_seqno(struct drm_device *dev, uint64_t seqno, > uint64_t timeout_ns, bool interruptible); > void vc4_job_handle_completed(struct vc4_dev *vc4); > -int vc4_queue_seqno_cb(struct drm_device *dev, > - struct vc4_seqno_cb *cb, uint64_t seqno, > - void (*func)(struct vc4_seqno_cb *cb)); > int vc4_gem_madvise_ioctl(struct drm_device *dev, void *data, > struct drm_file *file_priv); > > diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c > index 1cbd95c4f9ef..c1cc942a26ae 100644 > --- a/drivers/gpu/drm/vc4/vc4_gem.c > +++ b/drivers/gpu/drm/vc4/vc4_gem.c > @@ -922,38 +922,6 @@ vc4_job_handle_completed(struct vc4_dev *vc4) > spin_unlock_irqrestore(&vc4->job_lock, irqflags); > } > > -static void vc4_seqno_cb_work(struct work_struct *work) > -{ > - struct vc4_seqno_cb *cb = container_of(work, struct vc4_seqno_cb, work); > - > - cb->func(cb); > -} > - > -int vc4_queue_seqno_cb(struct drm_device *dev, > - struct vc4_seqno_cb *cb, uint64_t seqno, > - void (*func)(struct vc4_seqno_cb *cb)) > -{ > - struct vc4_dev *vc4 = to_vc4_dev(dev); > - unsigned long irqflags; > - > - if (WARN_ON_ONCE(vc4->gen > VC4_GEN_4)) > - return -ENODEV; > - > - cb->func = func; > - INIT_WORK(&cb->work, vc4_seqno_cb_work); > - > - spin_lock_irqsave(&vc4->job_lock, irqflags); > - if (seqno > vc4->finished_seqno) { > - cb->seqno = seqno; > - list_add_tail(&cb->work.entry, &vc4->seqno_cb_list); > - } else { > - schedule_work(&cb->work); > - } > - spin_unlock_irqrestore(&vc4->job_lock, irqflags); > - > - return 0; > -} > - I think squashing this patch with the previous one is more consistent, since the last and only usage of vc4_queue_seqno_cb() is removed there. Melissa > /* Scheduled when any job has been completed, this walks the list of > * jobs that had completed and unrefs their BOs and frees their exec > * structs. > -- > 2.47.1 >