]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/uc: autogenerate uC checker functions
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Tue, 18 Feb 2020 22:33:22 +0000 (14:33 -0800)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 20 Feb 2020 17:48:05 +0000 (17:48 +0000)
commit74dfb5054575887cf46e607fdabb75027ef9e087
treeaed1d3491bef6c518d5e9a8cf471c7e1d6dc706c
parent7d9457a346f13a6300a231154dea4e411e89049e
drm/i915/uc: autogenerate uC checker functions

We want to map uC-level checks to GuC/HuC-level ones. The mapping from
the uC state to the GuC/HuC one follows the same pattern for all the
functions:

 uc_xxx_guc() -> guc_is_yyy()

So we can easily use a macro to autogenerate the functions via macros by
passing in the 2 mapped states.

v2: Split this change to its own patch (Michal)

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200218223327.11058-5-daniele.ceraolospurio@intel.com
drivers/gpu/drm/i915/gt/uc/intel_uc.h