public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [RFC 0/9] Convert requests to use struct fence
@ 2015-07-17 14:31 John.C.Harrison
  2015-07-17 14:31 ` [RFC 1/9] staging/android/sync: Support sync points created from dma-fences John.C.Harrison
                   ` (8 more replies)
  0 siblings, 9 replies; 39+ messages in thread
From: John.C.Harrison @ 2015-07-17 14:31 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.

[Patches against drm-intel-nightly tree fetched 15/07/2015]

John Harrison (7):
  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

Maarten Lankhorst (1):
  android: add sync_fence_create_dma

Tvrtko Ursulin (1):
  staging/android/sync: Support sync points created from dma-fences

 drivers/gpu/drm/i915/i915_debugfs.c        |   2 +-
 drivers/gpu/drm/i915/i915_drv.h            |  73 +++---
 drivers/gpu/drm/i915/i915_gem.c            | 369 +++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_gem_context.c    |  15 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |  90 ++++++-
 drivers/gpu/drm/i915/i915_irq.c            |   2 +-
 drivers/gpu/drm/i915/i915_trace.h          |   7 +-
 drivers/gpu/drm/i915/intel_display.c       |   4 +-
 drivers/gpu/drm/i915/intel_lrc.c           |  12 +
 drivers/gpu/drm/i915/intel_pm.c            |   6 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c    |   4 +
 drivers/gpu/drm/i915/intel_ringbuffer.h    |   7 +
 drivers/staging/android/sync.c             |  13 +-
 drivers/staging/android/sync.h             |  12 +-
 drivers/staging/android/sync_debug.c       |  42 ++--
 include/uapi/drm/i915_drm.h                |  16 +-
 16 files changed, 583 insertions(+), 91 deletions(-)

-- 
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] 39+ messages in thread
* [RFC 0/9] Add native sync support to i915 driver
@ 2016-01-13 17:57 John.C.Harrison
  2016-01-13 17:57 ` [RFC 1/9] staging/android/sync: Support sync points created from dma-fences John.C.Harrison
  0 siblings, 1 reply; 39+ messages in thread
From: John.C.Harrison @ 2016-01-13 17:57 UTC (permalink / raw)
  To: Intel-GFX

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

This patch set was originally part of the struct fence and scheduler
patch sets. However, it relies on de-staging the sync framework and
that is now being done by another group. Hence these patches had to be
split out into a separate series that can be merged after the de-stage
has happened.

Note that for the time being, this patch set also includes the
de-staging work because otherwise the rest of the patches will not
apply. Hence it is being set as an RFC rather than PATCH as the
expectation is those patches will need to be dropped and the remainder
rebased.

What the patch series does is to add support for user land sync points
to the i915 driver (such as Android native syncs and dma-buff syncs).
That allows exernal applications/libraries/drivers to asynchronously
submit and/or track GPU work. That is, a batch buffer can be submitted
to the i915 driver with a sync point attached which means that the
work will not actually be sent to the hardware until that sync point
has been signalled. Likewise, a sync point can be requested such that
when the batch buffer has completed on the hardware the sync point
will be signalled by the i915 driver.

This allows long chains of interdependent work to be submitted to
various drivers without the CPU having to wait between steps. E.g. a
video frame can be captured, used as an OGL texture and displayed to
the screen all as a single 'fire and forget' operation.

v1: New patch series put together from patches that were previously
part of two different patch sets. Hence version numbers in individual
patches have been change to 0.x for revisions when in previous series.

[Patches against drm-intel-nightly tree fetched 17/11/2015 with struct
fence conversion and scheduler patches applied]

John Harrison (6):
  staging/android/sync: Move sync framework out of staging
  android/sync: Improved debug dump to dmesg
  drm/i915: Add sync framework support to execbuff IOCTL
  drm/i915: Add sync wait support to scheduler
  drm/i915: Connecting execbuff fences to scheduler
  drm/i915: Add sync support to the scheduler statistics and status dump

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        |   4 +
 drivers/gpu/drm/i915/i915_drv.h            |   8 +
 drivers/gpu/drm/i915/i915_gem.c            |  90 +++-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 123 ++++-
 drivers/gpu/drm/i915/i915_scheduler.c      | 163 ++++++-
 drivers/gpu/drm/i915/i915_scheduler.h      |  11 +
 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 ++++
 30 files changed, 2373 insertions(+), 1915 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] 39+ messages in thread

end of thread, other threads:[~2016-01-13 17:57 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-17 14:31 [RFC 0/9] Convert requests to use struct fence John.C.Harrison
2015-07-17 14:31 ` [RFC 1/9] staging/android/sync: Support sync points created from dma-fences John.C.Harrison
2015-07-17 14:44   ` Tvrtko Ursulin
2015-07-17 14:31 ` [RFC 2/9] android: add sync_fence_create_dma John.C.Harrison
2015-07-17 14:31 ` [RFC 3/9] drm/i915: Convert requests to use struct fence John.C.Harrison
2015-07-21  7:05   ` Daniel Vetter
2015-07-28 10:01     ` John Harrison
2015-07-22 14:26   ` Tvrtko Ursulin
2015-07-28 10:10     ` John Harrison
2015-08-03  9:17       ` Tvrtko Ursulin
2015-07-22 14:45   ` Tvrtko Ursulin
2015-07-28 10:18     ` John Harrison
2015-08-03  9:18       ` Tvrtko Ursulin
2015-07-17 14:31 ` [RFC 4/9] drm/i915: Removed now redudant parameter to i915_gem_request_completed() John.C.Harrison
2015-07-17 14:31 ` [RFC 5/9] drm/i915: Add per context timelines to fence object John.C.Harrison
2015-07-23 13:50   ` Tvrtko Ursulin
2015-10-28 12:59     ` John Harrison
2015-11-17 13:54       ` Daniel Vetter
2015-07-17 14:31 ` [RFC 6/9] drm/i915: Delay the freeing of requests until retire time John.C.Harrison
2015-07-23 14:25   ` Tvrtko Ursulin
2015-10-28 13:00     ` John Harrison
2015-10-28 13:42       ` Tvrtko Ursulin
2015-07-17 14:31 ` [RFC 7/9] drm/i915: Interrupt driven fences John.C.Harrison
2015-07-20  9:09   ` Maarten Lankhorst
2015-07-21  7:19   ` Daniel Vetter
2015-07-27 11:33   ` Tvrtko Ursulin
2015-10-28 13:00     ` John Harrison
2015-07-27 13:20   ` Tvrtko Ursulin
2015-07-27 14:00     ` Daniel Vetter
2015-08-03  9:20       ` Tvrtko Ursulin
2015-08-05  8:05         ` Daniel Vetter
2015-08-05 11:05           ` Maarten Lankhorst
2015-07-17 14:31 ` [RFC 8/9] drm/i915: Updated request structure tracing John.C.Harrison
2015-07-17 14:31 ` [RFC 9/9] drm/i915: Add sync framework support to execbuff IOCTL John.C.Harrison
2015-07-27 13:00   ` Tvrtko Ursulin
2015-10-28 13:01     ` John Harrison
2015-10-28 14:31       ` Tvrtko Ursulin
2015-11-17 13:59       ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2016-01-13 17:57 [RFC 0/9] Add native sync support to i915 driver John.C.Harrison
2016-01-13 17:57 ` [RFC 1/9] staging/android/sync: Support sync points created from dma-fences John.C.Harrison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox