Skip to content

Legacy engine initialization refactoring

Tvrtko Ursulin intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13drm/i915: Consolidate write_tail vfunc initializerdrivers/gpu/drm/i915/intel_ringbuffer.c+19 -80 replies
2/13drm/i915: Consolidate add_request vfuncdrivers/gpu/drm/i915/intel_ringbuffer.c+5 -70 replies
3/13drm/i915: Consolidate seqno_barrier vfuncdrivers/gpu/drm/i915/intel_ringbuffer.c+4 -70 replies
4/13drm/i915: Consolidate get and put irq vfuncsdrivers/gpu/drm/i915/intel_ringbuffer.c+17 -291 reply
5/13drm/i915: Consolidate get/set_seqnodrivers/gpu/drm/i915/intel_ringbuffer.c+2 -160 replies
6/13drm/i915: Consolidate init_hw vfuncdrivers/gpu/drm/i915/intel_ringbuffer.c+1 -40 replies
7/13drm/i915: Consolidate dispatch_execbuffer vfuncdrivers/gpu/drm/i915/intel_ringbuffer.c+6 -191 reply
8/13drm/i915: Consolidate semaphore vfuncs initdrivers/gpu/drm/i915/intel_ringbuffer.c+18 -300 replies
9/13drm/i915: Compact Gen8 semaphore initializationdrivers/gpu/drm/i915/intel_ringbuffer.c drivers/gpu/drm/i915/intel_ringbuffer.h+15 -131 reply
10/13drm/i915: Compact gen8_ring_syncdrivers/gpu/drm/i915/intel_ringbuffer.c+3 -40 replies
11/13drm/i915: Consolidate legacy semaphore initializationdrivers/gpu/drm/i915/intel_ringbuffer.c+48 -620 replies
12/13drm/i915: Remove redundant warning and consolidate gen8 render semaphore vfuncdrivers/gpu/drm/i915/intel_ringbuffer.c+3 -50 replies
13/13drm/i915: Trim some if-else bracesdrivers/gpu/drm/i915/intel_ringbuffer.c+6 -90 replies

Reviews trailers per patch

None of the 13 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchChris Wilson
SeriesR-b
1/13
2/13
3/13
4/13
5/13
6/13
7/13
8/13
9/13
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/13] Legacy engine initialization refactoring

From: Tvrtko Ursulin <[email protected]>

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(-)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx