Re: [PATCH v2 4/4] drm/vc4: Remove `vc4_queue_seqno_cb()`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 12/12/2024 20:20, 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);

I haven't done a full read through yet but just strikes me on a casual browse, that if the rest of the series is correct, then it looks seqno_cb_list and the whole struct vc4_seqno_cb be removed as well.

Regards,

Tvrtko

-	}
-	spin_unlock_irqrestore(&vc4->job_lock, irqflags);
-
-	return 0;
-}
-
  /* 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.



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux