[Intel-gfx] [PATCH 00/13] Legacy engine initialization refactoring

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Jun 27 14:04:07 UTC 2016


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Preparation step towards unifying what can be unified between
legacy and execlist.

This series tries to simplify the engine initializers by moving some
of the commonatility replicated between all of the engines into a shared
helper function - the same approach as in intel_lrc.c.

Also tries to simplify the semaphore initialization by replacing some
verbose code with either a completely programatical code (Gen8), or a
combination of a data table and logic (Gen6+).

To be discussed if people see this as a worthwhile improvement. It does
shrink both the source and generated binary (~2k), but more importantly
makes the initializers easier to read and understand. Hopefully not only
for me.

Next step of unification can be employing the same data-driven setup +
per-engine constructor loop driven approach as recently has been implemented
in intel_lrc.c. I think Dave already has some patches for that. And then
finally extracting commonality between intel_ringbuffer.c and intel_lrc.c
gets easier to spot and to do (and review).

Tvrtko Ursulin (13):
  drm/i915: Consolidate write_tail vfunc initializer
  drm/i915: Consolidate add_request vfunc
  drm/i915: Consolidate seqno_barrier vfunc
  drm/i915: Consolidate get and put irq vfuncs
  drm/i915: Consolidate get/set_seqno
  drm/i915: Consolidate init_hw vfunc
  drm/i915: Consolidate dispatch_execbuffer vfunc
  drm/i915: Consolidate semaphore vfuncs init
  drm/i915: Compact Gen8 semaphore initialization
  drm/i915: Compact gen8_ring_sync
  drm/i915: Consolidate legacy semaphore initialization
  drm/i915: Remove redundant warning and consolidate gen8 render
    semaphore vfunc
  drm/i915: Trim some if-else braces

 drivers/gpu/drm/i915/intel_ringbuffer.c | 340 ++++++++++++++------------------
 drivers/gpu/drm/i915/intel_ringbuffer.h |  12 --
 2 files changed, 143 insertions(+), 209 deletions(-)

-- 
1.9.1



More information about the Intel-gfx mailing list