All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] Convert requests to use struct fence
@ 2015-12-11 13:11 John.C.Harrison
  2015-12-11 13:11 ` [PATCH 01/13] staging/android/sync: Support sync points created from dma-fences John.C.Harrison
                   ` (13 more replies)
  0 siblings, 14 replies; 74+ messages in thread
From: John.C.Harrison @ 2015-12-11 13:11 UTC (permalink / raw)
  To: Intel-GFX

From: John Harrison <John.C.Harrison@Intel.com>

There is a construct in the linux kernel called 'struct fence' that is
intended to keep track of work that is executed on hardware. I.e. it
solves the basic problem that the drivers 'struct
drm_i915_gem_request' is trying to address. The request structure does
quite a lot more than simply track the execution progress so is very
definitely still required. However, the basic completion status side
could be updated to use the ready made fence implementation and gain
all the advantages that provides.

Using the struct fence object also has the advantage that the fence
can be used outside of the i915 driver (by other drivers or by
userland applications). That is the basis of the dma-buff
synchronisation API and allows asynchronous tracking of work
completion. In this case, it allows applications to be signalled
directly when a batch buffer completes without having to make an IOCTL
call into the driver.

This is work that was planned since the conversion of the driver from
being seqno value based to being request structure based. This patch
series does that work.

An IGT test to exercise the fence support from user land is in
progress and will follow. Android already makes extensive use of
fences for display composition. Real world linux usage is planned in
the form of Jesse's page table sharing / bufferless execbuf support.
There is also a plan that Wayland (and others) could make use of it in
a similar manner to Android.

v2: Updated for review comments by various people and to add support
for Android style 'native sync'.

v3: Updated from review comments by Tvrtko Ursulin. Also moved sync
framework out of staging and improved request completion handling.

v4: Fixed patch tag (should have been PATCH not RFC). Corrected
ownership of one patch which had passed through many hands before
reaching me. Fixed a bug introduced in v3 and updated for review
comments.

[Patches against drm-intel-nightly tree fetched 17/11/2015]

John Harrison (10):
  staging/android/sync: Move sync framework out of staging
  android/sync: Improved debug dump to dmesg
  drm/i915: Convert requests to use struct fence
  drm/i915: Removed now redudant parameter to i915_gem_request_completed()
  drm/i915: Add per context timelines to fence object
  drm/i915: Delay the freeing of requests until retire time
  drm/i915: Interrupt driven fences
  drm/i915: Updated request structure tracing
  drm/i915: Add sync framework support to execbuff IOCTL
  drm/i915: Cache last IRQ seqno to reduce IRQ overhead

Maarten Lankhorst (2):
  staging/android/sync: Support sync points created from dma-fences
  staging/android/sync: add sync_fence_create_dma

