]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/uc: Add ops to intel_uc
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 10 Jan 2020 22:27:20 +0000 (22:27 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 11 Jan 2020 08:34:28 +0000 (08:34 +0000)
commit6f2d7feb1d99c0a8c038f82062e348112c555db8
treed833624d2ce389f466d00e64c55578369748babd
parent9d2bccf91557a71481630edc0acc1a892cc7e389
drm/i915/uc: Add ops to intel_uc

Instead of spreading multiple conditionals across the uC code
to find out current mode of uC operation, start using predefined
set of function pointers that reflect that mode.

Begin with pair of init_hw/fini_hw functions that are responsible
for uC hardware initialization and cleanup.

v2: drop ops_none, use macro to generate ops helpers
v3: reuse __uc_check_hw to avoid redundant comment
v4: forward declare ops struct vs functions

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200110222723.14724-2-michal.wajdeczko@intel.com
drivers/gpu/drm/i915/gt/uc/intel_uc.c
drivers/gpu/drm/i915/gt/uc/intel_uc.h