OSDN Git Service

drm/i915/gt: Refactor mocs loops into single control macro
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 12 Nov 2019 22:35:59 +0000 (22:35 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 14 Nov 2019 17:38:54 +0000 (17:38 +0000)
commitf8a0c7a996ff17191973838e93f5be51c9828174
treedeec24eb1b624419c1f68bd9d78125d546941514
parentf616de0e24d344f98bc0b0bacd3236d65e2efab9
drm/i915/gt: Refactor mocs loops into single control macro

We repeatedly (and more so in future) use the same looping construct
over the mocs definition table to setup the register state. Refactor the
loop construct into a reusable macro.

add/remove: 2/1 grow/shrink: 1/2 up/down: 113/-330 (-217)
Function                                     old     new   delta
intel_mocs_init_engine.cold                    -      71     +71
offset                                         -      28     +28
__func__                                   17273   17287     +14
intel_mocs_init                              143     113     -30
mocs_register.isra                            91       -     -91
intel_mocs_init_engine                       503     294    -209

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191112223600.30993-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_mocs.c
drivers/gpu/drm/i915/i915_reg.h