drm/i915/gsc: GSC firmware loading
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Thu, 8 Dec 2022 20:05:18 +0000 (12:05 -0800)
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Fri, 9 Dec 2022 16:28:43 +0000 (08:28 -0800)
commit15bd4a67e914dbee6b6ba5dfd32a09cbf7419a5b
tree19ac247878b5bde8721d18a1e53c57e162528ba1
parentf0ce5178a38918adfef728f43dd544616b05e3e3
drm/i915/gsc: GSC firmware loading

GSC FW is loaded by submitting a dedicated command via the GSC engine.
The memory area used for loading the FW is then re-purposed as local
memory for the GSC itself, so we use a separate allocation instead of
using the one where we keep the firmware stored for reload.

The GSC is not reset as part of GT reset, so we only need to load it on
first boot and S3/S4 exit.

v2: use REG_* for register fields definitions (Rodrigo), move to WQ
    immediately

v3: mark worker function as static

Bspec: 63347, 65346
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221208200521.2928378-4-daniele.ceraolospurio@intel.com
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/gt/intel_engine.h
drivers/gpu/drm/i915/gt/intel_gpu_commands.h
drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c [new file with mode: 0644]
drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.h [new file with mode: 0644]
drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.c
drivers/gpu/drm/i915/gt/uc/intel_gsc_uc.h
drivers/gpu/drm/i915/gt/uc/intel_uc.c
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h