]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: use vfuncs for reg_read/write_fw_domains
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Thu, 20 Jun 2019 01:00:16 +0000 (18:00 -0700)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 20 Jun 2019 15:34:52 +0000 (16:34 +0100)
commitefb0843fd12af10a0daaa8355897adf462b16f7b
tree99ac8e94488d7e577c91d141fd854530eb4f3af7
parentbaf4b170accf15381d4d2ff87a4648fba7816990
drm/i915: use vfuncs for reg_read/write_fw_domains

Instead of going through the if-else chain every time, let's save the
function in the uncore structure. Note that the new functions are
purposely not used from the reg read/write functions to keep the
inlining there.

While at it, use the new macro to call the old ones to clean the code a
bit.

v2: Rename macros for no-forcewake function assignment (Tvrtko)

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190620010021.20637-2-daniele.ceraolospurio@intel.com
drivers/gpu/drm/i915/intel_uncore.c
drivers/gpu/drm/i915/intel_uncore.h
drivers/gpu/drm/i915/selftests/mock_uncore.c