Peter Lawthers (1):
  android/sync: Fix reversed sense of signaled fence

 drivers/android/Kconfig                    |  28 ++
 drivers/android/Makefile                   |   2 +
 drivers/android/sw_sync.c                  | 260 ++++++++++
 drivers/android/sw_sync.h                  |  59 +++
 drivers/android/sync.c                     | 739 +++++++++++++++++++++++++++++
 drivers/android/sync.h                     | 388 +++++++++++++++
 drivers/android/sync_debug.c               | 280 +++++++++++
 drivers/android/trace/sync.h               |  82 ++++
 drivers/gpu/drm/i915/Kconfig               |   3 +
 drivers/gpu/drm/i915/i915_debugfs.c        |   7 +-
 drivers/gpu/drm/i915/i915_drv.h            |  75 +--
 drivers/gpu/drm/i915/i915_gem.c            | 438 ++++++++++++++++-
 drivers/gpu/drm/i915/i915_gem_context.c    |  15 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |  95 +++-
 drivers/gpu/drm/i915/i915_irq.c            |   2 +-
 drivers/gpu/drm/i915/i915_trace.h          |  13 +-
 drivers/gpu/drm/i915/intel_display.c       |   4 +-
 drivers/gpu/drm/i915/intel_lrc.c           |  13 +
 drivers/gpu/drm/i915/intel_pm.c            |   6 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c    |   5 +
 drivers/gpu/drm/i915/intel_ringbuffer.h    |   9 +
 drivers/staging/android/Kconfig            |  28 --
 drivers/staging/android/Makefile           |   2 -
 drivers/staging/android/sw_sync.c          | 260 ----------
 drivers/staging/android/sw_sync.h          |  59 ---
 drivers/staging/android/sync.c             | 729 ----------------------------
 drivers/staging/android/sync.h             | 356 --------------
 drivers/staging/android/sync_debug.c       | 254 ----------
 drivers/staging/android/trace/sync.h       |  82 ----
 drivers/staging/android/uapi/sw_sync.h     |  32 --
 drivers/staging/android/uapi/sync.h        |  97 ----
 include/uapi/Kbuild                        |   1 +
 include/uapi/drm/i915_drm.h                |  16 +-
 include/uapi/sync/Kbuild                   |   3 +
 include/uapi/sync/sw_sync.h                |  32 ++
 include/uapi/sync/sync.h                   |  97 ++++
 36 files changed, 2600 insertions(+), 1971 deletions(-)
 create mode 100644 drivers/android/sw_sync.c
 create mode 100644 drivers/android/sw_sync.h
 create mode 100644 drivers/android/sync.c
 create mode 100644 drivers/android/sync.h
 create mode 100644 drivers/android/sync_debug.c
 create mode 100644 drivers/android/trace/sync.h
 delete mode 100644 drivers/staging/android/sw_sync.c
 delete mode 100644 drivers/staging/android/sw_sync.h
 delete mode 100644 drivers/staging/android/sync.c
 delete mode 100644 drivers/staging/android/sync.h
 delete mode 100644 drivers/staging/android/sync_debug.c
 delete mode 100644 drivers/staging/android/trace/sync.h
 delete mode 100644 drivers/staging/android/uapi/sw_sync.h
 delete mode 100644 drivers/staging/android/uapi/sync.h
 create mode 100644 include/uapi/sync/Kbuild
 create mode 100644 include/uapi/sync/sw_sync.h
 create mode 100644 include/uapi/sync/sync.h

-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 74+ messages in thread

