]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Move the context descriptor to an inline helper
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 12 Sep 2017 21:49:05 +0000 (22:49 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 13 Sep 2017 09:31:48 +0000 (10:31 +0100)
commit2013ddebd2f4b5ef90625c8b82da216df0123134
tree02fbd4475dedeb0e0d8fb76ff01a466d3fe1da99
parent5b60fc09806a9db0fb46e6821bc1ed3203b6740e
drm/i915: Move the context descriptor to an inline helper

The context descriptor is stored inside the per-engine context state, as
we only need to compute it once and access it frequently. However,
currently only intel_lrc.c has easy access, but i915_guc_submission.c
would like to frequently read it as well, and more so only ever needs
the lower 32bits. Make it an inline as the compiler should be able to
retrieve the value in less instructions than it takes to do the function
call:

add/remove: 0/1 grow/shrink: 1/0 up/down: 8/-45 (-37)
function                                     old     new   delta
i915_guc_submit                              621     629      +8
intel_lr_context_descriptor                   45       -     -45

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20170912214905.21987-1-chris@chris-wilson.co.uk
Reviewed-by: Oscar Mateo <oscar.mateo@intel.com>
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_lrc.h