Skip to content

Forcewake binary search & code shrink

Tvrtko Ursulin intel-gfx 2 versions – Applied

Status from this message: Pushed to dinq, first one from the new office. :)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest14 patches 12 repliesApplied
  2. v113 patches 17 repliesSuperseded

Changes in v2 from the cover letter

* Updated cover letter given feedback.
* Some rework for review comments.
* New patch in the series (14) to inline the binary search.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/14drm/i915: Remove redundant hsw_write* mmio functionsdrivers/gpu/drm/i915/intel_uncore.c+1 -240 replies
2/14drm/i915: Keep track of active forcewake domains in a bitmaskdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_uncore.c+25 -310 replies
3/14drm/i915: Do not inline forcewake taking in mmio accessorsdrivers/gpu/drm/i915/intel_uncore.c+14 -100 replies
4/14drm/i915: Data driven register to forcewake domains lookupdrivers/gpu/drm/i915/intel_uncore.c+103 -1092 replies
5/14drm/i915: Sort forcewake mapping tablesdrivers/gpu/drm/i915/intel_uncore.c+43 -131 reply
5/14drm/i915: Sort forcewake mapping tablesdrivers/gpu/drm/i915/intel_uncore.c+43 -130 replies
6/14drm/i915: Use binary search when looking up forcewake domainsdrivers/gpu/drm/i915/intel_uncore.c+19 -80 replies
7/14drm/i915: Eliminate Gen9 special casedrivers/gpu/drm/i915/intel_uncore.c+21 -210 replies
8/14drm/i915: Store the active forcewake range table pointerdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_uncore.c+46 -370 replies
8/14drm/i915: Store the active forcewake range table pointerdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_uncore.c+44 -340 replies
9/14drm/i915: Remove identical macrosdrivers/gpu/drm/i915/intel_uncore.c+20 -500 replies
10/14drm/i915: Remove identical mmio read functionsdrivers/gpu/drm/i915/intel_uncore.c+10 -440 replies
11/14drm/i915: Remove identical write mmmio functionsdrivers/gpu/drm/i915/intel_uncore.c+19 -750 replies
12/14drm/i915: Sort the shadow register tabledrivers/gpu/drm/i915/intel_uncore.c+25 -60 replies
12/14drm/i915: Sort the shadow register tabledrivers/gpu/drm/i915/intel_uncore.c+26 -60 replies
13/14drm/i915: Use binary search when looking for shadowed registersdrivers/gpu/drm/i915/intel_uncore.c+21 -53 replies
14/14drm/i915: Inline binary searchdrivers/gpu/drm/i915/intel_uncore.c+31 -250 replies

Reviews trailers per patch

12 of 17 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJoonas LahtinenChris Wilson
SeriesR-b
1/14R-b R-b
2/14R-b
3/14R-b
4/14R-b
5/14R-b
5/14R-b
6/14
7/14
8/14R-b
8/14R-b
9/14
10/14R-b
11/14
12/14R-b R-b R-b
12/14R-b R-b R-b
13/14R-b
14/14

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

Read the v2 thread

Cover letter [PATCH v2 00/14] Forcewake binary search & code shrink

From: Tvrtko Ursulin <[email protected]>

Motivation was to replace linear search comparison if-else ladders in MMIO accessors with a data driven approach.

These lookups are needed to determine to correct forcewake domains to take when reading and writing to MMIO registers.

Going data driven and keeping the tables sorted enabled binary search to be used. Followed by gradual extraction of commonality between existing functions, accompanying code reduction, and the end result is around 15KiB less code generated and also some saving in the source code lines.

v2:
* Updated cover letter given feedback.
* Some rework for review comments.
* New patch in the series (14) to inline the binary search.

Tvrtko Ursulin (14):
drm/i915: Remove redundant hsw_write* mmio functions drm/i915: Keep track of active forcewake domains in a bitmask drm/i915: Do not inline forcewake taking in mmio accessors drm/i915: Data driven register to forcewake domains lookup drm/i915: Sort forcewake mapping tables
drm/i915: Use binary search when looking up forcewake domains drm/i915: Eliminate Gen9 special case
drm/i915: Store the active forcewake range table pointer drm/i915: Remove identical macros
drm/i915: Remove identical mmio read functions drm/i915: Remove identical write mmmio functions drm/i915: Sort the shadow register table
drm/i915: Use binary search when looking for shadowed registers drm/i915: Inline binary search

 drivers/gpu/drm/i915/i915_drv.h     |  12 +
 drivers/gpu/drm/i915/intel_uncore.c | 600 ++++++++++++++++--------------------
 2 files changed, 276 insertions(+), 336 deletions(-)
Signature · 6 lines
2.7.4

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