drm/i915: Split g4x+ sprite plane update into noarm+arm pair
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 18 Oct 2021 11:50:28 +0000 (14:50 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 4 Nov 2021 15:59:25 +0000 (17:59 +0200)
commit120542e2c1d12e7d3594ceeaa6e02296af52cc80
treebfb9c2a91e418bc7545de9295e33f951b52fcb5b
parent4d0d77de9af455aa949766ecad1ac3232e322020
drm/i915: Split g4x+ sprite plane update into noarm+arm pair

Chop g4x_sprite_update() into two halves. Fist half becomes
the _noarm() variant, second part the _arm() variant.

Fortunately I have already previously grouped the register
writes into roughtly the correct order, so the split looks
surprisingly clean.

Not much of a change in i915_update_info on these older
platforms that don't have so many planes or registers to
begin with. Here are the numbers from snb (totally unpatched
vs. both primary plane and sprite patched applied) running
kms_atomic_transition --r plane-all-transition --extended:
w/o patch                           w/ patch
Updates: 5404     Updates: 5405
       |         |
   1us |******        1us |******
       |*********         |*********
   4us |***********        4us |***********
       |**********         |**********
  16us |**       16us |**
       |         |
  66us |       66us |
       |         |
 262us |      262us |
       |         |
   1ms |        1ms |
       |         |
   4ms |        4ms |
       |         |
  17ms |       17ms |
       |         |
Min update: 1400ns     Min update: 1307ns
Max update: 19809ns     Max update: 20194ns
Average update: 6957ns     Average update: 6432ns
Overruns > 100us: 0     Overruns > 100us: 0

But there seems to be a slight improvement with
lockdep enabled:
w/o patch                           w/ patch
Updates: 17612     Updates: 16364
       |         |
   1us |        1us |
       |******         |******
   4us |**********        4us |**********
       |************         |*************
  16us |*************       16us |************
       |***         |*
  66us |       66us |
       |         |
 262us |      262us |
       |         |
   1ms |        1ms |
       |         |
   4ms |        4ms |
       |         |
  17ms |       17ms |
       |         |
Min update: 3141ns     Min update: 3562ns
Max update: 126450ns     Max update: 73354ns
Average update: 16373ns     Average update: 15153ns
Overruns > 250us: 0     Overruns > 250us: 0

Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211018115030.3547-8-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
drivers/gpu/drm/i915/display/intel_sprite.c