end of thread, other threads:[~2016-01-25 12:11 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11 13:11 [PATCH 00/13] Convert requests to use struct fence John.C.Harrison
2015-12-11 13:11 ` [PATCH 01/13] staging/android/sync: Support sync points created from dma-fences John.C.Harrison
2015-12-17 17:32   ` [Intel-gfx] " Jesse Barnes
2015-12-11 13:11 ` [PATCH 02/13] staging/android/sync: add sync_fence_create_dma John.C.Harrison
2015-12-17 17:29   ` Jesse Barnes
2015-12-11 13:11 ` [PATCH 03/13] staging/android/sync: Move sync framework out of staging John.C.Harrison
2015-12-17 17:35   ` Jesse Barnes
2015-12-21 10:03     ` Daniel Vetter
2015-12-21 14:20       ` John Harrison
2015-12-21 15:46         ` Daniel Vetter
2015-12-22 12:14           ` John Harrison
2015-12-11 13:11 ` [PATCH 04/13] android/sync: Improved debug dump to dmesg John.C.Harrison
2015-12-17 17:36   ` Jesse Barnes
2015-12-11 13:11 ` [PATCH 05/13] drm/i915: Convert requests to use struct fence John.C.Harrison
2015-12-17 17:43   ` Jesse Barnes
2016-01-04 17:20     ` Jesse Barnes
2016-01-04 20:57       ` Chris Wilson
2016-01-04 21:16         ` Jesse Barnes
2016-01-08 21:47           ` Chris Wilson
2016-01-08 21:55             ` Jesse Barnes
2015-12-11 13:11 ` [PATCH 06/13] drm/i915: Removed now redudant parameter to i915_gem_request_completed() John.C.Harrison
2015-12-11 13:11 ` [PATCH 07/13] drm/i915: Add per context timelines to fence object John.C.Harrison
2015-12-17 17:49   ` Jesse Barnes
2015-12-21 10:16     ` Chris Wilson
2015-12-11 13:11 ` [PATCH 08/13] drm/i915: Delay the freeing of requests until retire time John.C.Harrison
2015-12-11 13:11 ` [PATCH 09/13] drm/i915: Interrupt driven fences John.C.Harrison
2015-12-11 15:30   ` John Harrison
2015-12-11 16:07     ` Tvrtko Ursulin
2015-12-11 13:11 ` [PATCH 10/13] drm/i915: Updated request structure tracing John.C.Harrison
2015-12-11 13:11 ` [PATCH 11/13] android/sync: Fix reversed sense of signaled fence John.C.Harrison
2015-12-11 15:57   ` Tvrtko Ursulin
2015-12-14 11:22     ` John Harrison
2015-12-14 12:37       ` Tvrtko Ursulin
2015-12-11 13:12 ` [PATCH 12/13] drm/i915: Add sync framework support to execbuff IOCTL John.C.Harrison
2015-12-11 15:29   ` Tvrtko Ursulin
2015-12-14 11:46     ` John Harrison
2015-12-14 12:23       ` Chris Wilson
2015-12-11 13:12 ` [PATCH 13/13] drm/i915: Cache last IRQ seqno to reduce IRQ overhead John.C.Harrison
2015-12-11 14:28   ` Tvrtko Ursulin
2015-12-14 11:58     ` John Harrison
2015-12-14 12:52       ` Tvrtko Ursulin
2015-12-11 14:55   ` Chris Wilson
2015-12-11 15:35     ` John Harrison
2015-12-11 16:07       ` Chris Wilson
2016-01-08 18:47 ` [PATCH 0/7] Convert requests to use struct fence John.C.Harrison
2016-01-08 18:47   ` [PATCH 1/7] drm/i915: " John.C.Harrison
2016-01-08 21:59     ` Chris Wilson
2016-01-11 19:03       ` John Harrison
2016-01-11 22:41         ` Jesse Barnes
2016-01-08 18:47   ` [PATCH 2/7] drm/i915: Removed now redudant parameter to i915_gem_request_completed() John.C.Harrison
2016-01-11 22:43     ` Jesse Barnes
2016-01-08 18:47   ` [PATCH 3/7] drm/i915: Add per context timelines to fence object John.C.Harrison
2016-01-08 22:05     ` Chris Wilson
2016-01-11 19:03       ` John Harrison
2016-01-11 22:47         ` Jesse Barnes
2016-01-11 22:58           ` Chris Wilson
2016-01-12 11:03             ` John Harrison
2016-01-12 11:26               ` Chris Wilson
2016-01-08 18:47   ` [PATCH 4/7] drm/i915: Delay the freeing of requests until retire time John.C.Harrison
2016-01-08 22:08     ` Chris Wilson
2016-01-11 19:06       ` John Harrison
2016-01-25 11:52         ` Maarten Lankhorst
2016-01-25 12:11           ` Chris Wilson
2016-01-08 18:47   ` [PATCH 5/7] drm/i915: Interrupt driven fences John.C.Harrison
2016-01-08 22:14     ` Chris Wilson
2016-01-09  0:30       ` Chris Wilson
2016-01-08 22:46     ` Chris Wilson
2016-01-11 19:10       ` John Harrison
2016-01-11 23:01         ` Jesse Barnes
2016-01-08 18:47   ` [PATCH 6/7] drm/i915: Updated request structure tracing John.C.Harrison
2016-01-08 22:16     ` Chris Wilson
2016-01-08 18:47   ` [PATCH 7/7] drm/i915: Cache last IRQ seqno to reduce IRQ overhead John.C.Harrison
2016-01-08 22:47   ` [PATCH 0/7] Convert requests to use struct fence Chris Wilson
2016-01-11 19:15     ` John Harrison

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.