1. 01 Jan, 2021 1 commit
  2. 21 Dec, 2020 1 commit
  3. 09 Dec, 2020 1 commit
    • Boris Brezillon's avatar
      panfrost: Fix fencing · 29f938a0
      Boris Brezillon authored
      Commit 64d6f56a ("panfrost: Allocate syncobjs in panfrost_flush")
      aimed at optimizing the fencing logic but it looks it also broke the
      fence-based synchronization in subtle ways.
      Indeed, now that the fence only waits on a single syncobj, we're not
      guaranteed that all jobs queued in panfrost_flush_all_batches() will
      be done when the fence is signaled, because jobs at the top level
      (those stored in the batches hashmap) have not inter-dependencies.
      Commit 9e397956 ("panfrost: signal syncobj if nothing is going to
      be flushed") made this even more apparent by signaling the fence right
      away if nothing was left to be drawn in the current context, thus
      ignoring any of the batches left to flushed in the ->batches map.
      If we want to keep relying the existing kernel APIs there's clearly no
      ideal solution here. We can either go back to the original fencing
      mechanism where each fence contained an array of syncobjs to be tested
      or serialize jobs that have no explicit dependencies so we know the last
      submitted job will also be the last one to return. The orginal approach
      has proven to add quite a significant overhead (caused by the amount of
      ioctls and the time spent in kernel space to gather dma fences attached
      to those syncobjs and test them). So let's go for the simple solution
      where we have a single syncobj bound to the context which we update to
      point to the last job out_sync every time we submit a top-level job.
      This approach implies reworking the way we create fences since we
      need to capture the syncobj state at the time the fence is created.
      Unfortunately, there's not SYNCOBJ_CLONE ioctl, which forces us to
      export/create/import a fence so we have a new object that's not
      subject to changes done to the context syncobj.
      If we want to further optimize the logic, we should probably explore
      some of those options:
      1/ Adding array based SYNCOBJ ioctls (SYNCOBJ_{CREATE,DESTROY,CLONE}_ARRAY)
         so we can mitigate the cost of ioctls when we need to manipulate
         arrays of syncobjs
      2/ Support synchronization jobs. That is, jobs that have a NULL job chain
         but an array of sync_in and a sync_out to allow creating
         synchronization points
      3/ Add syncobj aggregators so we only have to wait on one syncobj from
         userspace. The syncobj aggregator would wait for all sub syncobjs to
         be signaled before signaling the top-level one.
      Fixes: 64d6f56a
       ("panfrost: Allocate syncobjs in panfrost_flush")
      Signed-off-by: Boris Brezillon's avatarBoris Brezillon <boris.brezillon@collabora.com>
      Reviewed-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
      Part-of: <mesa/mesa!7831>
  4. 25 Nov, 2020 2 commits
  5. 17 Nov, 2020 1 commit
  6. 11 Nov, 2020 1 commit
  7. 09 Nov, 2020 1 commit
  8. 03 Nov, 2020 1 commit
  9. 31 Oct, 2020 1 commit
  10. 27 Oct, 2020 1 commit
  11. 23 Oct, 2020 3 commits
  12. 10 Oct, 2020 3 commits
  13. 29 Sep, 2020 1 commit
  14. 09 Sep, 2020 1 commit
  15. 01 Sep, 2020 1 commit
  16. 31 Aug, 2020 2 commits
  17. 17 Aug, 2020 1 commit
  18. 12 Aug, 2020 1 commit
  19. 06 Aug, 2020 1 commit
  20. 05 Aug, 2020 1 commit
  21. 04 Aug, 2020 1 commit
  22. 21 Jul, 2020 1 commit
  23. 20 Jul, 2020 2 commits
  24. 17 Jul, 2020 2 commits
  25. 16 Jul, 2020 5 commits
  26. 15 Jul, 2020 2 commits
  27. 13 Jul, 2020 1 commit